diff --git a/azure-devops/azure/devops/connection.py b/azure-devops/azure/devops/connection.py index 9c76e52a..cdd9a9f3 100644 --- a/azure-devops/azure/devops/connection.py +++ b/azure-devops/azure/devops/connection.py @@ -10,9 +10,9 @@ from .client_configuration import ClientConfiguration from .exceptions import AzureDevOpsClientRequestError from .released.client_factory import ClientFactory -from .v7_1.location.location_client import LocationClient +from .v7_2.location.location_client import LocationClient +from .v7_2.client_factory import ClientFactoryV7_2 from .v7_1.client_factory import ClientFactoryV7_1 -from .v7_0.client_factory import ClientFactoryV7_0 logger = logging.getLogger(__name__) @@ -33,8 +33,8 @@ def __init__(self, base_url=None, creds=None, user_agent=None): self._creds = creds self._resource_areas = None self.clients = ClientFactory(self) + self.clients_v7_2 = ClientFactoryV7_2(self) self.clients_v7_1 = ClientFactoryV7_1(self) - self.clients_v7_0 = ClientFactoryV7_0(self) self.use_fiddler = False def get_client(self, client_type): diff --git a/azure-devops/azure/devops/v7_0/git/git_client.py b/azure-devops/azure/devops/v7_0/git/git_client.py deleted file mode 100644 index c28e80df..00000000 --- a/azure-devops/azure/devops/v7_0/git/git_client.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 - -from msrest.universal_http import ClientRequest -from .git_client_base import GitClientBase - - -class GitClient(GitClientBase): - """Git - :param str base_url: Service URL - :param Authentication creds: Authenticated credentials. - """ - - def __init__(self, base_url=None, creds=None): - super(GitClient, self).__init__(base_url, creds) - - def get_vsts_info(self, relative_remote_url): - url = self._client.format_url(relative_remote_url.rstrip('/') + '/vsts/info') - request = ClientRequest(method='GET', url=url) - headers = {'Accept': 'application/json'} - if self._suppress_fedauth_redirect: - headers['X-TFS-FedAuthRedirect'] = 'Suppress' - if self._force_msa_pass_through: - headers['X-VSS-ForceMsaPassThrough'] = 'true' - response = self._send_request(request, headers) - return self._deserialize('VstsInfo', response) - - @staticmethod - def get_vsts_info_by_remote_url(remote_url, credentials, - suppress_fedauth_redirect=True, - force_msa_pass_through=True): - request = ClientRequest(method='GET', url=remote_url.rstrip('/') + '/vsts/info') - headers = {'Accept': 'application/json'} - if suppress_fedauth_redirect: - headers['X-TFS-FedAuthRedirect'] = 'Suppress' - if force_msa_pass_through: - headers['X-VSS-ForceMsaPassThrough'] = 'true' - git_client = GitClient(base_url=remote_url, creds=credentials) - response = git_client._send_request(request, headers) - return git_client._deserialize('VstsInfo', response) \ No newline at end of file diff --git a/azure-devops/azure/devops/v7_0/test_results/test_results_client.py b/azure-devops/azure/devops/v7_0/test_results/test_results_client.py deleted file mode 100644 index 75dcbc0a..00000000 --- a/azure-devops/azure/devops/v7_0/test_results/test_results_client.py +++ /dev/null @@ -1,348 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- -# Generated file, DO NOT EDIT -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------------------------- - -from msrest import Serializer, Deserializer -from ...client import Client -from . import models - - -class TestResultsClient(Client): - """TestResults - :param str base_url: Service URL - :param Authentication creds: Authenticated credentials. - """ - - def __init__(self, base_url=None, creds=None): - super(TestResultsClient, self).__init__(base_url, creds) - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - resource_area_identifier = 'c83eaf52-edf3-4034-ae11-17d38f25404c' - - def query_test_results_meta_data(self, test_case_reference_ids, project, details_to_include=None): - """QueryTestResultsMetaData. - [Preview API] Get list of test Result meta data details for corresponding testcasereferenceId - :param [str] test_case_reference_ids: TestCaseReference Ids of the test Result to be queried, comma separated list of valid ids (limit no. of ids 200). - :param str project: Project ID or project name - :param str details_to_include: Details to include with test results metadata. Default is None. Other values are FlakyIdentifiers. - :rtype: [TestResultMetaData] - """ - route_values = {} - if project is not None: - route_values['project'] = self._serialize.url('project', project, 'str') - query_parameters = {} - if details_to_include is not None: - query_parameters['detailsToInclude'] = self._serialize.query('details_to_include', details_to_include, 'str') - content = self._serialize.body(test_case_reference_ids, '[str]') - response = self._send(http_method='POST', - location_id='b72ff4c0-4341-4213-ba27-f517cf341c95', - version='7.0-preview.4', - route_values=route_values, - query_parameters=query_parameters, - content=content) - return self._deserialize('[TestResultMetaData]', self._unwrap_collection(response)) - - def update_test_results_meta_data(self, test_result_meta_data_update_input, project, test_case_reference_id): - """UpdateTestResultsMetaData. - [Preview API] Update properties of test result meta data - :param :class:` ` test_result_meta_data_update_input: TestResultMetaData update input TestResultMetaDataUpdateInput - :param str project: Project ID or project name - :param int test_case_reference_id: TestCaseReference Id of Test Result to be updated. - :rtype: :class:` ` - """ - route_values = {} - if project is not None: - route_values['project'] = self._serialize.url('project', project, 'str') - if test_case_reference_id is not None: - route_values['testCaseReferenceId'] = self._serialize.url('test_case_reference_id', test_case_reference_id, 'int') - content = self._serialize.body(test_result_meta_data_update_input, 'TestResultMetaDataUpdateInput') - response = self._send(http_method='PATCH', - location_id='b72ff4c0-4341-4213-ba27-f517cf341c95', - version='7.0-preview.4', - route_values=route_values, - content=content) - return self._deserialize('TestResultMetaData', response) - - def get_test_result_logs(self, project, run_id, result_id, type, directory_path=None, file_name_prefix=None, fetch_meta_data=None, top=None, continuation_token=None): - """GetTestResultLogs. - [Preview API] Get list of test result attachments reference - :param str project: Project ID or project name - :param int run_id: Id of the test run that contains the result - :param int result_id: Id of the test result - :param str type: type of attachments to get - :param str directory_path: directory path of attachments to get - :param str file_name_prefix: file name prefix to filter the list of attachment - :param bool fetch_meta_data: Default is false, set if metadata is needed - :param int top: Numbe of attachments reference to return - :param String continuation_token: Header to pass the continuationToken - :rtype: :class:`<[TestLog]> ` - """ - route_values = {} - if project is not None: - route_values['project'] = self._serialize.url('project', project, 'str') - if run_id is not None: - route_values['runId'] = self._serialize.url('run_id', run_id, 'int') - if result_id is not None: - route_values['resultId'] = self._serialize.url('result_id', result_id, 'int') - query_parameters = {} - if type is not None: - query_parameters['type'] = self._serialize.query('type', type, 'str') - if directory_path is not None: - query_parameters['directoryPath'] = self._serialize.query('directory_path', directory_path, 'str') - if file_name_prefix is not None: - query_parameters['fileNamePrefix'] = self._serialize.query('file_name_prefix', file_name_prefix, 'str') - if fetch_meta_data is not None: - query_parameters['fetchMetaData'] = self._serialize.query('fetch_meta_data', fetch_meta_data, 'bool') - if top is not None: - query_parameters['top'] = self._serialize.query('top', top, 'int') - additional_headers = {} - if continuation_token is not None: - additional_headers['x-ms-continuationtoken'] = continuation_token - response = self._send(http_method='GET', - location_id='714caaac-ae1e-4869-8323-9bc0f5120dbf', - version='7.0-preview.1', - route_values=route_values, - query_parameters=query_parameters, - additional_headers=additional_headers) - return self._deserialize('[TestLog]', self._unwrap_collection(response)) - - def get_test_sub_result_logs(self, project, run_id, result_id, sub_result_id, type, directory_path=None, file_name_prefix=None, fetch_meta_data=None, top=None, continuation_token=None): - """GetTestSubResultLogs. - [Preview API] Get list of test subresult attachments reference - :param str project: Project ID or project name - :param int run_id: Id of the test run that contains the results - :param int result_id: Id of the test result that contains subresult - :param int sub_result_id: Id of the test subresult - :param str type: type of the attachments to get - :param str directory_path: directory path of the attachment to get - :param str file_name_prefix: file name prefix to filter the list of attachments - :param bool fetch_meta_data: Default is false, set if metadata is needed - :param int top: Number of attachments reference to return - :param String continuation_token: Header to pass the continuationToken - :rtype: :class:`<[TestLog]> ` - """ - route_values = {} - if project is not None: - route_values['project'] = self._serialize.url('project', project, 'str') - if run_id is not None: - route_values['runId'] = self._serialize.url('run_id', run_id, 'int') - if result_id is not None: - route_values['resultId'] = self._serialize.url('result_id', result_id, 'int') - query_parameters = {} - if sub_result_id is not None: - query_parameters['subResultId'] = self._serialize.query('sub_result_id', sub_result_id, 'int') - if type is not None: - query_parameters['type'] = self._serialize.query('type', type, 'str') - if directory_path is not None: - query_parameters['directoryPath'] = self._serialize.query('directory_path', directory_path, 'str') - if file_name_prefix is not None: - query_parameters['fileNamePrefix'] = self._serialize.query('file_name_prefix', file_name_prefix, 'str') - if fetch_meta_data is not None: - query_parameters['fetchMetaData'] = self._serialize.query('fetch_meta_data', fetch_meta_data, 'bool') - if top is not None: - query_parameters['top'] = self._serialize.query('top', top, 'int') - additional_headers = {} - if continuation_token is not None: - additional_headers['x-ms-continuationtoken'] = continuation_token - response = self._send(http_method='GET', - location_id='714caaac-ae1e-4869-8323-9bc0f5120dbf', - version='7.0-preview.1', - route_values=route_values, - query_parameters=query_parameters, - additional_headers=additional_headers) - return self._deserialize('[TestLog]', self._unwrap_collection(response)) - - def get_test_run_logs(self, project, run_id, type, directory_path=None, file_name_prefix=None, fetch_meta_data=None, top=None, continuation_token=None): - """GetTestRunLogs. - [Preview API] Get list of test run attachments reference - :param str project: Project ID or project name - :param int run_id: Id of the test run - :param str type: type of the attachments to get - :param str directory_path: directory path for which attachments are needed - :param str file_name_prefix: file name prefix to filter the list of attachment - :param bool fetch_meta_data: Default is false, set if metadata is needed - :param int top: Number of attachments reference to return - :param String continuation_token: Header to pass the continuationToken - :rtype: :class:`<[TestLog]> ` - """ - route_values = {} - if project is not None: - route_values['project'] = self._serialize.url('project', project, 'str') - if run_id is not None: - route_values['runId'] = self._serialize.url('run_id', run_id, 'int') - query_parameters = {} - if type is not None: - query_parameters['type'] = self._serialize.query('type', type, 'str') - if directory_path is not None: - query_parameters['directoryPath'] = self._serialize.query('directory_path', directory_path, 'str') - if file_name_prefix is not None: - query_parameters['fileNamePrefix'] = self._serialize.query('file_name_prefix', file_name_prefix, 'str') - if fetch_meta_data is not None: - query_parameters['fetchMetaData'] = self._serialize.query('fetch_meta_data', fetch_meta_data, 'bool') - if top is not None: - query_parameters['top'] = self._serialize.query('top', top, 'int') - additional_headers = {} - if continuation_token is not None: - additional_headers['x-ms-continuationtoken'] = continuation_token - response = self._send(http_method='GET', - location_id='5b47b946-e875-4c9a-acdc-2a20996caebe', - version='7.0-preview.1', - route_values=route_values, - query_parameters=query_parameters, - additional_headers=additional_headers) - return self._deserialize('[TestLog]', self._unwrap_collection(response)) - - def get_test_log_store_endpoint_details_for_result_log(self, project, run_id, result_id, type, file_path): - """GetTestLogStoreEndpointDetailsForResultLog. - [Preview API] Get SAS Uri of a test results attachment - :param str project: Project ID or project name - :param int run_id: Id of the test run that contains result - :param int result_id: Id of the test result whose files need to be downloaded - :param str type: type of the file - :param str file_path: filePath for which sas uri is needed - :rtype: :class:` ` - """ - route_values = {} - if project is not None: - route_values['project'] = self._serialize.url('project', project, 'str') - if run_id is not None: - route_values['runId'] = self._serialize.url('run_id', run_id, 'int') - if result_id is not None: - route_values['resultId'] = self._serialize.url('result_id', result_id, 'int') - query_parameters = {} - if type is not None: - query_parameters['type'] = self._serialize.query('type', type, 'str') - if file_path is not None: - query_parameters['filePath'] = self._serialize.query('file_path', file_path, 'str') - response = self._send(http_method='GET', - location_id='da630b37-1236-45b5-945e-1d7bdb673850', - version='7.0-preview.1', - route_values=route_values, - query_parameters=query_parameters) - return self._deserialize('TestLogStoreEndpointDetails', response) - - def get_test_log_store_endpoint_details_for_sub_result_log(self, project, run_id, result_id, sub_result_id, type, file_path): - """GetTestLogStoreEndpointDetailsForSubResultLog. - [Preview API] Get SAS Uri of a test subresults attachment - :param str project: Project ID or project name - :param int run_id: Id of the test run that contains result - :param int result_id: Id of the test result that contains subresult - :param int sub_result_id: Id of the test subresult whose file sas uri is needed - :param str type: type of the file - :param str file_path: filePath for which sas uri is needed - :rtype: :class:` ` - """ - route_values = {} - if project is not None: - route_values['project'] = self._serialize.url('project', project, 'str') - if run_id is not None: - route_values['runId'] = self._serialize.url('run_id', run_id, 'int') - if result_id is not None: - route_values['resultId'] = self._serialize.url('result_id', result_id, 'int') - query_parameters = {} - if sub_result_id is not None: - query_parameters['subResultId'] = self._serialize.query('sub_result_id', sub_result_id, 'int') - if type is not None: - query_parameters['type'] = self._serialize.query('type', type, 'str') - if file_path is not None: - query_parameters['filePath'] = self._serialize.query('file_path', file_path, 'str') - response = self._send(http_method='GET', - location_id='da630b37-1236-45b5-945e-1d7bdb673850', - version='7.0-preview.1', - route_values=route_values, - query_parameters=query_parameters) - return self._deserialize('TestLogStoreEndpointDetails', response) - - def test_log_store_endpoint_details_for_result(self, project, run_id, result_id, sub_result_id, file_path, type): - """TestLogStoreEndpointDetailsForResult. - [Preview API] Create empty file for a result and Get Sas uri for the file - :param str project: Project ID or project name - :param int run_id: Id of the test run that contains the result - :param int result_id: Id of the test results that contains sub result - :param int sub_result_id: Id of the test sub result whose file sas uri is needed - :param str file_path: file path inside the sub result for which sas uri is needed - :param str type: Type of the file for download - :rtype: :class:` ` - """ - route_values = {} - if project is not None: - route_values['project'] = self._serialize.url('project', project, 'str') - if run_id is not None: - route_values['runId'] = self._serialize.url('run_id', run_id, 'int') - if result_id is not None: - route_values['resultId'] = self._serialize.url('result_id', result_id, 'int') - query_parameters = {} - if sub_result_id is not None: - query_parameters['subResultId'] = self._serialize.query('sub_result_id', sub_result_id, 'int') - if file_path is not None: - query_parameters['filePath'] = self._serialize.query('file_path', file_path, 'str') - if type is not None: - query_parameters['type'] = self._serialize.query('type', type, 'str') - response = self._send(http_method='POST', - location_id='da630b37-1236-45b5-945e-1d7bdb673850', - version='7.0-preview.1', - route_values=route_values, - query_parameters=query_parameters) - return self._deserialize('TestLogStoreEndpointDetails', response) - - def get_test_log_store_endpoint_details_for_run_log(self, project, run_id, type, file_path): - """GetTestLogStoreEndpointDetailsForRunLog. - [Preview API] Get SAS Uri of a test run attachment - :param str project: Project ID or project name - :param int run_id: Id of the test run whose file has to be downloaded - :param str type: type of the file - :param str file_path: filePath for which sas uri is needed - :rtype: :class:` ` - """ - route_values = {} - if project is not None: - route_values['project'] = self._serialize.url('project', project, 'str') - if run_id is not None: - route_values['runId'] = self._serialize.url('run_id', run_id, 'int') - query_parameters = {} - if type is not None: - query_parameters['type'] = self._serialize.query('type', type, 'str') - if file_path is not None: - query_parameters['filePath'] = self._serialize.query('file_path', file_path, 'str') - response = self._send(http_method='GET', - location_id='67eb3f92-6c97-4fd9-8b63-6cbdc7e526ea', - version='7.0-preview.1', - route_values=route_values, - query_parameters=query_parameters) - return self._deserialize('TestLogStoreEndpointDetails', response) - - def test_log_store_endpoint_details_for_run(self, project, run_id, test_log_store_operation_type, file_path=None, type=None): - """TestLogStoreEndpointDetailsForRun. - [Preview API] Create empty file for a run and Get Sas uri for the file - :param str project: Project ID or project name - :param int run_id: Id of the run to get endpoint details - :param str test_log_store_operation_type: Type of operation to perform using sas uri - :param str file_path: file path to create an empty file - :param str type: Default is GeneralAttachment, type of empty file to be created - :rtype: :class:` ` - """ - route_values = {} - if project is not None: - route_values['project'] = self._serialize.url('project', project, 'str') - if run_id is not None: - route_values['runId'] = self._serialize.url('run_id', run_id, 'int') - query_parameters = {} - if test_log_store_operation_type is not None: - query_parameters['testLogStoreOperationType'] = self._serialize.query('test_log_store_operation_type', test_log_store_operation_type, 'str') - if file_path is not None: - query_parameters['filePath'] = self._serialize.query('file_path', file_path, 'str') - if type is not None: - query_parameters['type'] = self._serialize.query('type', type, 'str') - response = self._send(http_method='POST', - location_id='67eb3f92-6c97-4fd9-8b63-6cbdc7e526ea', - version='7.0-preview.1', - route_values=route_values, - query_parameters=query_parameters) - return self._deserialize('TestLogStoreEndpointDetails', response) - diff --git a/azure-devops/azure/devops/v7_0/__init__.py b/azure-devops/azure/devops/v7_2/__init__.py similarity index 100% rename from azure-devops/azure/devops/v7_0/__init__.py rename to azure-devops/azure/devops/v7_2/__init__.py diff --git a/azure-devops/azure/devops/v7_0/accounts/__init__.py b/azure-devops/azure/devops/v7_2/accounts/__init__.py similarity index 100% rename from azure-devops/azure/devops/v7_0/accounts/__init__.py rename to azure-devops/azure/devops/v7_2/accounts/__init__.py diff --git a/azure-devops/azure/devops/v7_0/accounts/accounts_client.py b/azure-devops/azure/devops/v7_2/accounts/accounts_client.py similarity index 91% rename from azure-devops/azure/devops/v7_0/accounts/accounts_client.py rename to azure-devops/azure/devops/v7_2/accounts/accounts_client.py index 0d9b8265..2c1055cc 100644 --- a/azure-devops/azure/devops/v7_0/accounts/accounts_client.py +++ b/azure-devops/azure/devops/v7_2/accounts/accounts_client.py @@ -27,7 +27,7 @@ def __init__(self, base_url=None, creds=None): def get_accounts(self, owner_id=None, member_id=None, properties=None): """GetAccounts. - Get a list of accounts for a specific owner or a specific member. One of the following parameters is required: ownerId, memberId. + [Preview API] Get a list of accounts for a specific owner or a specific member. One of the following parameters is required: ownerId, memberId. :param str owner_id: ID for the owner of the accounts. :param str member_id: ID for a member of the accounts. :param str properties: @@ -42,7 +42,7 @@ def get_accounts(self, owner_id=None, member_id=None, properties=None): query_parameters['properties'] = self._serialize.query('properties', properties, 'str') response = self._send(http_method='GET', location_id='229a6a53-b428-4ffb-a835-e8f36b5b4b1e', - version='7.0', + version='7.2-preview.1', query_parameters=query_parameters) return self._deserialize('[Account]', self._unwrap_collection(response)) diff --git a/azure-devops/azure/devops/v7_0/accounts/models.py b/azure-devops/azure/devops/v7_2/accounts/models.py similarity index 97% rename from azure-devops/azure/devops/v7_0/accounts/models.py rename to azure-devops/azure/devops/v7_2/accounts/models.py index 6d5c5bd9..e39df4bf 100644 --- a/azure-devops/azure/devops/v7_0/accounts/models.py +++ b/azure-devops/azure/devops/v7_2/accounts/models.py @@ -40,7 +40,7 @@ class Account(Model): :param organization_name: Organization that created the account :type organization_name: str :param properties: Extended properties - :type properties: :class:`object ` + :type properties: :class:`object ` :param status_reason: Reason for current status :type status_reason: str """ @@ -93,9 +93,9 @@ class AccountCreateInfoInternal(Model): :param organization: :type organization: str :param preferences: - :type preferences: :class:`AccountPreferencesInternal ` + :type preferences: :class:`AccountPreferencesInternal ` :param properties: - :type properties: :class:`object ` + :type properties: :class:`object ` :param service_definitions: :type service_definitions: list of { key: str; value: str } """ diff --git a/azure-devops/azure/devops/v7_0/audit/__init__.py b/azure-devops/azure/devops/v7_2/audit/__init__.py similarity index 100% rename from azure-devops/azure/devops/v7_0/audit/__init__.py rename to azure-devops/azure/devops/v7_2/audit/__init__.py diff --git a/azure-devops/azure/devops/v7_0/audit/audit_client.py b/azure-devops/azure/devops/v7_2/audit/audit_client.py similarity index 90% rename from azure-devops/azure/devops/v7_0/audit/audit_client.py rename to azure-devops/azure/devops/v7_2/audit/audit_client.py index 5b61a293..21443c60 100644 --- a/azure-devops/azure/devops/v7_0/audit/audit_client.py +++ b/azure-devops/azure/devops/v7_2/audit/audit_client.py @@ -36,7 +36,7 @@ def get_actions(self, area_name=None): query_parameters['areaName'] = self._serialize.query('area_name', area_name, 'str') response = self._send(http_method='GET', location_id='6fa30b9a-9558-4e3b-a95f-a12572caa6e6', - version='7.0-preview.1', + version='7.2-preview.1', query_parameters=query_parameters) return self._deserialize('[AuditActionInfo]', self._unwrap_collection(response)) @@ -48,7 +48,7 @@ def query_log(self, start_time=None, end_time=None, batch_size=None, continuatio :param int batch_size: Max number of results to return. Optional :param str continuation_token: Token used for returning next set of results from previous query. Optional :param bool skip_aggregation: Skips aggregating events and leaves them as individual entries instead. By default events are aggregated. Event types that are aggregated: AuditLog.AccessLog. - :rtype: :class:` ` + :rtype: :class:` ` """ query_parameters = {} if start_time is not None: @@ -63,7 +63,7 @@ def query_log(self, start_time=None, end_time=None, batch_size=None, continuatio query_parameters['skipAggregation'] = self._serialize.query('skip_aggregation', skip_aggregation, 'bool') response = self._send(http_method='GET', location_id='4e5fa14f-7097-4b73-9c85-00abc7353c61', - version='7.0-preview.1', + version='7.2-preview.1', query_parameters=query_parameters) return self._deserialize('AuditLogQueryResult', response) @@ -84,7 +84,7 @@ def download_log(self, format, start_time=None, end_time=None, **kwargs): query_parameters['endTime'] = self._serialize.query('end_time', end_time, 'iso-8601') response = self._send(http_method='GET', location_id='b7b98a76-04e8-4f4d-ac72-9d46492caaac', - version='7.0-preview.1', + version='7.2-preview.1', query_parameters=query_parameters, accept_media_type='application/octet-stream') if "callback" in kwargs: @@ -96,9 +96,9 @@ def download_log(self, format, start_time=None, end_time=None, **kwargs): def create_stream(self, stream, days_to_backfill): """CreateStream. [Preview API] Create new Audit Stream - :param :class:` ` stream: Stream entry + :param :class:` ` stream: Stream entry :param int days_to_backfill: The number of days of previously recorded audit data that will be replayed into the stream. A value of zero will result in only new events being streamed. - :rtype: :class:` ` + :rtype: :class:` ` """ query_parameters = {} if days_to_backfill is not None: @@ -106,7 +106,7 @@ def create_stream(self, stream, days_to_backfill): content = self._serialize.body(stream, 'AuditStream') response = self._send(http_method='POST', location_id='77d60bf9-1882-41c5-a90d-3a6d3c13fd3b', - version='7.0-preview.1', + version='7.2-preview.1', query_parameters=query_parameters, content=content) return self._deserialize('AuditStream', response) @@ -121,7 +121,7 @@ def delete_stream(self, stream_id): route_values['streamId'] = self._serialize.url('stream_id', stream_id, 'int') self._send(http_method='DELETE', location_id='77d60bf9-1882-41c5-a90d-3a6d3c13fd3b', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) def query_all_streams(self): @@ -131,21 +131,21 @@ def query_all_streams(self): """ response = self._send(http_method='GET', location_id='77d60bf9-1882-41c5-a90d-3a6d3c13fd3b', - version='7.0-preview.1') + version='7.2-preview.1') return self._deserialize('[AuditStream]', self._unwrap_collection(response)) def query_stream_by_id(self, stream_id): """QueryStreamById. [Preview API] Return Audit Stream with id of streamId if one exists otherwise throw :param int stream_id: Id of stream entry to retrieve - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if stream_id is not None: route_values['streamId'] = self._serialize.url('stream_id', stream_id, 'int') response = self._send(http_method='GET', location_id='77d60bf9-1882-41c5-a90d-3a6d3c13fd3b', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) return self._deserialize('AuditStream', response) @@ -154,7 +154,7 @@ def update_status(self, stream_id, status): [Preview API] Update existing Audit Stream status :param int stream_id: Id of stream entry to be updated :param str status: Status of the stream - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if stream_id is not None: @@ -164,7 +164,7 @@ def update_status(self, stream_id, status): query_parameters['status'] = self._serialize.query('status', status, 'str') response = self._send(http_method='PUT', location_id='77d60bf9-1882-41c5-a90d-3a6d3c13fd3b', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('AuditStream', response) @@ -172,13 +172,13 @@ def update_status(self, stream_id, status): def update_stream(self, stream): """UpdateStream. [Preview API] Update existing Audit Stream - :param :class:` ` stream: Stream entry - :rtype: :class:` ` + :param :class:` ` stream: Stream entry + :rtype: :class:` ` """ content = self._serialize.body(stream, 'AuditStream') response = self._send(http_method='PUT', location_id='77d60bf9-1882-41c5-a90d-3a6d3c13fd3b', - version='7.0-preview.1', + version='7.2-preview.1', content=content) return self._deserialize('AuditStream', response) diff --git a/azure-devops/azure/devops/v7_0/audit/models.py b/azure-devops/azure/devops/v7_2/audit/models.py similarity index 90% rename from azure-devops/azure/devops/v7_0/audit/models.py rename to azure-devops/azure/devops/v7_2/audit/models.py index a3fddd37..11d06524 100644 --- a/azure-devops/azure/devops/v7_0/audit/models.py +++ b/azure-devops/azure/devops/v7_2/audit/models.py @@ -38,11 +38,13 @@ class AuditLogEntry(Model): :type action_id: str :param activity_id: ActivityId :type activity_id: str + :param actor_client_id: The Actor's Client Id (if actor is a service principal) + :type actor_client_id: str :param actor_cUID: The Actor's CUID :type actor_cUID: str :param actor_uPN: The Actor's UPN :type actor_uPN: str - :param actor_user_id: The Actor's User Id + :param actor_user_id: The Actor's User Id (if actor is a user) :type actor_user_id: str :param authentication_mechanism: Type of authentication used by the author :type authentication_mechanism: str @@ -69,6 +71,7 @@ class AuditLogEntry(Model): _attribute_map = { 'action_id': {'key': 'actionId', 'type': 'str'}, 'activity_id': {'key': 'activityId', 'type': 'str'}, + 'actor_client_id': {'key': 'actorClientId', 'type': 'str'}, 'actor_cUID': {'key': 'actorCUID', 'type': 'str'}, 'actor_uPN': {'key': 'actorUPN', 'type': 'str'}, 'actor_user_id': {'key': 'actorUserId', 'type': 'str'}, @@ -84,10 +87,11 @@ class AuditLogEntry(Model): 'user_agent': {'key': 'userAgent', 'type': 'str'} } - def __init__(self, action_id=None, activity_id=None, actor_cUID=None, actor_uPN=None, actor_user_id=None, authentication_mechanism=None, correlation_id=None, data=None, id=None, ip_address=None, project_id=None, scope_id=None, scope_type=None, timestamp=None, user_agent=None): + def __init__(self, action_id=None, activity_id=None, actor_client_id=None, actor_cUID=None, actor_uPN=None, actor_user_id=None, authentication_mechanism=None, correlation_id=None, data=None, id=None, ip_address=None, project_id=None, scope_id=None, scope_type=None, timestamp=None, user_agent=None): super(AuditLogEntry, self).__init__() self.action_id = action_id self.activity_id = activity_id + self.actor_client_id = actor_client_id self.actor_cUID = actor_cUID self.actor_uPN = actor_uPN self.actor_user_id = actor_user_id @@ -110,7 +114,7 @@ class AuditLogQueryResult(Model): :param continuation_token: The continuation token to pass to get the next set of results :type continuation_token: str :param decorated_audit_log_entries: The list of audit log entries - :type decorated_audit_log_entries: list of :class:`DecoratedAuditLogEntry ` + :type decorated_audit_log_entries: list of :class:`DecoratedAuditLogEntry ` :param has_more: True when there are more matching results to be fetched, false otherwise. :type has_more: bool """ @@ -179,6 +183,8 @@ class DecoratedAuditLogEntry(Model): :type action_id: str :param activity_id: ActivityId :type activity_id: str + :param actor_client_id: The Actor's Client Id (if actor is a service principal) + :type actor_client_id: str :param actor_cUID: The Actor's CUID :type actor_cUID: str :param actor_display_name: DisplayName of the user who initiated the action @@ -187,7 +193,7 @@ class DecoratedAuditLogEntry(Model): :type actor_image_url: str :param actor_uPN: The Actor's UPN :type actor_uPN: str - :param actor_user_id: The Actor's User Id + :param actor_user_id: The Actor's User Id (if actor is a user) :type actor_user_id: str :param area: Area of Azure DevOps the action occurred :type area: str @@ -226,6 +232,7 @@ class DecoratedAuditLogEntry(Model): _attribute_map = { 'action_id': {'key': 'actionId', 'type': 'str'}, 'activity_id': {'key': 'activityId', 'type': 'str'}, + 'actor_client_id': {'key': 'actorClientId', 'type': 'str'}, 'actor_cUID': {'key': 'actorCUID', 'type': 'str'}, 'actor_display_name': {'key': 'actorDisplayName', 'type': 'str'}, 'actor_image_url': {'key': 'actorImageUrl', 'type': 'str'}, @@ -249,10 +256,11 @@ class DecoratedAuditLogEntry(Model): 'user_agent': {'key': 'userAgent', 'type': 'str'} } - def __init__(self, action_id=None, activity_id=None, actor_cUID=None, actor_display_name=None, actor_image_url=None, actor_uPN=None, actor_user_id=None, area=None, authentication_mechanism=None, category=None, category_display_name=None, correlation_id=None, data=None, details=None, id=None, ip_address=None, project_id=None, project_name=None, scope_display_name=None, scope_id=None, scope_type=None, timestamp=None, user_agent=None): + def __init__(self, action_id=None, activity_id=None, actor_client_id=None, actor_cUID=None, actor_display_name=None, actor_image_url=None, actor_uPN=None, actor_user_id=None, area=None, authentication_mechanism=None, category=None, category_display_name=None, correlation_id=None, data=None, details=None, id=None, ip_address=None, project_id=None, project_name=None, scope_display_name=None, scope_id=None, scope_type=None, timestamp=None, user_agent=None): super(DecoratedAuditLogEntry, self).__init__() self.action_id = action_id self.activity_id = activity_id + self.actor_client_id = actor_client_id self.actor_cUID = actor_cUID self.actor_display_name = actor_display_name self.actor_image_url = actor_image_url diff --git a/azure-devops/azure/devops/v7_0/build/__init__.py b/azure-devops/azure/devops/v7_2/build/__init__.py similarity index 100% rename from azure-devops/azure/devops/v7_0/build/__init__.py rename to azure-devops/azure/devops/v7_2/build/__init__.py index c0d17df7..7c9a0547 100644 --- a/azure-devops/azure/devops/v7_0/build/__init__.py +++ b/azure-devops/azure/devops/v7_2/build/__init__.py @@ -49,13 +49,13 @@ 'BuildRetentionHistory', 'BuildRetentionSample', 'BuildSettings', + 'Change', 'DataSourceBindingBase', 'DefinitionReference', 'DefinitionResourceReference', 'Deployment', 'Folder', 'GraphSubjectBase', - 'Change', 'IdentityRef', 'Issue', 'JobReference', diff --git a/azure-devops/azure/devops/v7_0/build/build_client.py b/azure-devops/azure/devops/v7_2/build/build_client.py similarity index 88% rename from azure-devops/azure/devops/v7_0/build/build_client.py rename to azure-devops/azure/devops/v7_2/build/build_client.py index fb1c6689..4e8a301e 100644 --- a/azure-devops/azure/devops/v7_0/build/build_client.py +++ b/azure-devops/azure/devops/v7_2/build/build_client.py @@ -27,11 +27,11 @@ def __init__(self, base_url=None, creds=None): def create_artifact(self, artifact, project, build_id): """CreateArtifact. - Associates an artifact with a build. - :param :class:` ` artifact: The artifact. + [Preview API] Associates an artifact with a build. + :param :class:` ` artifact: The artifact. :param str project: Project ID or project name :param int build_id: The ID of the build. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -41,18 +41,18 @@ def create_artifact(self, artifact, project, build_id): content = self._serialize.body(artifact, 'BuildArtifact') response = self._send(http_method='POST', location_id='1db06c96-014e-44e1-ac91-90b2d4b3e984', - version='7.0', + version='7.2-preview.5', route_values=route_values, content=content) return self._deserialize('BuildArtifact', response) def get_artifact(self, project, build_id, artifact_name): """GetArtifact. - Gets a specific artifact for a build. + [Preview API] Gets a specific artifact for a build. :param str project: Project ID or project name :param int build_id: The ID of the build. :param str artifact_name: The name of the artifact. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -64,14 +64,14 @@ def get_artifact(self, project, build_id, artifact_name): query_parameters['artifactName'] = self._serialize.query('artifact_name', artifact_name, 'str') response = self._send(http_method='GET', location_id='1db06c96-014e-44e1-ac91-90b2d4b3e984', - version='7.0', + version='7.2-preview.5', route_values=route_values, query_parameters=query_parameters) return self._deserialize('BuildArtifact', response) def get_artifact_content_zip(self, project, build_id, artifact_name, **kwargs): """GetArtifactContentZip. - Gets a specific artifact for a build. + [Preview API] Gets a specific artifact for a build. :param str project: Project ID or project name :param int build_id: The ID of the build. :param str artifact_name: The name of the artifact. @@ -87,7 +87,7 @@ def get_artifact_content_zip(self, project, build_id, artifact_name, **kwargs): query_parameters['artifactName'] = self._serialize.query('artifact_name', artifact_name, 'str') response = self._send(http_method='GET', location_id='1db06c96-014e-44e1-ac91-90b2d4b3e984', - version='7.0', + version='7.2-preview.5', route_values=route_values, query_parameters=query_parameters, accept_media_type='application/zip') @@ -99,7 +99,7 @@ def get_artifact_content_zip(self, project, build_id, artifact_name, **kwargs): def get_artifacts(self, project, build_id): """GetArtifacts. - Gets all artifacts for a build. + [Preview API] Gets all artifacts for a build. :param str project: Project ID or project name :param int build_id: The ID of the build. :rtype: [BuildArtifact] @@ -111,13 +111,13 @@ def get_artifacts(self, project, build_id): route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') response = self._send(http_method='GET', location_id='1db06c96-014e-44e1-ac91-90b2d4b3e984', - version='7.0', + version='7.2-preview.5', route_values=route_values) return self._deserialize('[BuildArtifact]', self._unwrap_collection(response)) def get_file(self, project, build_id, artifact_name, file_id, file_name, **kwargs): """GetFile. - Gets a file from the build. + [Preview API] Gets a file from the build. :param str project: Project ID or project name :param int build_id: The ID of the build. :param str artifact_name: The name of the artifact. @@ -139,7 +139,7 @@ def get_file(self, project, build_id, artifact_name, file_id, file_name, **kwarg query_parameters['fileName'] = self._serialize.query('file_name', file_name, 'str') response = self._send(http_method='GET', location_id='1db06c96-014e-44e1-ac91-90b2d4b3e984', - version='7.0', + version='7.2-preview.5', route_values=route_values, query_parameters=query_parameters, accept_media_type='application/octet-stream') @@ -151,7 +151,7 @@ def get_file(self, project, build_id, artifact_name, file_id, file_name, **kwarg def get_attachments(self, project, build_id, type): """GetAttachments. - Gets the list of attachments of a specific type that are associated with a build. + [Preview API] Gets the list of attachments of a specific type that are associated with a build. :param str project: Project ID or project name :param int build_id: The ID of the build. :param str type: The type of attachment. @@ -166,13 +166,13 @@ def get_attachments(self, project, build_id, type): route_values['type'] = self._serialize.url('type', type, 'str') response = self._send(http_method='GET', location_id='f2192269-89fa-4f94-baf6-8fb128c55159', - version='7.0', + version='7.2-preview.2', route_values=route_values) return self._deserialize('[Attachment]', self._unwrap_collection(response)) def get_attachment(self, project, build_id, timeline_id, record_id, type, name, **kwargs): """GetAttachment. - Gets a specific attachment. + [Preview API] Gets a specific attachment. :param str project: Project ID or project name :param int build_id: The ID of the build. :param str timeline_id: The ID of the timeline. @@ -196,7 +196,7 @@ def get_attachment(self, project, build_id, timeline_id, record_id, type, name, route_values['name'] = self._serialize.url('name', name, 'str') response = self._send(http_method='GET', location_id='af5122d3-3438-485e-a25a-2dbbfde84ee6', - version='7.0', + version='7.2-preview.2', route_values=route_values, accept_media_type='application/octet-stream') if "callback" in kwargs: @@ -218,7 +218,7 @@ def authorize_project_resources(self, resources, project): content = self._serialize.body(resources, '[DefinitionResourceReference]') response = self._send(http_method='PATCH', location_id='398c85bc-81aa-4822-947c-a194a05f0fef', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('[DefinitionResourceReference]', self._unwrap_collection(response)) @@ -241,14 +241,14 @@ def get_project_resources(self, project, type=None, id=None): query_parameters['id'] = self._serialize.query('id', id, 'str') response = self._send(http_method='GET', location_id='398c85bc-81aa-4822-947c-a194a05f0fef', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[DefinitionResourceReference]', self._unwrap_collection(response)) def list_branches(self, project, provider_name, service_endpoint_id=None, repository=None, branch_name=None): """ListBranches. - Gets a list of branches for the given source code repository. + [Preview API] Gets a list of branches for the given source code repository. :param str project: Project ID or project name :param str provider_name: The name of the source provider. :param str service_endpoint_id: If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit. @@ -270,7 +270,7 @@ def list_branches(self, project, provider_name, service_endpoint_id=None, reposi query_parameters['branchName'] = self._serialize.query('branch_name', branch_name, 'str') response = self._send(http_method='GET', location_id='e05d4403-9b81-4244-8763-20fde28d1976', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[str]', self._unwrap_collection(response)) @@ -282,7 +282,7 @@ def get_build_badge(self, project, repo_type, repo_id=None, branch_name=None): :param str repo_type: The repository type. :param str repo_id: The repository ID. :param str branch_name: The branch name. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -296,7 +296,7 @@ def get_build_badge(self, project, repo_type, repo_id=None, branch_name=None): query_parameters['branchName'] = self._serialize.query('branch_name', branch_name, 'str') response = self._send(http_method='GET', location_id='21b3b9ce-fad5-4567-9ad0-80679794e003', - version='7.0-preview.2', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters) return self._deserialize('BuildBadge', response) @@ -322,14 +322,14 @@ def get_build_badge_data(self, project, repo_type, repo_id=None, branch_name=Non query_parameters['branchName'] = self._serialize.query('branch_name', branch_name, 'str') response = self._send(http_method='GET', location_id='21b3b9ce-fad5-4567-9ad0-80679794e003', - version='7.0-preview.2', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters) return self._deserialize('str', response) def get_retention_leases_for_build(self, project, build_id): """GetRetentionLeasesForBuild. - Gets all retention leases that apply to a specific build. + [Preview API] Gets all retention leases that apply to a specific build. :param str project: Project ID or project name :param int build_id: The ID of the build. :rtype: [RetentionLease] @@ -341,13 +341,13 @@ def get_retention_leases_for_build(self, project, build_id): route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') response = self._send(http_method='GET', location_id='3da19a6a-f088-45c4-83ce-2ad3a87be6c4', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('[RetentionLease]', self._unwrap_collection(response)) def delete_build(self, project, build_id): """DeleteBuild. - Deletes a build. + [Preview API] Deletes a build. :param str project: Project ID or project name :param int build_id: The ID of the build. """ @@ -358,16 +358,16 @@ def delete_build(self, project, build_id): route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') self._send(http_method='DELETE', location_id='0cd358e1-9217-4d94-8269-1c1ee6f93dcf', - version='7.0', + version='7.2-preview.7', route_values=route_values) def get_build(self, project, build_id, property_filters=None): """GetBuild. - Gets a build + [Preview API] Gets a build :param str project: Project ID or project name :param int build_id: :param str property_filters: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -379,14 +379,14 @@ def get_build(self, project, build_id, property_filters=None): query_parameters['propertyFilters'] = self._serialize.query('property_filters', property_filters, 'str') response = self._send(http_method='GET', location_id='0cd358e1-9217-4d94-8269-1c1ee6f93dcf', - version='7.0', + version='7.2-preview.7', route_values=route_values, query_parameters=query_parameters) return self._deserialize('Build', response) def get_builds(self, project, definitions=None, queues=None, build_number=None, min_time=None, max_time=None, requested_for=None, reason_filter=None, status_filter=None, result_filter=None, tag_filters=None, properties=None, top=None, continuation_token=None, max_builds_per_definition=None, deleted_filter=None, query_order=None, branch_name=None, build_ids=None, repository_id=None, repository_type=None): """GetBuilds. - Gets a list of builds. + [Preview API] Gets a list of builds. :param str project: Project ID or project name :param [int] definitions: A comma-delimited list of definition IDs. If specified, filters to builds for these definitions. :param [int] queues: A comma-delimited list of queue IDs. If specified, filters to builds that ran against these queues. @@ -408,7 +408,7 @@ def get_builds(self, project, definitions=None, queues=None, build_number=None, :param [int] build_ids: A comma-delimited list that specifies the IDs of builds to retrieve. :param str repository_id: If specified, filters to builds that built from this repository. :param str repository_type: If specified, filters to builds that built from repositories of this type. - :rtype: :class:`<[Build]> ` + :rtype: :class:`<[Build]> ` """ route_values = {} if project is not None: @@ -461,21 +461,21 @@ def get_builds(self, project, definitions=None, queues=None, build_number=None, query_parameters['repositoryType'] = self._serialize.query('repository_type', repository_type, 'str') response = self._send(http_method='GET', location_id='0cd358e1-9217-4d94-8269-1c1ee6f93dcf', - version='7.0', + version='7.2-preview.7', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[Build]', self._unwrap_collection(response)) def queue_build(self, build, project, ignore_warnings=None, check_in_ticket=None, source_build_id=None, definition_id=None): """QueueBuild. - Queues a build - :param :class:` ` build: + [Preview API] Queues a build + :param :class:` ` build: :param str project: Project ID or project name :param bool ignore_warnings: :param str check_in_ticket: :param int source_build_id: :param int definition_id: Optional definition id to queue a build without a body. Ignored if there's a valid body - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -492,7 +492,7 @@ def queue_build(self, build, project, ignore_warnings=None, check_in_ticket=None content = self._serialize.body(build, 'Build') response = self._send(http_method='POST', location_id='0cd358e1-9217-4d94-8269-1c1ee6f93dcf', - version='7.0', + version='7.2-preview.7', route_values=route_values, query_parameters=query_parameters, content=content) @@ -500,12 +500,12 @@ def queue_build(self, build, project, ignore_warnings=None, check_in_ticket=None def update_build(self, build, project, build_id, retry=None): """UpdateBuild. - Updates a build. - :param :class:` ` build: The build. + [Preview API] Updates a build. + :param :class:` ` build: The build. :param str project: Project ID or project name :param int build_id: The ID of the build. :param bool retry: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -518,7 +518,7 @@ def update_build(self, build, project, build_id, retry=None): content = self._serialize.body(build, 'Build') response = self._send(http_method='PATCH', location_id='0cd358e1-9217-4d94-8269-1c1ee6f93dcf', - version='7.0', + version='7.2-preview.7', route_values=route_values, query_parameters=query_parameters, content=content) @@ -526,7 +526,7 @@ def update_build(self, build, project, build_id, retry=None): def update_builds(self, builds, project): """UpdateBuilds. - Updates multiple builds. + [Preview API] Updates multiple builds. :param [Build] builds: The builds to update. :param str project: Project ID or project name :rtype: [Build] @@ -537,29 +537,84 @@ def update_builds(self, builds, project): content = self._serialize.body(builds, '[Build]') response = self._send(http_method='PATCH', location_id='0cd358e1-9217-4d94-8269-1c1ee6f93dcf', - version='7.0', + version='7.2-preview.7', route_values=route_values, content=content) return self._deserialize('[Build]', self._unwrap_collection(response)) + def get_build_changes(self, project, build_id, continuation_token=None, top=None, include_source_change=None): + """GetBuildChanges. + [Preview API] Gets the changes associated with a build + :param str project: Project ID or project name + :param int build_id: + :param str continuation_token: + :param int top: The maximum number of changes to return + :param bool include_source_change: + :rtype: :class:`<[Change]> ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if build_id is not None: + route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') + query_parameters = {} + if continuation_token is not None: + query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query('top', top, 'int') + if include_source_change is not None: + query_parameters['includeSourceChange'] = self._serialize.query('include_source_change', include_source_change, 'bool') + response = self._send(http_method='GET', + location_id='54572c7b-bbd3-45d4-80dc-28be08941620', + version='7.2-preview.2', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('[Change]', self._unwrap_collection(response)) + + def get_changes_between_builds(self, project, from_build_id=None, to_build_id=None, top=None): + """GetChangesBetweenBuilds. + [Preview API] Gets the changes made to the repository between two given builds. + :param str project: Project ID or project name + :param int from_build_id: The ID of the first build. + :param int to_build_id: The ID of the last build. + :param int top: The maximum number of changes to return. + :rtype: [Change] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if from_build_id is not None: + query_parameters['fromBuildId'] = self._serialize.query('from_build_id', from_build_id, 'int') + if to_build_id is not None: + query_parameters['toBuildId'] = self._serialize.query('to_build_id', to_build_id, 'int') + if top is not None: + query_parameters['$top'] = self._serialize.query('top', top, 'int') + response = self._send(http_method='GET', + location_id='f10f0ea5-18a1-43ec-a8fb-2042c7be9b43', + version='7.2-preview.2', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('[Change]', self._unwrap_collection(response)) + def get_build_controller(self, controller_id): """GetBuildController. - Gets a controller + [Preview API] Gets a controller :param int controller_id: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if controller_id is not None: route_values['controllerId'] = self._serialize.url('controller_id', controller_id, 'int') response = self._send(http_method='GET', location_id='fcac1932-2ee1-437f-9b6f-7f696be858f6', - version='7.0', + version='7.2-preview.2', route_values=route_values) return self._deserialize('BuildController', response) def get_build_controllers(self, name=None): """GetBuildControllers. - Gets controller, optionally filtered by name + [Preview API] Gets controller, optionally filtered by name :param str name: :rtype: [BuildController] """ @@ -568,18 +623,18 @@ def get_build_controllers(self, name=None): query_parameters['name'] = self._serialize.query('name', name, 'str') response = self._send(http_method='GET', location_id='fcac1932-2ee1-437f-9b6f-7f696be858f6', - version='7.0', + version='7.2-preview.2', query_parameters=query_parameters) return self._deserialize('[BuildController]', self._unwrap_collection(response)) def create_definition(self, definition, project, definition_to_clone_id=None, definition_to_clone_revision=None): """CreateDefinition. - Creates a new definition. - :param :class:` ` definition: The definition. + [Preview API] Creates a new definition. + :param :class:` ` definition: The definition. :param str project: Project ID or project name :param int definition_to_clone_id: :param int definition_to_clone_revision: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -592,7 +647,7 @@ def create_definition(self, definition, project, definition_to_clone_id=None, de content = self._serialize.body(definition, 'BuildDefinition') response = self._send(http_method='POST', location_id='dbeaf647-6167-421a-bda9-c9327b25e2e6', - version='7.0', + version='7.2-preview.7', route_values=route_values, query_parameters=query_parameters, content=content) @@ -600,7 +655,7 @@ def create_definition(self, definition, project, definition_to_clone_id=None, de def delete_definition(self, project, definition_id): """DeleteDefinition. - Deletes a definition and all associated builds. + [Preview API] Deletes a definition and all associated builds. :param str project: Project ID or project name :param int definition_id: The ID of the definition. """ @@ -611,19 +666,19 @@ def delete_definition(self, project, definition_id): route_values['definitionId'] = self._serialize.url('definition_id', definition_id, 'int') self._send(http_method='DELETE', location_id='dbeaf647-6167-421a-bda9-c9327b25e2e6', - version='7.0', + version='7.2-preview.7', route_values=route_values) def get_definition(self, project, definition_id, revision=None, min_metrics_time=None, property_filters=None, include_latest_builds=None): """GetDefinition. - Gets a definition, optionally at a specific revision. + [Preview API] Gets a definition, optionally at a specific revision. :param str project: Project ID or project name :param int definition_id: The ID of the definition. :param int revision: The revision number to retrieve. If this is not specified, the latest version will be returned. :param datetime min_metrics_time: If specified, indicates the date from which metrics should be included. :param [str] property_filters: A comma-delimited list of properties to include in the results. :param bool include_latest_builds: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -642,14 +697,14 @@ def get_definition(self, project, definition_id, revision=None, min_metrics_time query_parameters['includeLatestBuilds'] = self._serialize.query('include_latest_builds', include_latest_builds, 'bool') response = self._send(http_method='GET', location_id='dbeaf647-6167-421a-bda9-c9327b25e2e6', - version='7.0', + version='7.2-preview.7', route_values=route_values, query_parameters=query_parameters) return self._deserialize('BuildDefinition', response) def get_definitions(self, project, name=None, repository_id=None, repository_type=None, query_order=None, top=None, continuation_token=None, min_metrics_time=None, definition_ids=None, path=None, built_after=None, not_built_after=None, include_all_properties=None, include_latest_builds=None, task_id_filter=None, process_type=None, yaml_filename=None): """GetDefinitions. - Gets a list of definitions. + [Preview API] Gets a list of definitions. :param str project: Project ID or project name :param str name: If specified, filters to definitions whose names match this pattern. :param str repository_id: A repository ID. If specified, filters to definitions that use this repository. @@ -667,7 +722,7 @@ def get_definitions(self, project, name=None, repository_id=None, repository_typ :param str task_id_filter: If specified, filters to definitions that use the specified task. :param int process_type: If specified, filters to definitions with the given process type. :param str yaml_filename: If specified, filters to YAML definitions that match the given filename. To use this filter includeAllProperties should be set to true - :rtype: :class:`<[BuildDefinitionReference]> ` + :rtype: :class:`<[BuildDefinitionReference]> ` """ route_values = {} if project is not None: @@ -708,18 +763,18 @@ def get_definitions(self, project, name=None, repository_id=None, repository_typ query_parameters['yamlFilename'] = self._serialize.query('yaml_filename', yaml_filename, 'str') response = self._send(http_method='GET', location_id='dbeaf647-6167-421a-bda9-c9327b25e2e6', - version='7.0', + version='7.2-preview.7', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[BuildDefinitionReference]', self._unwrap_collection(response)) def restore_definition(self, project, definition_id, deleted): """RestoreDefinition. - Restores a deleted definition + [Preview API] Restores a deleted definition :param str project: Project ID or project name :param int definition_id: The identifier of the definition to restore. :param bool deleted: When false, restores a deleted definition. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -731,20 +786,20 @@ def restore_definition(self, project, definition_id, deleted): query_parameters['deleted'] = self._serialize.query('deleted', deleted, 'bool') response = self._send(http_method='PATCH', location_id='dbeaf647-6167-421a-bda9-c9327b25e2e6', - version='7.0', + version='7.2-preview.7', route_values=route_values, query_parameters=query_parameters) return self._deserialize('BuildDefinition', response) def update_definition(self, definition, project, definition_id, secrets_source_definition_id=None, secrets_source_definition_revision=None): """UpdateDefinition. - Updates an existing build definition. In order for this operation to succeed, the value of the "Revision" property of the request body must match the existing build definition's. It is recommended that you obtain the existing build definition by using GET, modify the build definition as necessary, and then submit the modified definition with PUT. - :param :class:` ` definition: The new version of the definition. Its "Revision" property must match the existing definition for the update to be accepted. + [Preview API] Updates an existing build definition. In order for this operation to succeed, the value of the "Revision" property of the request body must match the existing build definition's. It is recommended that you obtain the existing build definition by using GET, modify the build definition as necessary, and then submit the modified definition with PUT. + :param :class:` ` definition: The new version of the definition. Its "Revision" property must match the existing definition for the update to be accepted. :param str project: Project ID or project name :param int definition_id: The ID of the definition. :param int secrets_source_definition_id: :param int secrets_source_definition_revision: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -759,7 +814,7 @@ def update_definition(self, definition, project, definition_id, secrets_source_d content = self._serialize.body(definition, 'BuildDefinition') response = self._send(http_method='PUT', location_id='dbeaf647-6167-421a-bda9-c9327b25e2e6', - version='7.0', + version='7.2-preview.7', route_values=route_values, query_parameters=query_parameters, content=content) @@ -767,7 +822,7 @@ def update_definition(self, definition, project, definition_id, secrets_source_d def get_file_contents(self, project, provider_name, service_endpoint_id=None, repository=None, commit_or_branch=None, path=None, **kwargs): """GetFileContents. - Gets the contents of a file in the given source code repository. + [Preview API] Gets the contents of a file in the given source code repository. :param str project: Project ID or project name :param str provider_name: The name of the source provider. :param str service_endpoint_id: If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit. @@ -792,7 +847,7 @@ def get_file_contents(self, project, provider_name, service_endpoint_id=None, re query_parameters['path'] = self._serialize.query('path', path, 'str') response = self._send(http_method='GET', location_id='29d12225-b1d9-425f-b668-6c594a981313', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters, accept_media_type='text/plain') @@ -805,10 +860,10 @@ def get_file_contents(self, project, provider_name, service_endpoint_id=None, re def create_folder(self, folder, project, path): """CreateFolder. [Preview API] Creates a new folder. - :param :class:` ` folder: The folder. + :param :class:` ` folder: The folder. :param str project: Project ID or project name :param str path: The full path of the folder. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -819,7 +874,7 @@ def create_folder(self, folder, project, path): content = self._serialize.body(folder, 'Folder') response = self._send(http_method='PUT', location_id='a906531b-d2da-4f55-bda7-f3e676cc50d9', - version='7.0-preview.2', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters, content=content) @@ -839,7 +894,7 @@ def delete_folder(self, project, path): query_parameters['path'] = self._serialize.query('path', path, 'str') self._send(http_method='DELETE', location_id='a906531b-d2da-4f55-bda7-f3e676cc50d9', - version='7.0-preview.2', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters) @@ -861,7 +916,7 @@ def get_folders(self, project, path=None, query_order=None): query_parameters['queryOrder'] = self._serialize.query('query_order', query_order, 'str') response = self._send(http_method='GET', location_id='a906531b-d2da-4f55-bda7-f3e676cc50d9', - version='7.0-preview.2', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[Folder]', self._unwrap_collection(response)) @@ -869,10 +924,10 @@ def get_folders(self, project, path=None, query_order=None): def update_folder(self, folder, project, path): """UpdateFolder. [Preview API] Updates an existing folder at given existing path - :param :class:` ` folder: The new version of the folder. + :param :class:` ` folder: The new version of the folder. :param str project: Project ID or project name :param str path: The full path to the folder. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -883,7 +938,7 @@ def update_folder(self, folder, project, path): content = self._serialize.body(folder, 'Folder') response = self._send(http_method='POST', location_id='a906531b-d2da-4f55-bda7-f3e676cc50d9', - version='7.0-preview.2', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters, content=content) @@ -891,25 +946,25 @@ def update_folder(self, folder, project, path): def get_build_general_settings(self, project): """GetBuildGeneralSettings. - Gets pipeline general settings. + [Preview API] Gets pipeline general settings. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') response = self._send(http_method='GET', location_id='c4aefd19-30ff-405b-80ad-aca021e7242a', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('PipelineGeneralSettings', response) def update_build_general_settings(self, new_settings, project): """UpdateBuildGeneralSettings. - Updates pipeline general settings. - :param :class:` ` new_settings: + [Preview API] Updates pipeline general settings. + :param :class:` ` new_settings: :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -917,88 +972,33 @@ def update_build_general_settings(self, new_settings, project): content = self._serialize.body(new_settings, 'PipelineGeneralSettings') response = self._send(http_method='PATCH', location_id='c4aefd19-30ff-405b-80ad-aca021e7242a', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('PipelineGeneralSettings', response) def get_retention_history(self, days_to_lookback=None): """GetRetentionHistory. - Returns the retention history for the project collection. This includes pipelines that have custom retention rules that may prevent the retention job from cleaning them up, runs per pipeline with retention type, files associated with pipelines owned by the collection with retention type, and the number of files per pipeline. + [Preview API] Returns the retention history for the project collection. This includes pipelines that have custom retention rules that may prevent the retention job from cleaning them up, runs per pipeline with retention type, files associated with pipelines owned by the collection with retention type, and the number of files per pipeline. :param int days_to_lookback: - :rtype: :class:` ` + :rtype: :class:` ` """ query_parameters = {} if days_to_lookback is not None: query_parameters['daysToLookback'] = self._serialize.query('days_to_lookback', days_to_lookback, 'int') response = self._send(http_method='GET', location_id='1a9c48be-0ef5-4ec2-b94f-f053bdd2d3bf', - version='7.0', + version='7.2-preview.1', query_parameters=query_parameters) return self._deserialize('BuildRetentionHistory', response) - def get_build_changes(self, project, build_id, continuation_token=None, top=None, include_source_change=None): - """GetBuildChanges. - Gets the changes associated with a build - :param str project: Project ID or project name - :param int build_id: - :param str continuation_token: - :param int top: The maximum number of changes to return - :param bool include_source_change: - :rtype: :class:`<[Change]> ` - """ - route_values = {} - if project is not None: - route_values['project'] = self._serialize.url('project', project, 'str') - if build_id is not None: - route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') - query_parameters = {} - if continuation_token is not None: - query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query('top', top, 'int') - if include_source_change is not None: - query_parameters['includeSourceChange'] = self._serialize.query('include_source_change', include_source_change, 'bool') - response = self._send(http_method='GET', - location_id='54572c7b-bbd3-45d4-80dc-28be08941620', - version='7.0', - route_values=route_values, - query_parameters=query_parameters) - return self._deserialize('[Change]', self._unwrap_collection(response)) - - def get_changes_between_builds(self, project, from_build_id=None, to_build_id=None, top=None): - """GetChangesBetweenBuilds. - Gets the changes made to the repository between two given builds. - :param str project: Project ID or project name - :param int from_build_id: The ID of the first build. - :param int to_build_id: The ID of the last build. - :param int top: The maximum number of changes to return. - :rtype: [Change] - """ - route_values = {} - if project is not None: - route_values['project'] = self._serialize.url('project', project, 'str') - query_parameters = {} - if from_build_id is not None: - query_parameters['fromBuildId'] = self._serialize.query('from_build_id', from_build_id, 'int') - if to_build_id is not None: - query_parameters['toBuildId'] = self._serialize.query('to_build_id', to_build_id, 'int') - if top is not None: - query_parameters['$top'] = self._serialize.query('top', top, 'int') - response = self._send(http_method='GET', - location_id='f10f0ea5-18a1-43ec-a8fb-2042c7be9b43', - version='7.0', - route_values=route_values, - query_parameters=query_parameters) - return self._deserialize('[Change]', self._unwrap_collection(response)) - def get_latest_build(self, project, definition, branch_name=None): """GetLatestBuild. [Preview API] Gets the latest build for a definition, optionally scoped to a specific branch. :param str project: Project ID or project name :param str definition: definition name with optional leading folder path, or the definition id :param str branch_name: optional parameter that indicates the specific branch to use. If not specified, the default branch is used. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -1010,14 +1010,14 @@ def get_latest_build(self, project, definition, branch_name=None): query_parameters['branchName'] = self._serialize.query('branch_name', branch_name, 'str') response = self._send(http_method='GET', location_id='54481611-01f4-47f3-998f-160da0f0c229', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('Build', response) def add_retention_leases(self, new_leases, project): """AddRetentionLeases. - Adds new leases for pipeline runs. + [Preview API] Adds new leases for pipeline runs. :param [NewRetentionLease] new_leases: :param str project: Project ID or project name :rtype: [RetentionLease] @@ -1028,14 +1028,14 @@ def add_retention_leases(self, new_leases, project): content = self._serialize.body(new_leases, '[NewRetentionLease]') response = self._send(http_method='POST', location_id='272051e4-9af1-45b5-ae22-8d960a5539d4', - version='7.0', + version='7.2-preview.2', route_values=route_values, content=content) return self._deserialize('[RetentionLease]', self._unwrap_collection(response)) def delete_retention_leases_by_id(self, project, ids): """DeleteRetentionLeasesById. - Removes specific retention leases. + [Preview API] Removes specific retention leases. :param str project: Project ID or project name :param [int] ids: """ @@ -1048,16 +1048,16 @@ def delete_retention_leases_by_id(self, project, ids): query_parameters['ids'] = self._serialize.query('ids', ids, 'str') self._send(http_method='DELETE', location_id='272051e4-9af1-45b5-ae22-8d960a5539d4', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters) def get_retention_lease(self, project, lease_id): """GetRetentionLease. - Returns the details of the retention lease given a lease id. + [Preview API] Returns the details of the retention lease given a lease id. :param str project: Project ID or project name :param int lease_id: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -1066,13 +1066,13 @@ def get_retention_lease(self, project, lease_id): route_values['leaseId'] = self._serialize.url('lease_id', lease_id, 'int') response = self._send(http_method='GET', location_id='272051e4-9af1-45b5-ae22-8d960a5539d4', - version='7.0', + version='7.2-preview.2', route_values=route_values) return self._deserialize('RetentionLease', response) def get_retention_leases_by_minimal_retention_leases(self, project, leases_to_fetch): """GetRetentionLeasesByMinimalRetentionLeases. - Returns any leases matching the specified MinimalRetentionLeases + [Preview API] Returns any leases matching the specified MinimalRetentionLeases :param str project: Project ID or project name :param [MinimalRetentionLease] leases_to_fetch: List of JSON-serialized MinimalRetentionLeases separated by '|' :rtype: [RetentionLease] @@ -1086,14 +1086,14 @@ def get_retention_leases_by_minimal_retention_leases(self, project, leases_to_fe query_parameters['leasesToFetch'] = self._serialize.query('leases_to_fetch', leases_to_fetch, 'str') response = self._send(http_method='GET', location_id='272051e4-9af1-45b5-ae22-8d960a5539d4', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[RetentionLease]', self._unwrap_collection(response)) def get_retention_leases_by_owner_id(self, project, owner_id=None, definition_id=None, run_id=None): """GetRetentionLeasesByOwnerId. - Returns any leases owned by the specified entity, optionally scoped to a single pipeline definition and run. + [Preview API] Returns any leases owned by the specified entity, optionally scoped to a single pipeline definition and run. :param str project: Project ID or project name :param str owner_id: :param int definition_id: An optional parameter to limit the search to a specific pipeline definition. @@ -1112,14 +1112,14 @@ def get_retention_leases_by_owner_id(self, project, owner_id=None, definition_id query_parameters['runId'] = self._serialize.query('run_id', run_id, 'int') response = self._send(http_method='GET', location_id='272051e4-9af1-45b5-ae22-8d960a5539d4', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[RetentionLease]', self._unwrap_collection(response)) def get_retention_leases_by_user_id(self, project, user_owner_id, definition_id=None, run_id=None): """GetRetentionLeasesByUserId. - Returns any leases owned by the specified user, optionally scoped to a single pipeline definition and run. + [Preview API] Returns any leases owned by the specified user, optionally scoped to a single pipeline definition and run. :param str project: Project ID or project name :param str user_owner_id: The user id to search for. :param int definition_id: An optional parameter to limit the search to a specific pipeline definition. @@ -1138,18 +1138,18 @@ def get_retention_leases_by_user_id(self, project, user_owner_id, definition_id= query_parameters['runId'] = self._serialize.query('run_id', run_id, 'int') response = self._send(http_method='GET', location_id='272051e4-9af1-45b5-ae22-8d960a5539d4', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[RetentionLease]', self._unwrap_collection(response)) def update_retention_lease(self, lease_update, project, lease_id): """UpdateRetentionLease. - Updates the duration or pipeline protection status of a retention lease. - :param :class:` ` lease_update: The new data for the retention lease. + [Preview API] Updates the duration or pipeline protection status of a retention lease. + :param :class:` ` lease_update: The new data for the retention lease. :param str project: Project ID or project name :param int lease_id: The ID of the lease to update. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -1159,14 +1159,14 @@ def update_retention_lease(self, lease_update, project, lease_id): content = self._serialize.body(lease_update, 'RetentionLeaseUpdate') response = self._send(http_method='PATCH', location_id='272051e4-9af1-45b5-ae22-8d960a5539d4', - version='7.0', + version='7.2-preview.2', route_values=route_values, content=content) return self._deserialize('RetentionLease', response) def get_build_log(self, project, build_id, log_id, start_line=None, end_line=None, **kwargs): """GetBuildLog. - Gets an individual log file for a build. + [Preview API] Gets an individual log file for a build. :param str project: Project ID or project name :param int build_id: The ID of the build. :param int log_id: The ID of the log file. @@ -1188,7 +1188,7 @@ def get_build_log(self, project, build_id, log_id, start_line=None, end_line=Non query_parameters['endLine'] = self._serialize.query('end_line', end_line, 'long') response = self._send(http_method='GET', location_id='35a80daf-7f30-45fc-86e8-6b813d9c90df', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters, accept_media_type='text/plain') @@ -1200,7 +1200,7 @@ def get_build_log(self, project, build_id, log_id, start_line=None, end_line=Non def get_build_log_lines(self, project, build_id, log_id, start_line=None, end_line=None): """GetBuildLogLines. - Gets an individual log file for a build. + [Preview API] Gets an individual log file for a build. :param str project: Project ID or project name :param int build_id: The ID of the build. :param int log_id: The ID of the log file. @@ -1222,14 +1222,14 @@ def get_build_log_lines(self, project, build_id, log_id, start_line=None, end_li query_parameters['endLine'] = self._serialize.query('end_line', end_line, 'long') response = self._send(http_method='GET', location_id='35a80daf-7f30-45fc-86e8-6b813d9c90df', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[str]', self._unwrap_collection(response)) def get_build_logs(self, project, build_id): """GetBuildLogs. - Gets the logs for a build. + [Preview API] Gets the logs for a build. :param str project: Project ID or project name :param int build_id: The ID of the build. :rtype: [BuildLog] @@ -1241,13 +1241,13 @@ def get_build_logs(self, project, build_id): route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') response = self._send(http_method='GET', location_id='35a80daf-7f30-45fc-86e8-6b813d9c90df', - version='7.0', + version='7.2-preview.2', route_values=route_values) return self._deserialize('[BuildLog]', self._unwrap_collection(response)) def get_build_logs_zip(self, project, build_id, **kwargs): """GetBuildLogsZip. - Gets the logs for a build. + [Preview API] Gets the logs for a build. :param str project: Project ID or project name :param int build_id: The ID of the build. :rtype: object @@ -1259,7 +1259,7 @@ def get_build_logs_zip(self, project, build_id, **kwargs): route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') response = self._send(http_method='GET', location_id='35a80daf-7f30-45fc-86e8-6b813d9c90df', - version='7.0', + version='7.2-preview.2', route_values=route_values, accept_media_type='application/zip') if "callback" in kwargs: @@ -1270,7 +1270,7 @@ def get_build_logs_zip(self, project, build_id, **kwargs): def get_build_log_zip(self, project, build_id, log_id, start_line=None, end_line=None, **kwargs): """GetBuildLogZip. - Gets an individual log file for a build. + [Preview API] Gets an individual log file for a build. :param str project: Project ID or project name :param int build_id: The ID of the build. :param int log_id: The ID of the log file. @@ -1292,7 +1292,7 @@ def get_build_log_zip(self, project, build_id, log_id, start_line=None, end_line query_parameters['endLine'] = self._serialize.query('end_line', end_line, 'long') response = self._send(http_method='GET', location_id='35a80daf-7f30-45fc-86e8-6b813d9c90df', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters, accept_media_type='application/zip') @@ -1320,7 +1320,7 @@ def get_project_metrics(self, project, metric_aggregation_type=None, min_metrics query_parameters['minMetricsTime'] = self._serialize.query('min_metrics_time', min_metrics_time, 'iso-8601') response = self._send(http_method='GET', location_id='7433fae7-a6bc-41dc-a6e2-eef9005ce41a', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[BuildMetric]', self._unwrap_collection(response)) @@ -1343,14 +1343,14 @@ def get_definition_metrics(self, project, definition_id, min_metrics_time=None): query_parameters['minMetricsTime'] = self._serialize.query('min_metrics_time', min_metrics_time, 'iso-8601') response = self._send(http_method='GET', location_id='d973b939-0ce0-4fec-91d8-da3940fa1827', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[BuildMetric]', self._unwrap_collection(response)) def get_build_option_definitions(self, project=None): """GetBuildOptionDefinitions. - Gets all build definition options supported by the system. + [Preview API] Gets all build definition options supported by the system. :param str project: Project ID or project name :rtype: [BuildOptionDefinition] """ @@ -1359,13 +1359,13 @@ def get_build_option_definitions(self, project=None): route_values['project'] = self._serialize.url('project', project, 'str') response = self._send(http_method='GET', location_id='591cb5a4-2d46-4f3a-a697-5cd42b6bd332', - version='7.0', + version='7.2-preview.2', route_values=route_values) return self._deserialize('[BuildOptionDefinition]', self._unwrap_collection(response)) def get_path_contents(self, project, provider_name, service_endpoint_id=None, repository=None, commit_or_branch=None, path=None): """GetPathContents. - Gets the contents of a directory in the given source code repository. + [Preview API] Gets the contents of a directory in the given source code repository. :param str project: Project ID or project name :param str provider_name: The name of the source provider. :param str service_endpoint_id: If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit. @@ -1390,18 +1390,18 @@ def get_path_contents(self, project, provider_name, service_endpoint_id=None, re query_parameters['path'] = self._serialize.query('path', path, 'str') response = self._send(http_method='GET', location_id='7944d6fb-df01-4709-920a-7a189aa34037', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[SourceRepositoryItem]', self._unwrap_collection(response)) def get_build_properties(self, project, build_id, filter=None): """GetBuildProperties. - Gets properties for a build. + [Preview API] Gets properties for a build. :param str project: Project ID or project name :param int build_id: The ID of the build. :param [str] filter: A comma-delimited list of properties. If specified, filters to these specific properties. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -1414,18 +1414,18 @@ def get_build_properties(self, project, build_id, filter=None): query_parameters['filter'] = self._serialize.query('filter', filter, 'str') response = self._send(http_method='GET', location_id='0a6312e9-0627-49b7-8083-7d74a64849c9', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('object', response) def update_build_properties(self, document, project, build_id): """UpdateBuildProperties. - Updates properties for a build. - :param :class:`<[JsonPatchOperation]> ` document: A json-patch document describing the properties to update. + [Preview API] Updates properties for a build. + :param :class:`<[JsonPatchOperation]> ` document: A json-patch document describing the properties to update. :param str project: Project ID or project name :param int build_id: The ID of the build. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -1435,7 +1435,7 @@ def update_build_properties(self, document, project, build_id): content = self._serialize.body(document, '[JsonPatchOperation]') response = self._send(http_method='PATCH', location_id='0a6312e9-0627-49b7-8083-7d74a64849c9', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content, media_type='application/json-patch+json') @@ -1443,11 +1443,11 @@ def update_build_properties(self, document, project, build_id): def get_definition_properties(self, project, definition_id, filter=None): """GetDefinitionProperties. - Gets properties for a definition. + [Preview API] Gets properties for a definition. :param str project: Project ID or project name :param int definition_id: The ID of the definition. :param [str] filter: A comma-delimited list of properties. If specified, filters to these specific properties. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -1460,18 +1460,18 @@ def get_definition_properties(self, project, definition_id, filter=None): query_parameters['filter'] = self._serialize.query('filter', filter, 'str') response = self._send(http_method='GET', location_id='d9826ad7-2a68-46a9-a6e9-677698777895', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('object', response) def update_definition_properties(self, document, project, definition_id): """UpdateDefinitionProperties. - Updates properties for a definition. - :param :class:`<[JsonPatchOperation]> ` document: A json-patch document describing the properties to update. + [Preview API] Updates properties for a definition. + :param :class:`<[JsonPatchOperation]> ` document: A json-patch document describing the properties to update. :param str project: Project ID or project name :param int definition_id: The ID of the definition. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -1481,7 +1481,7 @@ def update_definition_properties(self, document, project, definition_id): content = self._serialize.body(document, '[JsonPatchOperation]') response = self._send(http_method='PATCH', location_id='d9826ad7-2a68-46a9-a6e9-677698777895', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content, media_type='application/json-patch+json') @@ -1489,13 +1489,13 @@ def update_definition_properties(self, document, project, definition_id): def get_pull_request(self, project, provider_name, pull_request_id, repository_id=None, service_endpoint_id=None): """GetPullRequest. - Gets a pull request object from source provider. + [Preview API] Gets a pull request object from source provider. :param str project: Project ID or project name :param str provider_name: The name of the source provider. :param str pull_request_id: Vendor-specific id of the pull request. :param str repository_id: Vendor-specific identifier or the name of the repository that contains the pull request. :param str service_endpoint_id: If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -1511,18 +1511,18 @@ def get_pull_request(self, project, provider_name, pull_request_id, repository_i query_parameters['serviceEndpointId'] = self._serialize.query('service_endpoint_id', service_endpoint_id, 'str') response = self._send(http_method='GET', location_id='d8763ec7-9ff0-4fb4-b2b2-9d757906ff14', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('PullRequest', response) def get_build_report(self, project, build_id, type=None): """GetBuildReport. - Gets a build report. + [Preview API] Gets a build report. :param str project: Project ID or project name :param int build_id: The ID of the build. :param str type: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -1534,14 +1534,14 @@ def get_build_report(self, project, build_id, type=None): query_parameters['type'] = self._serialize.query('type', type, 'str') response = self._send(http_method='GET', location_id='45bcaa88-67e1-4042-a035-56d3b4a7d44c', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters) return self._deserialize('BuildReportMetadata', response) def get_build_report_html_content(self, project, build_id, type=None, **kwargs): """GetBuildReportHtmlContent. - Gets a build report. + [Preview API] Gets a build report. :param str project: Project ID or project name :param int build_id: The ID of the build. :param str type: @@ -1557,7 +1557,7 @@ def get_build_report_html_content(self, project, build_id, type=None, **kwargs): query_parameters['type'] = self._serialize.query('type', type, 'str') response = self._send(http_method='GET', location_id='45bcaa88-67e1-4042-a035-56d3b4a7d44c', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters, accept_media_type='text/html') @@ -1569,7 +1569,7 @@ def get_build_report_html_content(self, project, build_id, type=None, **kwargs): def list_repositories(self, project, provider_name, service_endpoint_id=None, repository=None, result_set=None, page_results=None, continuation_token=None): """ListRepositories. - Gets a list of source code repositories. + [Preview API] Gets a list of source code repositories. :param str project: Project ID or project name :param str provider_name: The name of the source provider. :param str service_endpoint_id: If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit. @@ -1577,7 +1577,7 @@ def list_repositories(self, project, provider_name, service_endpoint_id=None, re :param str result_set: 'top' for the repositories most relevant for the endpoint. If not set, all repositories are returned. Ignored if 'repository' is set. :param bool page_results: If set to true, this will limit the set of results and will return a continuation token to continue the query. :param str continuation_token: When paging results, this is a continuation token, returned by a previous call to this method, that can be used to return the next set of repositories. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -1597,7 +1597,7 @@ def list_repositories(self, project, provider_name, service_endpoint_id=None, re query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'str') response = self._send(http_method='GET', location_id='d44d1680-f978-4834-9b93-8c6e132329c9', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('SourceRepositories', response) @@ -1618,7 +1618,7 @@ def authorize_definition_resources(self, resources, project, definition_id): content = self._serialize.body(resources, '[DefinitionResourceReference]') response = self._send(http_method='PATCH', location_id='ea623316-1967-45eb-89ab-e9e6110cf2d6', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('[DefinitionResourceReference]', self._unwrap_collection(response)) @@ -1637,41 +1637,41 @@ def get_definition_resources(self, project, definition_id): route_values['definitionId'] = self._serialize.url('definition_id', definition_id, 'int') response = self._send(http_method='GET', location_id='ea623316-1967-45eb-89ab-e9e6110cf2d6', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) return self._deserialize('[DefinitionResourceReference]', self._unwrap_collection(response)) def get_resource_usage(self): """GetResourceUsage. [Preview API] Gets information about build resources in the system. - :rtype: :class:` ` + :rtype: :class:` ` """ response = self._send(http_method='GET', location_id='3813d06c-9e36-4ea1-aac3-61a485d60e3d', - version='7.0-preview.2') + version='7.2-preview.2') return self._deserialize('BuildResourceUsage', response) def get_retention_settings(self, project): """GetRetentionSettings. - Gets the project's retention settings. + [Preview API] Gets the project's retention settings. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') response = self._send(http_method='GET', location_id='dadb46e7-5851-4c72-820e-ae8abb82f59f', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('ProjectRetentionSetting', response) def update_retention_settings(self, update_model, project): """UpdateRetentionSettings. - Updates the project's retention settings. - :param :class:` ` update_model: + [Preview API] Updates the project's retention settings. + :param :class:` ` update_model: :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -1679,14 +1679,14 @@ def update_retention_settings(self, update_model, project): content = self._serialize.body(update_model, 'UpdateProjectRetentionSettingModel') response = self._send(http_method='PATCH', location_id='dadb46e7-5851-4c72-820e-ae8abb82f59f', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('ProjectRetentionSetting', response) def get_definition_revisions(self, project, definition_id): """GetDefinitionRevisions. - Gets all revisions of a definition. + [Preview API] Gets all revisions of a definition. :param str project: Project ID or project name :param int definition_id: The ID of the definition. :rtype: [BuildDefinitionRevision] @@ -1698,31 +1698,31 @@ def get_definition_revisions(self, project, definition_id): route_values['definitionId'] = self._serialize.url('definition_id', definition_id, 'int') response = self._send(http_method='GET', location_id='7c116775-52e5-453e-8c5d-914d9762d8c4', - version='7.0', + version='7.2-preview.3', route_values=route_values) return self._deserialize('[BuildDefinitionRevision]', self._unwrap_collection(response)) def get_build_settings(self, project=None): """GetBuildSettings. - Gets the build settings. + [Preview API] Gets the build settings. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') response = self._send(http_method='GET', location_id='aa8c1c9c-ef8b-474a-b8c4-785c7b191d0d', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('BuildSettings', response) def update_build_settings(self, settings, project=None): """UpdateBuildSettings. - Updates the build settings. - :param :class:` ` settings: The new settings. + [Preview API] Updates the build settings. + :param :class:` ` settings: The new settings. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -1730,14 +1730,14 @@ def update_build_settings(self, settings, project=None): content = self._serialize.body(settings, 'BuildSettings') response = self._send(http_method='PATCH', location_id='aa8c1c9c-ef8b-474a-b8c4-785c7b191d0d', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('BuildSettings', response) def list_source_providers(self, project): """ListSourceProviders. - Get a list of source providers and their capabilities. + [Preview API] Get a list of source providers and their capabilities. :param str project: Project ID or project name :rtype: [SourceProviderAttributes] """ @@ -1746,14 +1746,14 @@ def list_source_providers(self, project): route_values['project'] = self._serialize.url('project', project, 'str') response = self._send(http_method='GET', location_id='3ce81729-954f-423d-a581-9fea01d25186', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('[SourceProviderAttributes]', self._unwrap_collection(response)) def update_stage(self, update_parameters, build_id, stage_ref_name, project=None): """UpdateStage. - Update a build stage - :param :class:` ` update_parameters: + [Preview API] Update a build stage + :param :class:` ` update_parameters: :param int build_id: :param str stage_ref_name: :param str project: Project ID or project name @@ -1768,7 +1768,7 @@ def update_stage(self, update_parameters, build_id, stage_ref_name, project=None content = self._serialize.body(update_parameters, 'UpdateStageParameters') self._send(http_method='PATCH', location_id='b8aac6c9-744b-46e1-88fc-3550969f9313', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) @@ -1802,14 +1802,14 @@ def get_status_badge(self, project, definition, branch_name=None, stage_name=Non query_parameters['label'] = self._serialize.query('label', label, 'str') response = self._send(http_method='GET', location_id='07acfdce-4757-4439-b422-ddd13a2fcc10', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('str', response) def add_build_tag(self, project, build_id, tag): """AddBuildTag. - Adds a tag to a build. + [Preview API] Adds a tag to a build. :param str project: Project ID or project name :param int build_id: The ID of the build. :param str tag: The tag to add. @@ -1824,14 +1824,14 @@ def add_build_tag(self, project, build_id, tag): route_values['tag'] = self._serialize.url('tag', tag, 'str') response = self._send(http_method='PUT', location_id='6e6114b2-8161-44c8-8f6c-c5505782427f', - version='7.0', + version='7.2-preview.3', route_values=route_values) return self._deserialize('[str]', self._unwrap_collection(response)) def add_build_tags(self, tags, project, build_id): """AddBuildTags. - Adds tags to a build. - :param [str] tags: The tags to add. + [Preview API] Adds tags to a build. + :param [str] tags: The tags to add. Request body is composed directly from listed tags. :param str project: Project ID or project name :param int build_id: The ID of the build. :rtype: [str] @@ -1844,14 +1844,14 @@ def add_build_tags(self, tags, project, build_id): content = self._serialize.body(tags, '[str]') response = self._send(http_method='POST', location_id='6e6114b2-8161-44c8-8f6c-c5505782427f', - version='7.0', + version='7.2-preview.3', route_values=route_values, content=content) return self._deserialize('[str]', self._unwrap_collection(response)) def delete_build_tag(self, project, build_id, tag): """DeleteBuildTag. - Removes a tag from a build. NOTE: This API will not work for tags with special characters. To remove tags with special characters, use the PATCH method instead (in 6.0+) + [Preview API] Removes a tag from a build. NOTE: This API will not work for tags with special characters. To remove tags with special characters, use the PATCH method instead (in 6.0+) :param str project: Project ID or project name :param int build_id: The ID of the build. :param str tag: The tag to remove. @@ -1866,13 +1866,13 @@ def delete_build_tag(self, project, build_id, tag): route_values['tag'] = self._serialize.url('tag', tag, 'str') response = self._send(http_method='DELETE', location_id='6e6114b2-8161-44c8-8f6c-c5505782427f', - version='7.0', + version='7.2-preview.3', route_values=route_values) return self._deserialize('[str]', self._unwrap_collection(response)) def get_build_tags(self, project, build_id): """GetBuildTags. - Gets the tags for a build. + [Preview API] Gets the tags for a build. :param str project: Project ID or project name :param int build_id: The ID of the build. :rtype: [str] @@ -1884,14 +1884,14 @@ def get_build_tags(self, project, build_id): route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') response = self._send(http_method='GET', location_id='6e6114b2-8161-44c8-8f6c-c5505782427f', - version='7.0', + version='7.2-preview.3', route_values=route_values) return self._deserialize('[str]', self._unwrap_collection(response)) def update_build_tags(self, update_parameters, project, build_id): """UpdateBuildTags. - Adds/Removes tags from a build. - :param :class:` ` update_parameters: The tags to add/remove. + [Preview API] Adds/Removes tags from a build. + :param :class:` ` update_parameters: The tags to add/remove. :param str project: Project ID or project name :param int build_id: The ID of the build. :rtype: [str] @@ -1904,14 +1904,14 @@ def update_build_tags(self, update_parameters, project, build_id): content = self._serialize.body(update_parameters, 'UpdateTagParameters') response = self._send(http_method='PATCH', location_id='6e6114b2-8161-44c8-8f6c-c5505782427f', - version='7.0', + version='7.2-preview.3', route_values=route_values, content=content) return self._deserialize('[str]', self._unwrap_collection(response)) def add_definition_tag(self, project, definition_id, tag): """AddDefinitionTag. - Adds a tag to a definition + [Preview API] Adds a tag to a definition :param str project: Project ID or project name :param int definition_id: The ID of the definition. :param str tag: The tag to add. @@ -1926,13 +1926,13 @@ def add_definition_tag(self, project, definition_id, tag): route_values['tag'] = self._serialize.url('tag', tag, 'str') response = self._send(http_method='PUT', location_id='cb894432-134a-4d31-a839-83beceaace4b', - version='7.0', + version='7.2-preview.3', route_values=route_values) return self._deserialize('[str]', self._unwrap_collection(response)) def add_definition_tags(self, tags, project, definition_id): """AddDefinitionTags. - Adds multiple tags to a definition. + [Preview API] Adds multiple tags to a definition. :param [str] tags: The tags to add. :param str project: Project ID or project name :param int definition_id: The ID of the definition. @@ -1946,14 +1946,14 @@ def add_definition_tags(self, tags, project, definition_id): content = self._serialize.body(tags, '[str]') response = self._send(http_method='POST', location_id='cb894432-134a-4d31-a839-83beceaace4b', - version='7.0', + version='7.2-preview.3', route_values=route_values, content=content) return self._deserialize('[str]', self._unwrap_collection(response)) def delete_definition_tag(self, project, definition_id, tag): """DeleteDefinitionTag. - Removes a tag from a definition. NOTE: This API will not work for tags with special characters. To remove tags with special characters, use the PATCH method instead (in 6.0+) + [Preview API] Removes a tag from a definition. NOTE: This API will not work for tags with special characters. To remove tags with special characters, use the PATCH method instead (in 6.0+) :param str project: Project ID or project name :param int definition_id: The ID of the definition. :param str tag: The tag to remove. @@ -1968,13 +1968,13 @@ def delete_definition_tag(self, project, definition_id, tag): route_values['tag'] = self._serialize.url('tag', tag, 'str') response = self._send(http_method='DELETE', location_id='cb894432-134a-4d31-a839-83beceaace4b', - version='7.0', + version='7.2-preview.3', route_values=route_values) return self._deserialize('[str]', self._unwrap_collection(response)) def get_definition_tags(self, project, definition_id, revision=None): """GetDefinitionTags. - Gets the tags for a definition. + [Preview API] Gets the tags for a definition. :param str project: Project ID or project name :param int definition_id: The ID of the definition. :param int revision: The definition revision number. If not specified, uses the latest revision of the definition. @@ -1990,15 +1990,15 @@ def get_definition_tags(self, project, definition_id, revision=None): query_parameters['revision'] = self._serialize.query('revision', revision, 'int') response = self._send(http_method='GET', location_id='cb894432-134a-4d31-a839-83beceaace4b', - version='7.0', + version='7.2-preview.3', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[str]', self._unwrap_collection(response)) def update_definition_tags(self, update_parameters, project, definition_id): """UpdateDefinitionTags. - Adds/Removes tags from a definition. - :param :class:` ` update_parameters: The tags to add/remove. + [Preview API] Adds/Removes tags from a definition. + :param :class:` ` update_parameters: The tags to add/remove. :param str project: Project ID or project name :param int definition_id: The ID of the definition. :rtype: [str] @@ -2011,14 +2011,14 @@ def update_definition_tags(self, update_parameters, project, definition_id): content = self._serialize.body(update_parameters, 'UpdateTagParameters') response = self._send(http_method='PATCH', location_id='cb894432-134a-4d31-a839-83beceaace4b', - version='7.0', + version='7.2-preview.3', route_values=route_values, content=content) return self._deserialize('[str]', self._unwrap_collection(response)) def delete_tag(self, project, tag): """DeleteTag. - Removes a tag from builds, definitions, and from the tag store + [Preview API] Removes a tag from builds, definitions, and from the tag store :param str project: Project ID or project name :param str tag: The tag to remove. :rtype: [str] @@ -2030,13 +2030,13 @@ def delete_tag(self, project, tag): route_values['tag'] = self._serialize.url('tag', tag, 'str') response = self._send(http_method='DELETE', location_id='d84ac5c6-edc7-43d5-adc9-1b34be5dea09', - version='7.0', + version='7.2-preview.3', route_values=route_values) return self._deserialize('[str]', self._unwrap_collection(response)) def get_tags(self, project): """GetTags. - Gets a list of all build tags in the project. + [Preview API] Gets a list of all build tags in the project. :param str project: Project ID or project name :rtype: [str] """ @@ -2045,13 +2045,13 @@ def get_tags(self, project): route_values['project'] = self._serialize.url('project', project, 'str') response = self._send(http_method='GET', location_id='d84ac5c6-edc7-43d5-adc9-1b34be5dea09', - version='7.0', + version='7.2-preview.3', route_values=route_values) return self._deserialize('[str]', self._unwrap_collection(response)) def delete_template(self, project, template_id): """DeleteTemplate. - Deletes a build definition template. + [Preview API] Deletes a build definition template. :param str project: Project ID or project name :param str template_id: The ID of the template. """ @@ -2062,15 +2062,15 @@ def delete_template(self, project, template_id): route_values['templateId'] = self._serialize.url('template_id', template_id, 'str') self._send(http_method='DELETE', location_id='e884571e-7f92-4d6a-9274-3f5649900835', - version='7.0', + version='7.2-preview.3', route_values=route_values) def get_template(self, project, template_id): """GetTemplate. - Gets a specific build definition template. + [Preview API] Gets a specific build definition template. :param str project: Project ID or project name :param str template_id: The ID of the requested template. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -2079,13 +2079,13 @@ def get_template(self, project, template_id): route_values['templateId'] = self._serialize.url('template_id', template_id, 'str') response = self._send(http_method='GET', location_id='e884571e-7f92-4d6a-9274-3f5649900835', - version='7.0', + version='7.2-preview.3', route_values=route_values) return self._deserialize('BuildDefinitionTemplate', response) def get_templates(self, project): """GetTemplates. - Gets all definition templates. + [Preview API] Gets all definition templates. :param str project: Project ID or project name :rtype: [BuildDefinitionTemplate] """ @@ -2094,17 +2094,17 @@ def get_templates(self, project): route_values['project'] = self._serialize.url('project', project, 'str') response = self._send(http_method='GET', location_id='e884571e-7f92-4d6a-9274-3f5649900835', - version='7.0', + version='7.2-preview.3', route_values=route_values) return self._deserialize('[BuildDefinitionTemplate]', self._unwrap_collection(response)) def save_template(self, template, project, template_id): """SaveTemplate. - Updates an existing build definition template. - :param :class:` ` template: The new version of the template. + [Preview API] Updates an existing build definition template. + :param :class:` ` template: The new version of the template. :param str project: Project ID or project name :param str template_id: The ID of the template. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -2114,20 +2114,20 @@ def save_template(self, template, project, template_id): content = self._serialize.body(template, 'BuildDefinitionTemplate') response = self._send(http_method='PUT', location_id='e884571e-7f92-4d6a-9274-3f5649900835', - version='7.0', + version='7.2-preview.3', route_values=route_values, content=content) return self._deserialize('BuildDefinitionTemplate', response) def get_build_timeline(self, project, build_id, timeline_id=None, change_id=None, plan_id=None): """GetBuildTimeline. - Gets details for a build + [Preview API] Gets details for a build :param str project: Project ID or project name :param int build_id: :param str timeline_id: :param int change_id: :param str plan_id: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -2143,14 +2143,14 @@ def get_build_timeline(self, project, build_id, timeline_id=None, change_id=None query_parameters['planId'] = self._serialize.query('plan_id', plan_id, 'str') response = self._send(http_method='GET', location_id='8baac422-4c6e-4de5-8532-db96d92acffa', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters) return self._deserialize('Timeline', response) def restore_webhooks(self, trigger_types, project, provider_name, service_endpoint_id=None, repository=None): """RestoreWebhooks. - Recreates the webhooks for the specified triggers in the given source code repository. + [Preview API] Recreates the webhooks for the specified triggers in the given source code repository. :param [DefinitionTriggerType] trigger_types: The types of triggers to restore webhooks for. :param str project: Project ID or project name :param str provider_name: The name of the source provider. @@ -2170,14 +2170,14 @@ def restore_webhooks(self, trigger_types, project, provider_name, service_endpoi content = self._serialize.body(trigger_types, '[DefinitionTriggerType]') self._send(http_method='POST', location_id='793bceb8-9736-4030-bd2f-fb3ce6d6b478', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters, content=content) def list_webhooks(self, project, provider_name, service_endpoint_id=None, repository=None): """ListWebhooks. - Gets a list of webhooks installed in the given source code repository. + [Preview API] Gets a list of webhooks installed in the given source code repository. :param str project: Project ID or project name :param str provider_name: The name of the source provider. :param str service_endpoint_id: If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit. @@ -2196,14 +2196,14 @@ def list_webhooks(self, project, provider_name, service_endpoint_id=None, reposi query_parameters['repository'] = self._serialize.query('repository', repository, 'str') response = self._send(http_method='GET', location_id='8f20ff82-9498-4812-9f6e-9c01bdc50e99', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[RepositoryWebhook]', self._unwrap_collection(response)) def get_build_work_items_refs(self, project, build_id, top=None): """GetBuildWorkItemsRefs. - Gets the work items associated with a build. Only work items in the same project are returned. + [Preview API] Gets the work items associated with a build. Only work items in the same project are returned. :param str project: Project ID or project name :param int build_id: The ID of the build. :param int top: The maximum number of work items to return. @@ -2219,14 +2219,14 @@ def get_build_work_items_refs(self, project, build_id, top=None): query_parameters['$top'] = self._serialize.query('top', top, 'int') response = self._send(http_method='GET', location_id='5a21f5d2-5642-47e4-a0bd-1356e6731bee', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[ResourceRef]', self._unwrap_collection(response)) def get_build_work_items_refs_from_commits(self, commit_ids, project, build_id, top=None): """GetBuildWorkItemsRefsFromCommits. - Gets the work items associated with a build, filtered to specific commits. + [Preview API] Gets the work items associated with a build, filtered to specific commits. :param [str] commit_ids: A comma-delimited list of commit IDs. :param str project: Project ID or project name :param int build_id: The ID of the build. @@ -2244,7 +2244,7 @@ def get_build_work_items_refs_from_commits(self, commit_ids, project, build_id, content = self._serialize.body(commit_ids, '[str]') response = self._send(http_method='POST', location_id='5a21f5d2-5642-47e4-a0bd-1356e6731bee', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters, content=content) @@ -2252,7 +2252,7 @@ def get_build_work_items_refs_from_commits(self, commit_ids, project, build_id, def get_work_items_between_builds(self, project, from_build_id, to_build_id, top=None): """GetWorkItemsBetweenBuilds. - Gets all the work items between two builds. + [Preview API] Gets all the work items between two builds. :param str project: Project ID or project name :param int from_build_id: The ID of the first build. :param int to_build_id: The ID of the last build. @@ -2271,21 +2271,21 @@ def get_work_items_between_builds(self, project, from_build_id, to_build_id, top query_parameters['$top'] = self._serialize.query('top', top, 'int') response = self._send(http_method='GET', location_id='52ba8915-5518-42e3-a4bb-b0182d159e2d', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[ResourceRef]', self._unwrap_collection(response)) def get_definition_yaml(self, project, definition_id, revision=None, min_metrics_time=None, property_filters=None, include_latest_builds=None): """GetDefinitionYaml. - Converts a definition to YAML, optionally at a specific revision. + [Preview API] Converts a definition to YAML, optionally at a specific revision. :param str project: Project ID or project name :param int definition_id: The ID of the definition. :param int revision: The revision number to retrieve. If this is not specified, the latest version will be returned. :param datetime min_metrics_time: If specified, indicates the date from which metrics should be included. :param [str] property_filters: A comma-delimited list of properties to include in the results. :param bool include_latest_builds: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -2304,7 +2304,7 @@ def get_definition_yaml(self, project, definition_id, revision=None, min_metrics query_parameters['includeLatestBuilds'] = self._serialize.query('include_latest_builds', include_latest_builds, 'bool') response = self._send(http_method='GET', location_id='7c3df3a1-7e51-4150-8cf7-540347f8697f', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('YamlBuild', response) diff --git a/azure-devops/azure/devops/v7_0/build/models.py b/azure-devops/azure/devops/v7_2/build/models.py similarity index 90% rename from azure-devops/azure/devops/v7_0/build/models.py rename to azure-devops/azure/devops/v7_2/build/models.py index 36b6eea8..4d17b6da 100644 --- a/azure-devops/azure/devops/v7_0/build/models.py +++ b/azure-devops/azure/devops/v7_2/build/models.py @@ -14,13 +14,13 @@ class AgentPoolQueue(Model): Represents a queue for running builds. :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param id: The ID of the queue. :type id: int :param name: The name of the queue. :type name: str :param pool: The pool used by this queue. - :type pool: :class:`TaskAgentPoolReference ` + :type pool: :class:`TaskAgentPoolReference ` :param url: The full http link to the resource. :type url: str """ @@ -66,11 +66,11 @@ class AggregatedResultsAnalysis(Model): :param not_reported_results_by_outcome: :type not_reported_results_by_outcome: dict :param previous_context: - :type previous_context: :class:`TestResultsContext ` + :type previous_context: :class:`TestResultsContext ` :param results_by_outcome: :type results_by_outcome: dict :param results_difference: - :type results_difference: :class:`AggregatedResultsDifference ` + :type results_difference: :class:`AggregatedResultsDifference ` :param run_summary_by_outcome: :type run_summary_by_outcome: dict :param run_summary_by_state: @@ -217,7 +217,7 @@ def __init__(self, results_by_outcome=None, runs_count=None, state=None): class ArtifactResource(Model): """ :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param data: Type-specific data about the artifact. :type data: str :param download_url: A link to download the resource. @@ -293,7 +293,7 @@ class Attachment(Model): Represents an attachment to a build. :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param name: The name of the attachment. :type name: str """ @@ -333,27 +333,29 @@ class Build(Model): Data representation of a build. :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param agent_specification: The agent specification for the build. - :type agent_specification: :class:`AgentSpecification ` + :type agent_specification: :class:`AgentSpecification ` + :param append_commit_message_to_run_name: Append Commit Message To BuildNumber in UI. + :type append_commit_message_to_run_name: bool :param build_number: The build number/name of the build. :type build_number: str :param build_number_revision: The build number revision. :type build_number_revision: int :param controller: The build controller. This is only set if the definition type is Xaml. - :type controller: :class:`BuildController ` + :type controller: :class:`BuildController ` :param definition: The definition associated with the build. - :type definition: :class:`DefinitionReference ` + :type definition: :class:`DefinitionReference ` :param deleted: Indicates whether the build has been deleted. :type deleted: bool :param deleted_by: The identity of the process or person that deleted the build. - :type deleted_by: :class:`IdentityRef ` + :type deleted_by: :class:`IdentityRef ` :param deleted_date: The date the build was deleted. :type deleted_date: datetime :param deleted_reason: The description of how the build was deleted. :type deleted_reason: str :param demands: A list of demands that represents the agent capabilities required by this build. - :type demands: list of :class:`object ` + :type demands: list of :class:`object ` :param finish_time: The time that the build was completed. :type finish_time: datetime :param id: The ID of the build. @@ -361,27 +363,27 @@ class Build(Model): :param keep_forever: Indicates whether the build should be skipped by retention policies. :type keep_forever: bool :param last_changed_by: The identity representing the process or person that last changed the build. - :type last_changed_by: :class:`IdentityRef ` + :type last_changed_by: :class:`IdentityRef ` :param last_changed_date: The date the build was last changed. :type last_changed_date: datetime :param logs: Information about the build logs. - :type logs: :class:`BuildLogReference ` + :type logs: :class:`BuildLogReference ` :param orchestration_plan: The orchestration plan for the build. - :type orchestration_plan: :class:`TaskOrchestrationPlanReference ` + :type orchestration_plan: :class:`TaskOrchestrationPlanReference ` :param parameters: The parameters for the build. :type parameters: str :param plans: Orchestration plans associated with the build (build, cleanup) - :type plans: list of :class:`TaskOrchestrationPlanReference ` - :param priority: The build's priority. + :type plans: list of :class:`TaskOrchestrationPlanReference ` + :param priority: Azure Pipelines does not support job priority. This field is deprecated. :type priority: object :param project: The team project. - :type project: :class:`TeamProjectReference ` + :type project: :class:`TeamProjectReference ` :param properties: - :type properties: :class:`object ` + :type properties: :class:`object ` :param quality: The quality of the xaml build (good, bad, etc.) :type quality: str :param queue: The queue. This is only set if the definition type is Build. WARNING: this field is deprecated and does not corresponds to the jobs queues. - :type queue: :class:`AgentPoolQueue ` + :type queue: :class:`AgentPoolQueue ` :param queue_options: Additional options for queueing the build. :type queue_options: object :param queue_position: The current position of the build in the queue. @@ -391,11 +393,11 @@ class Build(Model): :param reason: The reason that the build was created. :type reason: object :param repository: The repository. - :type repository: :class:`BuildRepository ` + :type repository: :class:`BuildRepository ` :param requested_by: The identity that queued the build. - :type requested_by: :class:`IdentityRef ` + :type requested_by: :class:`IdentityRef ` :param requested_for: The identity on whose behalf the build was queued. - :type requested_for: :class:`IdentityRef ` + :type requested_for: :class:`IdentityRef ` :param result: The build result. :type result: object :param retained_by_release: Indicates whether the build is retained by a release. @@ -413,7 +415,7 @@ class Build(Model): :param template_parameters: Parameters to template expression evaluation :type template_parameters: dict :param triggered_by_build: The build that triggered this build via a Build completion trigger. - :type triggered_by_build: :class:`Build ` + :type triggered_by_build: :class:`Build ` :param trigger_info: Sourceprovider-specific information about what triggered the build :type trigger_info: dict :param uri: The URI of the build. @@ -421,12 +423,13 @@ class Build(Model): :param url: The REST URL of the build. :type url: str :param validation_results: - :type validation_results: list of :class:`BuildRequestValidationResult ` + :type validation_results: list of :class:`BuildRequestValidationResult ` """ _attribute_map = { '_links': {'key': '_links', 'type': 'ReferenceLinks'}, 'agent_specification': {'key': 'agentSpecification', 'type': 'AgentSpecification'}, + 'append_commit_message_to_run_name': {'key': 'appendCommitMessageToRunName', 'type': 'bool'}, 'build_number': {'key': 'buildNumber', 'type': 'str'}, 'build_number_revision': {'key': 'buildNumberRevision', 'type': 'int'}, 'controller': {'key': 'controller', 'type': 'BuildController'}, @@ -472,10 +475,11 @@ class Build(Model): 'validation_results': {'key': 'validationResults', 'type': '[BuildRequestValidationResult]'} } - def __init__(self, _links=None, agent_specification=None, build_number=None, build_number_revision=None, controller=None, definition=None, deleted=None, deleted_by=None, deleted_date=None, deleted_reason=None, demands=None, finish_time=None, id=None, keep_forever=None, last_changed_by=None, last_changed_date=None, logs=None, orchestration_plan=None, parameters=None, plans=None, priority=None, project=None, properties=None, quality=None, queue=None, queue_options=None, queue_position=None, queue_time=None, reason=None, repository=None, requested_by=None, requested_for=None, result=None, retained_by_release=None, source_branch=None, source_version=None, start_time=None, status=None, tags=None, template_parameters=None, triggered_by_build=None, trigger_info=None, uri=None, url=None, validation_results=None): + def __init__(self, _links=None, agent_specification=None, append_commit_message_to_run_name=None, build_number=None, build_number_revision=None, controller=None, definition=None, deleted=None, deleted_by=None, deleted_date=None, deleted_reason=None, demands=None, finish_time=None, id=None, keep_forever=None, last_changed_by=None, last_changed_date=None, logs=None, orchestration_plan=None, parameters=None, plans=None, priority=None, project=None, properties=None, quality=None, queue=None, queue_options=None, queue_position=None, queue_time=None, reason=None, repository=None, requested_by=None, requested_for=None, result=None, retained_by_release=None, source_branch=None, source_version=None, start_time=None, status=None, tags=None, template_parameters=None, triggered_by_build=None, trigger_info=None, uri=None, url=None, validation_results=None): super(Build, self).__init__() self._links = _links self.agent_specification = agent_specification + self.append_commit_message_to_run_name = append_commit_message_to_run_name self.build_number = build_number self.build_number_revision = build_number_revision self.controller = controller @@ -530,7 +534,7 @@ class BuildArtifact(Model): :param name: The name of the artifact. :type name: str :param resource: The actual resource. - :type resource: :class:`ArtifactResource ` + :type resource: :class:`ArtifactResource ` :param source: The artifact source, which will be the ID of the job that produced this artifact. If an artifact is associated with multiple sources, this points to the first source. :type source: str """ @@ -575,16 +579,16 @@ class BuildDefinitionRevision(Model): """ Represents a revision of a build definition. - :param comment: The comment associated with the change. - :type comment: str - :param definition_url: A link to the definition at this revision. - :type definition_url: str :param changed_by: The identity of the person or process that changed the definition. - :type changed_by: :class:`IdentityRef ` + :type changed_by: :class:`IdentityRef ` :param changed_date: The date and time that the definition was changed. :type changed_date: datetime :param change_type: The change type (add, edit, delete). :type change_type: object + :param comment: The comment associated with the change. + :type comment: str + :param definition_url: A link to the definition at this revision. + :type definition_url: str :param name: The name of the definition. :type name: str :param revision: The revision number. @@ -592,22 +596,22 @@ class BuildDefinitionRevision(Model): """ _attribute_map = { - 'comment': {'key': 'comment', 'type': 'str'}, - 'definition_url': {'key': 'definitionUrl', 'type': 'str'}, 'changed_by': {'key': 'changedBy', 'type': 'IdentityRef'}, 'changed_date': {'key': 'changedDate', 'type': 'iso-8601'}, 'change_type': {'key': 'changeType', 'type': 'object'}, + 'comment': {'key': 'comment', 'type': 'str'}, + 'definition_url': {'key': 'definitionUrl', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'revision': {'key': 'revision', 'type': 'int'} } - def __init__(self, comment=None, definition_url=None, changed_by=None, changed_date=None, change_type=None, name=None, revision=None): + def __init__(self, changed_by=None, changed_date=None, change_type=None, comment=None, definition_url=None, name=None, revision=None): super(BuildDefinitionRevision, self).__init__() - self.comment = comment - self.definition_url = definition_url self.changed_by = changed_by self.changed_date = changed_date self.change_type = change_type + self.comment = comment + self.definition_url = definition_url self.name = name self.revision = revision @@ -635,7 +639,7 @@ class BuildDefinitionStep(Model): :param retry_count_on_task_failure: Number of retries. :type retry_count_on_task_failure: int :param task: The task associated with this step. - :type task: :class:`TaskDefinitionReference ` + :type task: :class:`TaskDefinitionReference ` :param timeout_in_minutes: The time, in minutes, that this step is allowed to run. :type timeout_in_minutes: int """ @@ -690,7 +694,7 @@ class BuildDefinitionTemplate(Model): :param name: The name of the template. :type name: str :param template: The actual template. - :type template: :class:`BuildDefinition ` + :type template: :class:`BuildDefinition ` """ _attribute_map = { @@ -739,7 +743,7 @@ class BuildDefinitionTemplate3_2(Model): :param name: :type name: str :param template: - :type template: :class:`BuildDefinition3_2 ` + :type template: :class:`BuildDefinition3_2 ` """ _attribute_map = { @@ -851,7 +855,7 @@ class BuildOption(Model): Represents the application of an optional behavior to a build definition. :param definition: A reference to the build option. - :type definition: :class:`BuildOptionDefinitionReference ` + :type definition: :class:`BuildOptionDefinitionReference ` :param enabled: Indicates whether the behavior is enabled. :type enabled: bool :param inputs: @@ -991,12 +995,12 @@ class BuildRepository(Model): """ Represents a repository used by a build definition. + :param checkout_submodules: Indicates whether to checkout submodules. + :type checkout_submodules: bool :param clean: Indicates whether to clean the target folder when getting code from the repository. :type clean: str :param default_branch: The name of the default branch. :type default_branch: str - :param checkout_submodules: Indicates whether to checkout submodules. - :type checkout_submodules: bool :param id: The ID of the repository. :type id: str :param name: The friendly name of the repository. @@ -1012,9 +1016,9 @@ class BuildRepository(Model): """ _attribute_map = { + 'checkout_submodules': {'key': 'checkoutSubmodules', 'type': 'bool'}, 'clean': {'key': 'clean', 'type': 'str'}, 'default_branch': {'key': 'defaultBranch', 'type': 'str'}, - 'checkout_submodules': {'key': 'checkoutSubmodules', 'type': 'bool'}, 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'properties': {'key': 'properties', 'type': '{str}'}, @@ -1023,11 +1027,11 @@ class BuildRepository(Model): 'url': {'key': 'url', 'type': 'str'} } - def __init__(self, clean=None, default_branch=None, checkout_submodules=None, id=None, name=None, properties=None, root_folder=None, type=None, url=None): + def __init__(self, checkout_submodules=None, clean=None, default_branch=None, id=None, name=None, properties=None, root_folder=None, type=None, url=None): super(BuildRepository, self).__init__() + self.checkout_submodules = checkout_submodules self.clean = clean self.default_branch = default_branch - self.checkout_submodules = checkout_submodules self.id = id self.name = name self.properties = properties @@ -1091,7 +1095,7 @@ class BuildRetentionHistory(Model): A historical overview of build retention information. This includes a list of snapshots taken about build retention usage, and a list of builds that have exceeded the default 30 day retention policy. :param build_retention_samples: A list of builds that are older than the default retention policy, but are not marked as retained. Something is causing these builds to not get cleaned up. - :type build_retention_samples: list of :class:`BuildRetentionSample ` + :type build_retention_samples: list of :class:`BuildRetentionSample ` """ _attribute_map = { @@ -1139,9 +1143,9 @@ class BuildSettings(Model): :param days_to_keep_deleted_builds_before_destroy: The number of days to keep records of deleted builds. :type days_to_keep_deleted_builds_before_destroy: int :param default_retention_policy: The default retention policy. - :type default_retention_policy: :class:`RetentionPolicy ` + :type default_retention_policy: :class:`RetentionPolicy ` :param maximum_retention_policy: The maximum retention policy. - :type maximum_retention_policy: :class:`RetentionPolicy ` + :type maximum_retention_policy: :class:`RetentionPolicy ` """ _attribute_map = { @@ -1157,6 +1161,55 @@ def __init__(self, days_to_keep_deleted_builds_before_destroy=None, default_rete self.maximum_retention_policy = maximum_retention_policy +class Change(Model): + """ + Represents a change associated with a build. + + :param author: The author of the change. + :type author: :class:`IdentityRef ` + :param display_uri: The location of a user-friendly representation of the resource. + :type display_uri: str + :param id: The identifier for the change. For a commit, this would be the SHA1. For a TFVC changeset, this would be the changeset ID. + :type id: str + :param location: The location of the full representation of the resource. + :type location: str + :param message: The description of the change. This might be a commit message or changeset description. + :type message: str + :param message_truncated: Indicates whether the message was truncated. + :type message_truncated: bool + :param pusher: The person or process that pushed the change. + :type pusher: str + :param timestamp: The timestamp for the change. + :type timestamp: datetime + :param type: The type of change. "commit", "changeset", etc. + :type type: str + """ + + _attribute_map = { + 'author': {'key': 'author', 'type': 'IdentityRef'}, + 'display_uri': {'key': 'displayUri', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'message_truncated': {'key': 'messageTruncated', 'type': 'bool'}, + 'pusher': {'key': 'pusher', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'type': {'key': 'type', 'type': 'str'} + } + + def __init__(self, author=None, display_uri=None, id=None, location=None, message=None, message_truncated=None, pusher=None, timestamp=None, type=None): + super(Change, self).__init__() + self.author = author + self.display_uri = display_uri + self.id = id + self.location = location + self.message = message + self.message_truncated = message_truncated + self.pusher = pusher + self.timestamp = timestamp + self.type = type + + class DataSourceBindingBase(Model): """ Represents binding of data source for the service endpoint request. @@ -1172,7 +1225,7 @@ class DataSourceBindingBase(Model): :param endpoint_url: Gets or sets the url of the service endpoint. :type endpoint_url: str :param headers: Gets or sets the authorization headers. - :type headers: list of :class:`AuthorizationHeader ` + :type headers: list of :class:`AuthorizationHeader ` :param initial_context_template: Defines the initial value of the query params :type initial_context_template: str :param parameters: Gets or sets the parameters for the data source. @@ -1235,7 +1288,7 @@ class DefinitionReference(Model): :param path: The folder path of the definition. :type path: str :param project: A reference to the project. - :type project: :class:`TeamProjectReference ` + :type project: :class:`TeamProjectReference ` :param queue_status: A value that indicates whether builds can be queued against this definition. :type queue_status: object :param revision: The definition revision number. @@ -1324,19 +1377,19 @@ class Folder(Model): Represents a folder that contains build definitions. :param created_by: The process or person who created the folder. - :type created_by: :class:`IdentityRef ` + :type created_by: :class:`IdentityRef ` :param created_on: The date the folder was created. :type created_on: datetime :param description: The description. :type description: str :param last_changed_by: The process or person that last changed the folder. - :type last_changed_by: :class:`IdentityRef ` + :type last_changed_by: :class:`IdentityRef ` :param last_changed_date: The date the folder was last changed. :type last_changed_date: datetime :param path: The full path. :type path: str :param project: The project. - :type project: :class:`TeamProjectReference ` + :type project: :class:`TeamProjectReference ` """ _attribute_map = { @@ -1363,7 +1416,7 @@ def __init__(self, created_by=None, created_on=None, description=None, last_chan class GraphSubjectBase(Model): """ :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. :type descriptor: str :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. @@ -1387,59 +1440,10 @@ def __init__(self, _links=None, descriptor=None, display_name=None, url=None): self.url = url -class Change(Model): - """ - Represents a change associated with a build. - - :param author: The author of the change. - :type author: :class:`IdentityRef ` - :param display_uri: The location of a user-friendly representation of the resource. - :type display_uri: str - :param id: The identifier for the change. For a commit, this would be the SHA1. For a TFVC changeset, this would be the changeset ID. - :type id: str - :param location: The location of the full representation of the resource. - :type location: str - :param message: The description of the change. This might be a commit message or changeset description. - :type message: str - :param message_truncated: Indicates whether the message was truncated. - :type message_truncated: bool - :param pusher: The person or process that pushed the change. - :type pusher: str - :param timestamp: The timestamp for the change. - :type timestamp: datetime - :param type: The type of change. "commit", "changeset", etc. - :type type: str - """ - - _attribute_map = { - 'author': {'key': 'author', 'type': 'IdentityRef'}, - 'display_uri': {'key': 'displayUri', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'message_truncated': {'key': 'messageTruncated', 'type': 'bool'}, - 'pusher': {'key': 'pusher', 'type': 'str'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'type': {'key': 'type', 'type': 'str'} - } - - def __init__(self, author=None, display_uri=None, id=None, location=None, message=None, message_truncated=None, pusher=None, timestamp=None, type=None): - super(Change, self).__init__() - self.author = author - self.display_uri = display_uri - self.id = id - self.location = location - self.message = message - self.message_truncated = message_truncated - self.pusher = pusher - self.timestamp = timestamp - self.type = type - - class IdentityRef(GraphSubjectBase): """ :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. :type descriptor: str :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. @@ -1655,36 +1659,92 @@ class PipelineGeneralSettings(Model): """ Contains pipeline general settings. + :param audit_enforce_settable_var: If enabled, audit logs will be generated whenever someone queues a pipeline run and defines variables that are not marked as "Settable at queue time". + :type audit_enforce_settable_var: bool + :param builds_enabled_for_forks: Enable forked repositories to build pull requests. + :type builds_enabled_for_forks: bool + :param disable_classic_build_pipeline_creation: Disable classic build pipelines creation. + :type disable_classic_build_pipeline_creation: bool + :param disable_classic_pipeline_creation: Disable classic pipelines creation. + :type disable_classic_pipeline_creation: bool + :param disable_classic_release_pipeline_creation: Disable classic release pipelines creation. + :type disable_classic_release_pipeline_creation: bool + :param disable_implied_yAMLCi_trigger: Disable implied pipeline CI triggers if the trigger section in YAML is missing. + :type disable_implied_yAMLCi_trigger: bool + :param enable_shell_tasks_args_sanitizing: Enable shell tasks args sanitizing. + :type enable_shell_tasks_args_sanitizing: bool + :param enable_shell_tasks_args_sanitizing_audit: Enable shell tasks args sanitizing preview. + :type enable_shell_tasks_args_sanitizing_audit: bool :param enforce_job_auth_scope: If enabled, scope of access for all non-release pipelines reduces to the current project. :type enforce_job_auth_scope: bool + :param enforce_job_auth_scope_for_forks: Enforce job auth scope for builds of forked repositories. + :type enforce_job_auth_scope_for_forks: bool :param enforce_job_auth_scope_for_releases: If enabled, scope of access for all release pipelines reduces to the current project. :type enforce_job_auth_scope_for_releases: bool + :param enforce_no_access_to_secrets_from_forks: Enforce no access to secrets for builds of forked repositories. + :type enforce_no_access_to_secrets_from_forks: bool :param enforce_referenced_repo_scoped_token: Restricts the scope of access for all pipelines to only repositories explicitly referenced by the pipeline. :type enforce_referenced_repo_scoped_token: bool :param enforce_settable_var: If enabled, only those variables that are explicitly marked as "Settable at queue time" can be set at queue time. :type enforce_settable_var: bool + :param fork_protection_enabled: Enable settings that enforce certain levels of protection for building pull requests from forks globally. + :type fork_protection_enabled: bool + :param is_comment_required_for_pull_request: Make comments required to have builds in all pull requests. + :type is_comment_required_for_pull_request: bool :param publish_pipeline_metadata: Allows pipelines to record metadata. :type publish_pipeline_metadata: bool + :param require_comments_for_non_team_member_and_non_contributors: Make comments required to have builds in pull requests from non-team members and non-contributors. + :type require_comments_for_non_team_member_and_non_contributors: bool + :param require_comments_for_non_team_members_only: Make comments required to have builds in pull requests from non-team members. + :type require_comments_for_non_team_members_only: bool :param status_badges_are_private: Anonymous users can access the status badge API for all pipelines unless this option is enabled. :type status_badges_are_private: bool """ _attribute_map = { + 'audit_enforce_settable_var': {'key': 'auditEnforceSettableVar', 'type': 'bool'}, + 'builds_enabled_for_forks': {'key': 'buildsEnabledForForks', 'type': 'bool'}, + 'disable_classic_build_pipeline_creation': {'key': 'disableClassicBuildPipelineCreation', 'type': 'bool'}, + 'disable_classic_pipeline_creation': {'key': 'disableClassicPipelineCreation', 'type': 'bool'}, + 'disable_classic_release_pipeline_creation': {'key': 'disableClassicReleasePipelineCreation', 'type': 'bool'}, + 'disable_implied_yAMLCi_trigger': {'key': 'disableImpliedYAMLCiTrigger', 'type': 'bool'}, + 'enable_shell_tasks_args_sanitizing': {'key': 'enableShellTasksArgsSanitizing', 'type': 'bool'}, + 'enable_shell_tasks_args_sanitizing_audit': {'key': 'enableShellTasksArgsSanitizingAudit', 'type': 'bool'}, 'enforce_job_auth_scope': {'key': 'enforceJobAuthScope', 'type': 'bool'}, + 'enforce_job_auth_scope_for_forks': {'key': 'enforceJobAuthScopeForForks', 'type': 'bool'}, 'enforce_job_auth_scope_for_releases': {'key': 'enforceJobAuthScopeForReleases', 'type': 'bool'}, + 'enforce_no_access_to_secrets_from_forks': {'key': 'enforceNoAccessToSecretsFromForks', 'type': 'bool'}, 'enforce_referenced_repo_scoped_token': {'key': 'enforceReferencedRepoScopedToken', 'type': 'bool'}, 'enforce_settable_var': {'key': 'enforceSettableVar', 'type': 'bool'}, + 'fork_protection_enabled': {'key': 'forkProtectionEnabled', 'type': 'bool'}, + 'is_comment_required_for_pull_request': {'key': 'isCommentRequiredForPullRequest', 'type': 'bool'}, 'publish_pipeline_metadata': {'key': 'publishPipelineMetadata', 'type': 'bool'}, + 'require_comments_for_non_team_member_and_non_contributors': {'key': 'requireCommentsForNonTeamMemberAndNonContributors', 'type': 'bool'}, + 'require_comments_for_non_team_members_only': {'key': 'requireCommentsForNonTeamMembersOnly', 'type': 'bool'}, 'status_badges_are_private': {'key': 'statusBadgesArePrivate', 'type': 'bool'} } - def __init__(self, enforce_job_auth_scope=None, enforce_job_auth_scope_for_releases=None, enforce_referenced_repo_scoped_token=None, enforce_settable_var=None, publish_pipeline_metadata=None, status_badges_are_private=None): + def __init__(self, audit_enforce_settable_var=None, builds_enabled_for_forks=None, disable_classic_build_pipeline_creation=None, disable_classic_pipeline_creation=None, disable_classic_release_pipeline_creation=None, disable_implied_yAMLCi_trigger=None, enable_shell_tasks_args_sanitizing=None, enable_shell_tasks_args_sanitizing_audit=None, enforce_job_auth_scope=None, enforce_job_auth_scope_for_forks=None, enforce_job_auth_scope_for_releases=None, enforce_no_access_to_secrets_from_forks=None, enforce_referenced_repo_scoped_token=None, enforce_settable_var=None, fork_protection_enabled=None, is_comment_required_for_pull_request=None, publish_pipeline_metadata=None, require_comments_for_non_team_member_and_non_contributors=None, require_comments_for_non_team_members_only=None, status_badges_are_private=None): super(PipelineGeneralSettings, self).__init__() + self.audit_enforce_settable_var = audit_enforce_settable_var + self.builds_enabled_for_forks = builds_enabled_for_forks + self.disable_classic_build_pipeline_creation = disable_classic_build_pipeline_creation + self.disable_classic_pipeline_creation = disable_classic_pipeline_creation + self.disable_classic_release_pipeline_creation = disable_classic_release_pipeline_creation + self.disable_implied_yAMLCi_trigger = disable_implied_yAMLCi_trigger + self.enable_shell_tasks_args_sanitizing = enable_shell_tasks_args_sanitizing + self.enable_shell_tasks_args_sanitizing_audit = enable_shell_tasks_args_sanitizing_audit self.enforce_job_auth_scope = enforce_job_auth_scope + self.enforce_job_auth_scope_for_forks = enforce_job_auth_scope_for_forks self.enforce_job_auth_scope_for_releases = enforce_job_auth_scope_for_releases + self.enforce_no_access_to_secrets_from_forks = enforce_no_access_to_secrets_from_forks self.enforce_referenced_repo_scoped_token = enforce_referenced_repo_scoped_token self.enforce_settable_var = enforce_settable_var + self.fork_protection_enabled = fork_protection_enabled + self.is_comment_required_for_pull_request = is_comment_required_for_pull_request self.publish_pipeline_metadata = publish_pipeline_metadata + self.require_comments_for_non_team_member_and_non_contributors = require_comments_for_non_team_member_and_non_contributors + self.require_comments_for_non_team_members_only = require_comments_for_non_team_members_only self.status_badges_are_private = status_badges_are_private @@ -1693,13 +1753,13 @@ class PipelineReference(Model): Pipeline reference :param job_reference: Reference of the job - :type job_reference: :class:`JobReference ` + :type job_reference: :class:`JobReference ` :param phase_reference: Reference of the phase. - :type phase_reference: :class:`PhaseReference ` + :type phase_reference: :class:`PhaseReference ` :param pipeline_id: Reference of the pipeline with which this pipeline instance is related. :type pipeline_id: int :param stage_reference: Reference of the stage. - :type stage_reference: :class:`StageReference ` + :type stage_reference: :class:`StageReference ` """ _attribute_map = { @@ -1720,11 +1780,11 @@ def __init__(self, job_reference=None, phase_reference=None, pipeline_id=None, s class ProcessParameters(Model): """ :param data_source_bindings: - :type data_source_bindings: list of :class:`DataSourceBindingBase ` + :type data_source_bindings: list of :class:`DataSourceBindingBase ` :param inputs: - :type inputs: list of :class:`TaskInputDefinitionBase ` + :type inputs: list of :class:`TaskInputDefinitionBase ` :param source_definitions: - :type source_definitions: list of :class:`TaskSourceDefinitionBase ` + :type source_definitions: list of :class:`TaskSourceDefinitionBase ` """ _attribute_map = { @@ -1745,13 +1805,13 @@ class ProjectRetentionSetting(Model): Contains the settings for the retention rules. :param purge_artifacts: The rules for artifact retention. Artifacts can not live longer than a run, so will be overridden by a shorter run purge setting. - :type purge_artifacts: :class:`RetentionSetting ` + :type purge_artifacts: :class:`RetentionSetting ` :param purge_pull_request_runs: The rules for pull request pipeline run retention. - :type purge_pull_request_runs: :class:`RetentionSetting ` + :type purge_pull_request_runs: :class:`RetentionSetting ` :param purge_runs: The rules for pipeline run retention. - :type purge_runs: :class:`RetentionSetting ` + :type purge_runs: :class:`RetentionSetting ` :param retain_runs_per_protected_branch: The rules for retaining runs per protected branch. - :type retain_runs_per_protected_branch: :class:`RetentionSetting ` + :type retain_runs_per_protected_branch: :class:`RetentionSetting ` """ _attribute_map = { @@ -1774,9 +1834,9 @@ class PullRequest(Model): Represents a pull request object. These are retrieved from Source Providers. :param _links: The links to other objects related to this object. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param author: Author of the pull request. - :type author: :class:`IdentityRef ` + :type author: :class:`IdentityRef ` :param current_state: Current state of the pull request, e.g. open, merged, closed, conflicts, etc. :type current_state: str :param description: Description for the pull request. @@ -2079,7 +2139,7 @@ class SourceProviderAttributes(Model): :param supported_capabilities: The capabilities supported by this source provider. :type supported_capabilities: dict :param supported_triggers: The types of triggers supported by this source provider. - :type supported_triggers: list of :class:`SupportedTrigger ` + :type supported_triggers: list of :class:`SupportedTrigger ` """ _attribute_map = { @@ -2104,7 +2164,7 @@ class SourceRepositories(Model): :param page_length: The number of repositories requested for each page :type page_length: int :param repositories: A list of repositories - :type repositories: list of :class:`SourceRepository ` + :type repositories: list of :class:`SourceRepository ` :param total_page_count: The total number of pages, or '-1' if unknown :type total_page_count: int """ @@ -2315,7 +2375,7 @@ class TaskInputDefinitionBase(Model): :param type: :type type: str :param validation: - :type validation: :class:`TaskInputValidation ` + :type validation: :class:`TaskInputValidation ` :param visible_rule: :type visible_rule: str """ @@ -2503,13 +2563,13 @@ def __init__(self, abbreviation=None, default_team_image_url=None, description=N class TestResultsContext(Model): """ :param build: - :type build: :class:`BuildReference ` + :type build: :class:`BuildReference ` :param context_type: :type context_type: object :param pipeline_reference: - :type pipeline_reference: :class:`PipelineReference ` + :type pipeline_reference: :class:`PipelineReference ` :param release: - :type release: :class:`ReleaseReference ` + :type release: :class:`ReleaseReference ` """ _attribute_map = { @@ -2555,29 +2615,29 @@ class TimelineRecord(Model): Represents an entry in a build's timeline. :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param attempt: Attempt number of record. :type attempt: int + :param change_id: The change ID. + :type change_id: int :param current_operation: A string that indicates the current operation. :type current_operation: str :param details: A reference to a sub-timeline. - :type details: :class:`TimelineReference ` + :type details: :class:`TimelineReference ` :param error_count: The number of errors produced by this operation. :type error_count: int :param finish_time: The finish time. :type finish_time: datetime - :param change_id: The change ID. - :type change_id: int :param id: The ID of the record. :type id: str :param identifier: String identifier that is consistent across attempts. :type identifier: str :param issues: - :type issues: list of :class:`Issue ` + :type issues: list of :class:`Issue ` :param last_modified: The time the record was last modified. :type last_modified: datetime :param log: A reference to the log produced by this operation. - :type log: :class:`BuildLogReference ` + :type log: :class:`BuildLogReference ` :param name: The name. :type name: str :param order: An ordinal value relative to other records. @@ -2587,7 +2647,7 @@ class TimelineRecord(Model): :param percent_complete: The current completion percentage. :type percent_complete: int :param previous_attempts: - :type previous_attempts: list of :class:`TimelineAttempt ` + :type previous_attempts: list of :class:`TimelineAttempt ` :param queue_id: The queue ID of the queue that the operation ran on. :type queue_id: int :param result: The result. @@ -2599,7 +2659,7 @@ class TimelineRecord(Model): :param state: The state of the record. :type state: object :param task: A reference to the task represented by this timeline record. - :type task: :class:`TaskReference ` + :type task: :class:`TaskReference ` :param type: The type of the record. :type type: str :param url: The REST URL of the timeline record. @@ -2613,11 +2673,11 @@ class TimelineRecord(Model): _attribute_map = { '_links': {'key': '_links', 'type': 'ReferenceLinks'}, 'attempt': {'key': 'attempt', 'type': 'int'}, + 'change_id': {'key': 'changeId', 'type': 'int'}, 'current_operation': {'key': 'currentOperation', 'type': 'str'}, 'details': {'key': 'details', 'type': 'TimelineReference'}, 'error_count': {'key': 'errorCount', 'type': 'int'}, 'finish_time': {'key': 'finishTime', 'type': 'iso-8601'}, - 'change_id': {'key': 'changeId', 'type': 'int'}, 'id': {'key': 'id', 'type': 'str'}, 'identifier': {'key': 'identifier', 'type': 'str'}, 'issues': {'key': 'issues', 'type': '[Issue]'}, @@ -2640,15 +2700,15 @@ class TimelineRecord(Model): 'worker_name': {'key': 'workerName', 'type': 'str'} } - def __init__(self, _links=None, attempt=None, current_operation=None, details=None, error_count=None, finish_time=None, change_id=None, id=None, identifier=None, issues=None, last_modified=None, log=None, name=None, order=None, parent_id=None, percent_complete=None, previous_attempts=None, queue_id=None, result=None, result_code=None, start_time=None, state=None, task=None, type=None, url=None, warning_count=None, worker_name=None): + def __init__(self, _links=None, attempt=None, change_id=None, current_operation=None, details=None, error_count=None, finish_time=None, id=None, identifier=None, issues=None, last_modified=None, log=None, name=None, order=None, parent_id=None, percent_complete=None, previous_attempts=None, queue_id=None, result=None, result_code=None, start_time=None, state=None, task=None, type=None, url=None, warning_count=None, worker_name=None): super(TimelineRecord, self).__init__() self._links = _links self.attempt = attempt + self.change_id = change_id self.current_operation = current_operation self.details = details self.error_count = error_count self.finish_time = finish_time - self.change_id = change_id self.id = id self.identifier = identifier self.issues = issues @@ -2701,13 +2761,13 @@ class UpdateProjectRetentionSettingModel(Model): Contains members for updating the retention settings values. All fields are optional. :param artifacts_retention: - :type artifacts_retention: :class:`UpdateRetentionSettingModel ` + :type artifacts_retention: :class:`UpdateRetentionSettingModel ` :param pull_request_run_retention: - :type pull_request_run_retention: :class:`UpdateRetentionSettingModel ` + :type pull_request_run_retention: :class:`UpdateRetentionSettingModel ` :param retain_runs_per_protected_branch: - :type retain_runs_per_protected_branch: :class:`UpdateRetentionSettingModel ` + :type retain_runs_per_protected_branch: :class:`UpdateRetentionSettingModel ` :param run_retention: - :type run_retention: :class:`UpdateRetentionSettingModel ` + :type run_retention: :class:`UpdateRetentionSettingModel ` """ _attribute_map = { @@ -2744,18 +2804,22 @@ class UpdateStageParameters(Model): """ :param force_retry_all_jobs: :type force_retry_all_jobs: bool + :param retry_dependencies: + :type retry_dependencies: bool :param state: :type state: object """ _attribute_map = { 'force_retry_all_jobs': {'key': 'forceRetryAllJobs', 'type': 'bool'}, + 'retry_dependencies': {'key': 'retryDependencies', 'type': 'bool'}, 'state': {'key': 'state', 'type': 'object'} } - def __init__(self, force_retry_all_jobs=None, state=None): + def __init__(self, force_retry_all_jobs=None, retry_dependencies=None, state=None): super(UpdateStageParameters, self).__init__() self.force_retry_all_jobs = force_retry_all_jobs + self.retry_dependencies = retry_dependencies self.state = state @@ -2867,7 +2931,7 @@ class BuildController(XamlBuildControllerReference): :param url: Full http link to the resource :type url: str :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param created_date: The date the controller was created. :type created_date: datetime :param description: The description of the controller. @@ -2919,7 +2983,7 @@ class BuildDefinitionReference(DefinitionReference): :param path: The folder path of the definition. :type path: str :param project: A reference to the project. - :type project: :class:`TeamProjectReference ` + :type project: :class:`TeamProjectReference ` :param queue_status: A value that indicates whether builds can be queued against this definition. :type queue_status: object :param revision: The definition revision number. @@ -2931,23 +2995,23 @@ class BuildDefinitionReference(DefinitionReference): :param url: The REST URL of the definition. :type url: str :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param authored_by: The author of the definition. - :type authored_by: :class:`IdentityRef ` + :type authored_by: :class:`IdentityRef ` :param draft_of: A reference to the definition that this definition is a draft of, if this is a draft definition. - :type draft_of: :class:`DefinitionReference ` + :type draft_of: :class:`DefinitionReference ` :param drafts: The list of drafts associated with this definition, if this is not a draft definition. - :type drafts: list of :class:`DefinitionReference ` + :type drafts: list of :class:`DefinitionReference ` :param latest_build: - :type latest_build: :class:`Build ` + :type latest_build: :class:`Build ` :param latest_completed_build: - :type latest_completed_build: :class:`Build ` + :type latest_completed_build: :class:`Build ` :param metrics: - :type metrics: list of :class:`BuildMetric ` + :type metrics: list of :class:`BuildMetric ` :param quality: The quality of the definition document (draft, etc.) :type quality: object :param queue: The default queue for builds run against this definition. - :type queue: :class:`AgentPoolQueue ` + :type queue: :class:`AgentPoolQueue ` """ _attribute_map = { @@ -2998,7 +3062,7 @@ class BuildDefinitionReference3_2(DefinitionReference): :param path: The folder path of the definition. :type path: str :param project: A reference to the project. - :type project: :class:`TeamProjectReference ` + :type project: :class:`TeamProjectReference ` :param queue_status: A value that indicates whether builds can be queued against this definition. :type queue_status: object :param revision: The definition revision number. @@ -3010,19 +3074,19 @@ class BuildDefinitionReference3_2(DefinitionReference): :param url: The REST URL of the definition. :type url: str :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param authored_by: The author of the definition. - :type authored_by: :class:`IdentityRef ` + :type authored_by: :class:`IdentityRef ` :param draft_of: A reference to the definition that this definition is a draft of, if this is a draft definition. - :type draft_of: :class:`DefinitionReference ` + :type draft_of: :class:`DefinitionReference ` :param drafts: The list of drafts associated with this definition, if this is not a draft definition. - :type drafts: list of :class:`DefinitionReference ` + :type drafts: list of :class:`DefinitionReference ` :param metrics: - :type metrics: list of :class:`BuildMetric ` + :type metrics: list of :class:`BuildMetric ` :param quality: The quality of the definition document (draft, etc.) :type quality: object :param queue: The default queue for builds run against this definition. - :type queue: :class:`AgentPoolQueue ` + :type queue: :class:`AgentPoolQueue ` """ _attribute_map = { @@ -3099,9 +3163,9 @@ class BuildOptionDefinition(BuildOptionDefinitionReference): :param description: The description. :type description: str :param groups: The list of input groups defined for the build option. - :type groups: list of :class:`BuildOptionGroupDefinition ` + :type groups: list of :class:`BuildOptionGroupDefinition ` :param inputs: The list of inputs defined for the build option. - :type inputs: list of :class:`BuildOptionInputDefinition ` + :type inputs: list of :class:`BuildOptionInputDefinition ` :param name: The name of the build option. :type name: str :param ordinal: A value that indicates the relative order in which the behavior should be applied. @@ -3141,7 +3205,7 @@ class Timeline(TimelineReference): :param last_changed_on: The time the timeline was last changed. :type last_changed_on: datetime :param records: - :type records: list of :class:`TimelineRecord ` + :type records: list of :class:`TimelineRecord ` """ _attribute_map = { @@ -3208,7 +3272,7 @@ class BuildDefinition(BuildDefinitionReference): :param path: The folder path of the definition. :type path: str :param project: A reference to the project. - :type project: :class:`TeamProjectReference ` + :type project: :class:`TeamProjectReference ` :param queue_status: A value that indicates whether builds can be queued against this definition. :type queue_status: object :param revision: The definition revision number. @@ -3220,23 +3284,23 @@ class BuildDefinition(BuildDefinitionReference): :param url: The REST URL of the definition. :type url: str :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param authored_by: The author of the definition. - :type authored_by: :class:`IdentityRef ` + :type authored_by: :class:`IdentityRef ` :param draft_of: A reference to the definition that this definition is a draft of, if this is a draft definition. - :type draft_of: :class:`DefinitionReference ` + :type draft_of: :class:`DefinitionReference ` :param drafts: The list of drafts associated with this definition, if this is not a draft definition. - :type drafts: list of :class:`DefinitionReference ` + :type drafts: list of :class:`DefinitionReference ` :param latest_build: - :type latest_build: :class:`Build ` + :type latest_build: :class:`Build ` :param latest_completed_build: - :type latest_completed_build: :class:`Build ` + :type latest_completed_build: :class:`Build ` :param metrics: - :type metrics: list of :class:`BuildMetric ` + :type metrics: list of :class:`BuildMetric ` :param quality: The quality of the definition document (draft, etc.) :type quality: object :param queue: The default queue for builds run against this definition. - :type queue: :class:`AgentPoolQueue ` + :type queue: :class:`AgentPoolQueue ` :param badge_enabled: Indicates whether badges are enabled for this definition. :type badge_enabled: bool :param build_number_format: The build number format. @@ -3244,7 +3308,7 @@ class BuildDefinition(BuildDefinitionReference): :param comment: A save-time comment for the definition. :type comment: str :param demands: - :type demands: list of :class:`object ` + :type demands: list of :class:`object ` :param description: The description. :type description: str :param drop_location: The drop location for the definition. @@ -3256,23 +3320,23 @@ class BuildDefinition(BuildDefinitionReference): :param job_timeout_in_minutes: The job execution timeout (in minutes) for builds queued against this definition. :type job_timeout_in_minutes: int :param options: - :type options: list of :class:`BuildOption ` + :type options: list of :class:`BuildOption ` :param process: The build process. - :type process: :class:`object ` + :type process: :class:`object ` :param process_parameters: The process parameters for this definition. - :type process_parameters: :class:`ProcessParameters ` + :type process_parameters: :class:`ProcessParameters ` :param properties: - :type properties: :class:`object ` + :type properties: :class:`object ` :param repository: The repository. - :type repository: :class:`BuildRepository ` + :type repository: :class:`BuildRepository ` :param retention_rules: - :type retention_rules: list of :class:`RetentionPolicy ` + :type retention_rules: list of :class:`RetentionPolicy ` :param tags: :type tags: list of str :param triggers: - :type triggers: list of :class:`object ` + :type triggers: list of :class:`object ` :param variable_groups: - :type variable_groups: list of :class:`VariableGroup ` + :type variable_groups: list of :class:`VariableGroup ` :param variables: :type variables: dict """ @@ -3354,7 +3418,7 @@ class BuildDefinition3_2(BuildDefinitionReference3_2): :param path: The folder path of the definition. :type path: str :param project: A reference to the project. - :type project: :class:`TeamProjectReference ` + :type project: :class:`TeamProjectReference ` :param queue_status: A value that indicates whether builds can be queued against this definition. :type queue_status: object :param revision: The definition revision number. @@ -3366,29 +3430,29 @@ class BuildDefinition3_2(BuildDefinitionReference3_2): :param url: The REST URL of the definition. :type url: str :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param authored_by: The author of the definition. - :type authored_by: :class:`IdentityRef ` + :type authored_by: :class:`IdentityRef ` :param draft_of: A reference to the definition that this definition is a draft of, if this is a draft definition. - :type draft_of: :class:`DefinitionReference ` + :type draft_of: :class:`DefinitionReference ` :param drafts: The list of drafts associated with this definition, if this is not a draft definition. - :type drafts: list of :class:`DefinitionReference ` + :type drafts: list of :class:`DefinitionReference ` :param metrics: - :type metrics: list of :class:`BuildMetric ` + :type metrics: list of :class:`BuildMetric ` :param quality: The quality of the definition document (draft, etc.) :type quality: object :param queue: The default queue for builds run against this definition. - :type queue: :class:`AgentPoolQueue ` + :type queue: :class:`AgentPoolQueue ` :param badge_enabled: Indicates whether badges are enabled for this definition :type badge_enabled: bool :param build: - :type build: list of :class:`BuildDefinitionStep ` + :type build: list of :class:`BuildDefinitionStep ` :param build_number_format: The build number format :type build_number_format: str :param comment: The comment entered when saving the definition :type comment: str :param demands: - :type demands: list of :class:`object ` + :type demands: list of :class:`object ` :param description: The description :type description: str :param drop_location: The drop location for the definition @@ -3400,23 +3464,23 @@ class BuildDefinition3_2(BuildDefinitionReference3_2): :param job_timeout_in_minutes: The job execution timeout in minutes for builds which are queued against this definition :type job_timeout_in_minutes: int :param latest_build: - :type latest_build: :class:`Build ` + :type latest_build: :class:`Build ` :param latest_completed_build: - :type latest_completed_build: :class:`Build ` + :type latest_completed_build: :class:`Build ` :param options: - :type options: list of :class:`BuildOption ` + :type options: list of :class:`BuildOption ` :param process_parameters: Process Parameters - :type process_parameters: :class:`ProcessParameters ` + :type process_parameters: :class:`ProcessParameters ` :param properties: - :type properties: :class:`object ` + :type properties: :class:`object ` :param repository: The repository - :type repository: :class:`BuildRepository ` + :type repository: :class:`BuildRepository ` :param retention_rules: - :type retention_rules: list of :class:`RetentionPolicy ` + :type retention_rules: list of :class:`RetentionPolicy ` :param tags: :type tags: list of str :param triggers: - :type triggers: list of :class:`object ` + :type triggers: list of :class:`object ` :param variables: :type variables: dict """ @@ -3518,13 +3582,13 @@ def __init__(self, created_date=None, id=None, name=None, path=None, project=Non 'BuildRetentionHistory', 'BuildRetentionSample', 'BuildSettings', + 'Change', 'DataSourceBindingBase', 'DefinitionReference', 'DefinitionResourceReference', 'Deployment', 'Folder', 'GraphSubjectBase', - 'Change', 'IdentityRef', 'Issue', 'JobReference', diff --git a/azure-devops/azure/devops/v7_0/cix/__init__.py b/azure-devops/azure/devops/v7_2/cix/__init__.py similarity index 100% rename from azure-devops/azure/devops/v7_0/cix/__init__.py rename to azure-devops/azure/devops/v7_2/cix/__init__.py diff --git a/azure-devops/azure/devops/v7_0/cix/cix_client.py b/azure-devops/azure/devops/v7_2/cix/cix_client.py similarity index 89% rename from azure-devops/azure/devops/v7_0/cix/cix_client.py rename to azure-devops/azure/devops/v7_2/cix/cix_client.py index 3c82565c..a4c65dcb 100644 --- a/azure-devops/azure/devops/v7_0/cix/cix_client.py +++ b/azure-devops/azure/devops/v7_2/cix/cix_client.py @@ -27,7 +27,7 @@ def __init__(self, base_url=None, creds=None): def get_configurations(self, project, repository_type=None, repository_id=None, branch=None, service_connection_id=None): """GetConfigurations. - Gets a list of existing configuration files for the given repository. + [Preview API] Gets a list of existing configuration files for the given repository. :param str project: Project ID or project name :param str repository_type: The type of the repository such as GitHub, TfsGit (i.e. Azure Repos), Bitbucket, etc. :param str repository_id: The vendor-specific identifier or the name of the repository, e.g. Microsoft/vscode (GitHub) or e9d82045-ddba-4e01-a63d-2ab9f040af62 (Azure Repos) @@ -49,17 +49,17 @@ def get_configurations(self, project, repository_type=None, repository_id=None, query_parameters['serviceConnectionId'] = self._serialize.query('service_connection_id', service_connection_id, 'str') response = self._send(http_method='GET', location_id='8fc87684-9ebc-4c37-ab92-f4ac4a58cb3a', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[ConfigurationFile]', self._unwrap_collection(response)) def create_project_connection(self, create_connection_inputs, project): """CreateProjectConnection. - Creates a new Pipeline connection between the provider installation and the specified project. Returns the PipelineConnection object created. - :param :class:` ` create_connection_inputs: + [Preview API] Creates a new Pipeline connection between the provider installation and the specified project. Returns the PipelineConnection object created. + :param :class:` ` create_connection_inputs: :param str project: - :rtype: :class:` ` + :rtype: :class:` ` """ query_parameters = {} if project is not None: @@ -67,14 +67,14 @@ def create_project_connection(self, create_connection_inputs, project): content = self._serialize.body(create_connection_inputs, 'CreatePipelineConnectionInputs') response = self._send(http_method='POST', location_id='00df4879-9216-45d5-b38d-4a487b626b2c', - version='7.0', + version='7.2-preview.1', query_parameters=query_parameters, content=content) return self._deserialize('PipelineConnection', response) def get_detected_build_frameworks(self, project, repository_type=None, repository_id=None, branch=None, detection_type=None, service_connection_id=None): """GetDetectedBuildFrameworks. - Returns a list of build frameworks that best match the given repository based on its contents. + [Preview API] Returns a list of build frameworks that best match the given repository based on its contents. :param str project: Project ID or project name :param str repository_type: The type of the repository such as GitHub, TfsGit (i.e. Azure Repos), Bitbucket, etc. :param str repository_id: The vendor-specific identifier or the name of the repository, e.g. Microsoft/vscode (GitHub) or e9d82045-ddba-4e01-a63d-2ab9f040af62 (Azure Repos) @@ -99,16 +99,17 @@ def get_detected_build_frameworks(self, project, repository_type=None, repositor query_parameters['serviceConnectionId'] = self._serialize.query('service_connection_id', service_connection_id, 'str') response = self._send(http_method='GET', location_id='29a30bab-9efb-4652-bf1b-9269baca0980', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[DetectedBuildFramework]', self._unwrap_collection(response)) def create_resources(self, creation_parameters, project): """CreateResources. + [Preview API] :param {ResourceCreationParameter} creation_parameters: :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -116,7 +117,7 @@ def create_resources(self, creation_parameters, project): content = self._serialize.body(creation_parameters, '{ResourceCreationParameter}') response = self._send(http_method='POST', location_id='43201899-7690-4870-9c79-ab69605f21ed', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('CreatedResources', response) diff --git a/azure-devops/azure/devops/v7_0/cix/models.py b/azure-devops/azure/devops/v7_2/cix/models.py similarity index 97% rename from azure-devops/azure/devops/v7_0/cix/models.py rename to azure-devops/azure/devops/v7_2/cix/models.py index 10bc5fe9..5e0dd203 100644 --- a/azure-devops/azure/devops/v7_0/cix/models.py +++ b/azure-devops/azure/devops/v7_2/cix/models.py @@ -52,7 +52,7 @@ class CreatePipelineConnectionInputs(Model): This class is used to create a pipeline connection within the team project provided. If the team project does not exist, it will be created. :param project: The team project settings for an existing team project or for a new team project. - :type project: :class:`TeamProject ` + :type project: :class:`TeamProject ` :param provider_data: This dictionary contains information that is specific to the provider. This data is opaque to the rest of the Pipelines infrastructure and does NOT contribute to the resources Token. The format of the string and its contents depend on the implementation of the provider. :type provider_data: dict :param provider_id: The external source provider id for which the connection is being made. @@ -83,7 +83,7 @@ def __init__(self, project=None, provider_data=None, provider_id=None, redirect_ class DetectedBuildFramework(Model): """ :param build_targets: List of build targets discovered for the framework to act upon. - :type build_targets: list of :class:`DetectedBuildTarget ` + :type build_targets: list of :class:`DetectedBuildTarget ` :param id: The unique identifier of the build framework. :type id: str :param settings: Additional detected settings for the build framework. @@ -225,7 +225,7 @@ def __init__(self, links=None): class ResourceCreationParameter(Model): """ :param resource_to_create: - :type resource_to_create: :class:`object ` + :type resource_to_create: :class:`object ` :param type: :type type: str """ @@ -330,13 +330,13 @@ class Operation(OperationReference): :param url: URL to get the full operation object. :type url: str :param _links: Links to other related objects. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param detailed_message: Detailed messaged about the status of an operation. :type detailed_message: str :param result_message: Result message for an operation. :type result_message: str :param result_url: URL to the operation result. - :type result_url: :class:`OperationResultReference ` + :type result_url: :class:`OperationResultReference ` """ _attribute_map = { @@ -383,11 +383,11 @@ class TeamProject(TeamProjectReference): :param visibility: Project visibility. :type visibility: object :param _links: The links to other objects related to this object. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param capabilities: Set of capabilities this project has (such as process template & version control). :type capabilities: dict :param default_team: The shallow ref to the default team. - :type default_team: :class:`WebApiTeamRef ` + :type default_team: :class:`WebApiTeamRef ` """ _attribute_map = { diff --git a/azure-devops/azure/devops/v7_0/client_factory.py b/azure-devops/azure/devops/v7_2/client_factory.py similarity index 51% rename from azure-devops/azure/devops/v7_0/client_factory.py rename to azure-devops/azure/devops/v7_2/client_factory.py index a9474371..2e79ce22 100644 --- a/azure-devops/azure/devops/v7_0/client_factory.py +++ b/azure-devops/azure/devops/v7_2/client_factory.py @@ -7,9 +7,9 @@ # -------------------------------------------------------------------------------------------- -class ClientFactoryV7_0(object): - """ClientFactoryV7_0. - A factory class to get the 7.0 clients. +class ClientFactoryV7_2(object): + """ClientFactoryV7_2. + A factory class to get the 7.2 preview clients. """ def __init__(self, connection): @@ -17,400 +17,400 @@ def __init__(self, connection): def get_accounts_client(self): """get_accounts_client. - Gets the 7.0 version of the AccountsClient - :rtype: :class:` ` + Gets the 7.2 version of the AccountsClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.v7_0.accounts.accounts_client.AccountsClient') + return self._connection.get_client('azure.devops.v7_2.accounts.accounts_client.AccountsClient') def get_audit_client(self): """get_audit_client. - Gets the 7.0 version of the AuditClient - :rtype: :class:` ` + Gets the 7.2 version of the AuditClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.v7_0.audit.audit_client.AuditClient') + return self._connection.get_client('azure.devops.v7_2.audit.audit_client.AuditClient') def get_build_client(self): """get_build_client. - Gets the 7.0 version of the BuildClient - :rtype: :class:` ` + Gets the 7.2 version of the BuildClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.v7_0.build.build_client.BuildClient') + return self._connection.get_client('azure.devops.v7_2.build.build_client.BuildClient') def get_cix_client(self): """get_cix_client. - Gets the 7.0 version of the CixClient - :rtype: :class:` ` + Gets the 7.2 version of the CixClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.v7_0.cix.cix_client.CixClient') + return self._connection.get_client('azure.devops.v7_2.cix.cix_client.CixClient') def get_client_trace_client(self): """get_client_trace_client. - Gets the 7.0 version of the ClientTraceClient - :rtype: :class:` ` + Gets the 7.2 version of the ClientTraceClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.v7_0.client_trace.client_trace_client.ClientTraceClient') + return self._connection.get_client('azure.devops.v7_2.client_trace.client_trace_client.ClientTraceClient') def get_contributions_client(self): """get_contributions_client. - Gets the 7.0 version of the ContributionsClient - :rtype: :class:` ` + Gets the 7.2 version of the ContributionsClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.v7_0.contributions.contributions_client.ContributionsClient') + return self._connection.get_client('azure.devops.v7_2.contributions.contributions_client.ContributionsClient') def get_core_client(self): """get_core_client. - Gets the 7.0 version of the CoreClient - :rtype: :class:` ` + Gets the 7.2 version of the CoreClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.v7_0.core.core_client.CoreClient') + return self._connection.get_client('azure.devops.v7_2.core.core_client.CoreClient') def get_customer_intelligence_client(self): """get_customer_intelligence_client. - Gets the 7.0 version of the CustomerIntelligenceClient - :rtype: :class:` ` + Gets the 7.2 version of the CustomerIntelligenceClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.v7_0.customer_intelligence.customer_intelligence_client.CustomerIntelligenceClient') + return self._connection.get_client('azure.devops.v7_2.customer_intelligence.customer_intelligence_client.CustomerIntelligenceClient') def get_dashboard_client(self): """get_dashboard_client. - Gets the 7.0 version of the DashboardClient - :rtype: :class:` ` + Gets the 7.2 version of the DashboardClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.v7_0.dashboard.dashboard_client.DashboardClient') + return self._connection.get_client('azure.devops.v7_2.dashboard.dashboard_client.DashboardClient') def get_elastic_client(self): """get_elastic_client. - Gets the 7.0 version of the ElasticClient - :rtype: :class:` ` + Gets the 7.2 version of the ElasticClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.v7_0.elastic.elastic_client.ElasticClient') + return self._connection.get_client('azure.devops.v7_2.elastic.elastic_client.ElasticClient') def get_extension_management_client(self): """get_extension_management_client. - Gets the 7.0 version of the ExtensionManagementClient - :rtype: :class:` ` + Gets the 7.2 version of the ExtensionManagementClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.v7_0.extension_management.extension_management_client.ExtensionManagementClient') + return self._connection.get_client('azure.devops.v7_2.extension_management.extension_management_client.ExtensionManagementClient') def get_feature_availability_client(self): """get_feature_availability_client. - Gets the 7.0 version of the FeatureAvailabilityClient - :rtype: :class:` ` + Gets the 7.2 version of the FeatureAvailabilityClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.v7_0.feature_availability.feature_availability_client.FeatureAvailabilityClient') + return self._connection.get_client('azure.devops.v7_2.feature_availability.feature_availability_client.FeatureAvailabilityClient') def get_feature_management_client(self): """get_feature_management_client. - Gets the 7.0 version of the FeatureManagementClient - :rtype: :class:` ` + Gets the 7.2 version of the FeatureManagementClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.v7_0.feature_management.feature_management_client.FeatureManagementClient') + return self._connection.get_client('azure.devops.v7_2.feature_management.feature_management_client.FeatureManagementClient') def get_feed_client(self): """get_feed_client. - Gets the 7.0 version of the FeedClient - :rtype: :class:` ` + Gets the 7.2 version of the FeedClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.v7_0.feed.feed_client.FeedClient') + return self._connection.get_client('azure.devops.v7_2.feed.feed_client.FeedClient') def get_file_container_client(self): """get_file_container_client. - Gets the 7.0 version of the FileContainerClient - :rtype: :class:` ` + Gets the 7.2 version of the FileContainerClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.v7_0.file_container.file_container_client.FileContainerClient') + return self._connection.get_client('azure.devops.v7_2.file_container.file_container_client.FileContainerClient') def get_gallery_client(self): """get_gallery_client. - Gets the 7.0 version of the GalleryClient - :rtype: :class:` ` + Gets the 7.2 version of the GalleryClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.v7_0.gallery.gallery_client.GalleryClient') + return self._connection.get_client('azure.devops.v7_2.gallery.gallery_client.GalleryClient') def get_git_client(self): """get_git_client. - Gets the 7.0 version of the GitClient - :rtype: :class:` ` + Gets the 7.2 version of the GitClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.v7_0.git.git_client.GitClient') + return self._connection.get_client('azure.devops.v7_2.git.git_client.GitClient') def get_graph_client(self): """get_graph_client. - Gets the 7.0 version of the GraphClient - :rtype: :class:` ` + Gets the 7.2 version of the GraphClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.v7_0.graph.graph_client.GraphClient') + return self._connection.get_client('azure.devops.v7_2.graph.graph_client.GraphClient') def get_identity_client(self): """get_identity_client. - Gets the 7.0 version of the IdentityClient - :rtype: :class:` ` + Gets the 7.2 version of the IdentityClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.v7_0.identity.identity_client.IdentityClient') + return self._connection.get_client('azure.devops.v7_2.identity.identity_client.IdentityClient') def get_location_client(self): """get_location_client. - Gets the 7.0 version of the LocationClient - :rtype: :class:` ` + Gets the 7.2 version of the LocationClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.v7_0.location.location_client.LocationClient') + return self._connection.get_client('azure.devops.v7_2.location.location_client.LocationClient') def get_maven_client(self): """get_maven_client. - Gets the 7.0 version of the MavenClient - :rtype: :class:` ` + Gets the 7.2 version of the MavenClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.v7_0.maven.maven_client.MavenClient') + return self._connection.get_client('azure.devops.v7_2.maven.maven_client.MavenClient') def get_member_entitlement_management_client(self): """get_member_entitlement_management_client. - Gets the 7.0 version of the MemberEntitlementManagementClient - :rtype: :class:` ` + Gets the 7.2 version of the MemberEntitlementManagementClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.v7_0.member_entitlement_management.member_entitlement_management_client.MemberEntitlementManagementClient') + return self._connection.get_client('azure.devops.v7_2.member_entitlement_management.member_entitlement_management_client.MemberEntitlementManagementClient') def get_notification_client(self): """get_notification_client. - Gets the 7.0 version of the NotificationClient - :rtype: :class:` ` + Gets the 7.2 version of the NotificationClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.v7_0.notification.notification_client.NotificationClient') + return self._connection.get_client('azure.devops.v7_2.notification.notification_client.NotificationClient') def get_npm_client(self): """get_npm_client. - Gets the 7.0 version of the NpmClient - :rtype: :class:` ` + Gets the 7.2 version of the NpmClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.v7_0.npm.npm_client.NpmClient') + return self._connection.get_client('azure.devops.v7_2.npm.npm_client.NpmClient') def get_nuget_client(self): """get_nuget_client. - Gets the 7.0 version of the NuGetClient - :rtype: :class:` ` + Gets the 7.2 version of the NuGetClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.v7_0.nuget.nuget_client.NuGetClient') + return self._connection.get_client('azure.devops.v7_2.nuget.nuget_client.NuGetClient') def get_operations_client(self): """get_operations_client. - Gets the 7.0 version of the OperationsClient - :rtype: :class:` ` + Gets the 7.2 version of the OperationsClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.v7_0.operations.operations_client.OperationsClient') + return self._connection.get_client('azure.devops.v7_2.operations.operations_client.OperationsClient') def get_pipeline_permissions_client(self): """get_pipeline_permissions_client. - Gets the 7.0 version of the PipelinePermissionsClient - :rtype: :class:` ` + Gets the 7.2 version of the PipelinePermissionsClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.v7_0.pipeline_permissions.pipeline_permissions_client.PipelinePermissionsClient') + return self._connection.get_client('azure.devops.v7_2.pipeline_permissions.pipeline_permissions_client.PipelinePermissionsClient') def get_pipelines_client(self): """get_pipelines_client. - Gets the 7.0 version of the PipelinesClient - :rtype: :class:` ` + Gets the 7.2 version of the PipelinesClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.v7_0.pipelines.pipelines_client.PipelinesClient') + return self._connection.get_client('azure.devops.v7_2.pipelines.pipelines_client.PipelinesClient') def get_pipelines_checks_client(self): """get_pipelines_checks_client. - Gets the 7.0 version of the PipelinesChecksClient - :rtype: :class:` ` + Gets the 7.2 version of the PipelinesChecksClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.v7_0.pipelines_checks.pipelines_checks_client.PipelinesChecksClient') + return self._connection.get_client('azure.devops.v7_2.pipelines_checks.pipelines_checks_client.PipelinesChecksClient') def get_policy_client(self): """get_policy_client. - Gets the 7.0 version of the PolicyClient - :rtype: :class:` ` + Gets the 7.2 version of the PolicyClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.v7_0.policy.policy_client.PolicyClient') + return self._connection.get_client('azure.devops.v7_2.policy.policy_client.PolicyClient') def get_profile_client(self): """get_profile_client. - Gets the 7.0 version of the ProfileClient - :rtype: :class:` ` + Gets the 7.2 version of the ProfileClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.v7_0.profile.profile_client.ProfileClient') + return self._connection.get_client('azure.devops.v7_2.profile.profile_client.ProfileClient') def get_profile_regions_client(self): """get_profile_regions_client. - Gets the 7.0 version of the ProfileRegionsClient - :rtype: :class:` ` + Gets the 7.2 version of the ProfileRegionsClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.v7_0.profile_regions.profile_regions_client.ProfileRegionsClient') + return self._connection.get_client('azure.devops.v7_2.profile_regions.profile_regions_client.ProfileRegionsClient') def get_project_analysis_client(self): """get_project_analysis_client. - Gets the 7.0 version of the ProjectAnalysisClient - :rtype: :class:` ` + Gets the 7.2 version of the ProjectAnalysisClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.v7_0.project_analysis.project_analysis_client.ProjectAnalysisClient') + return self._connection.get_client('azure.devops.v7_2.project_analysis.project_analysis_client.ProjectAnalysisClient') def get_provenance_client(self): """get_provenance_client. - Gets the 7.0 version of the ProvenanceClient - :rtype: :class:` ` + Gets the 7.2 version of the ProvenanceClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.v7_0.provenance.provenance_client.ProvenanceClient') + return self._connection.get_client('azure.devops.v7_2.provenance.provenance_client.ProvenanceClient') def get_py_pi_api_client(self): """get_py_pi_api_client. - Gets the 7.0 version of the PyPiApiClient - :rtype: :class:` ` + Gets the 7.2 version of the PyPiApiClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.v7_0.py_pi_api.py_pi_api_client.PyPiApiClient') + return self._connection.get_client('azure.devops.v7_2.py_pi_api.py_pi_api_client.PyPiApiClient') def get_release_client(self): """get_release_client. - Gets the 7.0 version of the ReleaseClient - :rtype: :class:` ` + Gets the 7.2 version of the ReleaseClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.v7_0.release.release_client.ReleaseClient') + return self._connection.get_client('azure.devops.v7_2.release.release_client.ReleaseClient') def get_sbom_client(self): """get_sbom_client. - Gets the 7.0 version of the SBOMClient - :rtype: :class:` ` + Gets the 7.2 version of the SBOMClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.v7_0.sbom.sbom_client.SBOMClient') + return self._connection.get_client('azure.devops.v7_2.sbom.sbom_client.SBOMClient') def get_search_client(self): """get_search_client. - Gets the 7.0 version of the SearchClient - :rtype: :class:` ` + Gets the 7.2 version of the SearchClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.v7_0.search.search_client.SearchClient') + return self._connection.get_client('azure.devops.v7_2.search.search_client.SearchClient') def get_security_client(self): """get_security_client. - Gets the 7.0 version of the SecurityClient - :rtype: :class:` ` + Gets the 7.2 version of the SecurityClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.v7_0.security.security_client.SecurityClient') + return self._connection.get_client('azure.devops.v7_2.security.security_client.SecurityClient') def get_service_endpoint_client(self): """get_service_endpoint_client. - Gets the 7.0 version of the ServiceEndpointClient - :rtype: :class:` ` + Gets the 7.2 version of the ServiceEndpointClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.v7_0.service_endpoint.service_endpoint_client.ServiceEndpointClient') + return self._connection.get_client('azure.devops.v7_2.service_endpoint.service_endpoint_client.ServiceEndpointClient') def get_service_hooks_client(self): """get_service_hooks_client. - Gets the 7.0 version of the ServiceHooksClient - :rtype: :class:` ` + Gets the 7.2 version of the ServiceHooksClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.v7_0.service_hooks.service_hooks_client.ServiceHooksClient') + return self._connection.get_client('azure.devops.v7_2.service_hooks.service_hooks_client.ServiceHooksClient') def get_settings_client(self): """get_settings_client. - Gets the 7.0 version of the SettingsClient - :rtype: :class:` ` + Gets the 7.2 version of the SettingsClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.v7_0.settings.settings_client.SettingsClient') + return self._connection.get_client('azure.devops.v7_2.settings.settings_client.SettingsClient') def get_symbol_client(self): """get_symbol_client. - Gets the 7.0 version of the SymbolClient - :rtype: :class:` ` + Gets the 7.2 version of the SymbolClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.v7_0.symbol.symbol_client.SymbolClient') + return self._connection.get_client('azure.devops.v7_2.symbol.symbol_client.SymbolClient') def get_task_client(self): """get_task_client. - Gets the 7.0 version of the TaskClient - :rtype: :class:` ` + Gets the 7.2 version of the TaskClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.v7_0.task.task_client.TaskClient') + return self._connection.get_client('azure.devops.v7_2.task.task_client.TaskClient') def get_task_agent_client(self): """get_task_agent_client. - Gets the 7.0 version of the TaskAgentClient - :rtype: :class:` ` + Gets the 7.2 version of the TaskAgentClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.v7_0.task_agent.task_agent_client.TaskAgentClient') + return self._connection.get_client('azure.devops.v7_2.task_agent.task_agent_client.TaskAgentClient') def get_test_client(self): """get_test_client. - Gets the 7.0 version of the TestClient - :rtype: :class:` ` + Gets the 7.2 version of the TestClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.v7_0.test.test_client.TestClient') + return self._connection.get_client('azure.devops.v7_2.test.test_client.TestClient') def get_test_plan_client(self): """get_test_plan_client. - Gets the 7.0 version of the TestPlanClient - :rtype: :class:` ` + Gets the 7.2 version of the TestPlanClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.v7_0.test_plan.test_plan_client.TestPlanClient') + return self._connection.get_client('azure.devops.v7_2.test_plan.test_plan_client.TestPlanClient') def get_test_results_client(self): """get_test_results_client. - Gets the 7.0 version of the TestResultsClient - :rtype: :class:` ` + Gets the 7.2 version of the TestResultsClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.v7_0.test_results.test_results_client.TestResultsClient') + return self._connection.get_client('azure.devops.v7_2.test_results.test_results_client.TestResultsClient') def get_tfvc_client(self): """get_tfvc_client. - Gets the 7.0 version of the TfvcClient - :rtype: :class:` ` + Gets the 7.2 version of the TfvcClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.v7_0.tfvc.tfvc_client.TfvcClient') + return self._connection.get_client('azure.devops.v7_2.tfvc.tfvc_client.TfvcClient') def get_token_admin_client(self): """get_token_admin_client. - Gets the 7.0 version of the TokenAdminClient - :rtype: :class:` ` + Gets the 7.2 version of the TokenAdminClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.v7_0.token_admin.token_admin_client.TokenAdminClient') + return self._connection.get_client('azure.devops.v7_2.token_admin.token_admin_client.TokenAdminClient') def get_upack_api_client(self): """get_upack_api_client. - Gets the 7.0 version of the UPackApiClient - :rtype: :class:` ` + Gets the 7.2 version of the UPackApiClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.v7_0.upack_api.upack_api_client.UPackApiClient') + return self._connection.get_client('azure.devops.v7_2.upack_api.upack_api_client.UPackApiClient') def get_upack_packaging_client(self): """get_upack_packaging_client. - Gets the 7.0 version of the UPackPackagingClient - :rtype: :class:` ` + Gets the 7.2 version of the UPackPackagingClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.v7_0.upack_packaging.upack_packaging_client.UPackPackagingClient') + return self._connection.get_client('azure.devops.v7_2.upack_packaging.upack_packaging_client.UPackPackagingClient') def get_wiki_client(self): """get_wiki_client. - Gets the 7.0 version of the WikiClient - :rtype: :class:` ` + Gets the 7.2 version of the WikiClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.v7_0.wiki.wiki_client.WikiClient') + return self._connection.get_client('azure.devops.v7_2.wiki.wiki_client.WikiClient') def get_work_client(self): """get_work_client. - Gets the 7.0 version of the WorkClient - :rtype: :class:` ` + Gets the 7.2 version of the WorkClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.v7_0.work.work_client.WorkClient') + return self._connection.get_client('azure.devops.v7_2.work.work_client.WorkClient') def get_work_item_tracking_client(self): """get_work_item_tracking_client. - Gets the 7.0 version of the WorkItemTrackingClient - :rtype: :class:` ` + Gets the 7.2 version of the WorkItemTrackingClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.v7_0.work_item_tracking.work_item_tracking_client.WorkItemTrackingClient') + return self._connection.get_client('azure.devops.v7_2.work_item_tracking.work_item_tracking_client.WorkItemTrackingClient') def get_work_item_tracking_process_client(self): """get_work_item_tracking_process_client. - Gets the 7.0 version of the WorkItemTrackingProcessClient - :rtype: :class:` ` + Gets the 7.2 version of the WorkItemTrackingProcessClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.v7_0.work_item_tracking_process.work_item_tracking_process_client.WorkItemTrackingProcessClient') + return self._connection.get_client('azure.devops.v7_2.work_item_tracking_process.work_item_tracking_process_client.WorkItemTrackingProcessClient') def get_work_item_tracking_process_template_client(self): """get_work_item_tracking_process_template_client. - Gets the 7.0 version of the WorkItemTrackingProcessTemplateClient - :rtype: :class:` ` + Gets the 7.2 version of the WorkItemTrackingProcessTemplateClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.v7_0.work_item_tracking_process_template.work_item_tracking_process_template_client.WorkItemTrackingProcessTemplateClient') + return self._connection.get_client('azure.devops.v7_2.work_item_tracking_process_template.work_item_tracking_process_template_client.WorkItemTrackingProcessTemplateClient') diff --git a/azure-devops/azure/devops/v7_0/client_trace/__init__.py b/azure-devops/azure/devops/v7_2/client_trace/__init__.py similarity index 100% rename from azure-devops/azure/devops/v7_0/client_trace/__init__.py rename to azure-devops/azure/devops/v7_2/client_trace/__init__.py diff --git a/azure-devops/azure/devops/v7_0/client_trace/client_trace_client.py b/azure-devops/azure/devops/v7_2/client_trace/client_trace_client.py similarity index 97% rename from azure-devops/azure/devops/v7_0/client_trace/client_trace_client.py rename to azure-devops/azure/devops/v7_2/client_trace/client_trace_client.py index 43fb5842..6aa256b0 100644 --- a/azure-devops/azure/devops/v7_0/client_trace/client_trace_client.py +++ b/azure-devops/azure/devops/v7_2/client_trace/client_trace_client.py @@ -33,6 +33,6 @@ def publish_events(self, events): content = self._serialize.body(events, '[ClientTraceEvent]') self._send(http_method='POST', location_id='06bcc74a-1491-4eb8-a0eb-704778f9d041', - version='7.0-preview.1', + version='7.2-preview.1', content=content) diff --git a/azure-devops/azure/devops/v7_0/client_trace/models.py b/azure-devops/azure/devops/v7_2/client_trace/models.py similarity index 100% rename from azure-devops/azure/devops/v7_0/client_trace/models.py rename to azure-devops/azure/devops/v7_2/client_trace/models.py diff --git a/azure-devops/azure/devops/v7_0/contributions/__init__.py b/azure-devops/azure/devops/v7_2/contributions/__init__.py similarity index 100% rename from azure-devops/azure/devops/v7_0/contributions/__init__.py rename to azure-devops/azure/devops/v7_2/contributions/__init__.py diff --git a/azure-devops/azure/devops/v7_0/contributions/contributions_client.py b/azure-devops/azure/devops/v7_2/contributions/contributions_client.py similarity index 90% rename from azure-devops/azure/devops/v7_0/contributions/contributions_client.py rename to azure-devops/azure/devops/v7_2/contributions/contributions_client.py index 9d6dfe2b..6be57b9f 100644 --- a/azure-devops/azure/devops/v7_0/contributions/contributions_client.py +++ b/azure-devops/azure/devops/v7_2/contributions/contributions_client.py @@ -28,23 +28,23 @@ def __init__(self, base_url=None, creds=None): def query_contribution_nodes(self, query): """QueryContributionNodes. [Preview API] Query for contribution nodes and provider details according the parameters in the passed in query object. - :param :class:` ` query: - :rtype: :class:` ` + :param :class:` ` query: + :rtype: :class:` ` """ content = self._serialize.body(query, 'ContributionNodeQuery') response = self._send(http_method='POST', location_id='db7f2146-2309-4cee-b39c-c767777a1c55', - version='7.0-preview.1', + version='7.2-preview.1', content=content) return self._deserialize('ContributionNodeQueryResult', response) def query_data_providers(self, query, scope_name=None, scope_value=None): """QueryDataProviders. [Preview API] - :param :class:` ` query: + :param :class:` ` query: :param str scope_name: :param str scope_value: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if scope_name is not None: @@ -54,7 +54,7 @@ def query_data_providers(self, query, scope_name=None, scope_value=None): content = self._serialize.body(query, 'DataProviderQuery') response = self._send(http_method='POST', location_id='738368db-35ee-4b85-9f94-77ed34af2b0d', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('DataProviderResult', response) @@ -78,7 +78,7 @@ def get_installed_extensions(self, contribution_ids=None, include_disabled_apps= query_parameters['assetTypes'] = self._serialize.query('asset_types', asset_types, 'str') response = self._send(http_method='GET', location_id='2648442b-fd63-4b9a-902f-0c913510f139', - version='7.0-preview.1', + version='7.2-preview.1', query_parameters=query_parameters) return self._deserialize('[InstalledExtension]', self._unwrap_collection(response)) @@ -88,7 +88,7 @@ def get_installed_extension_by_name(self, publisher_name, extension_name, asset_ :param str publisher_name: :param str extension_name: :param [str] asset_types: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if publisher_name is not None: @@ -101,7 +101,7 @@ def get_installed_extension_by_name(self, publisher_name, extension_name, asset_ query_parameters['assetTypes'] = self._serialize.query('asset_types', asset_types, 'str') response = self._send(http_method='GET', location_id='3e2f6668-0798-4dcb-b592-bfe2fa57fde2', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('InstalledExtension', response) diff --git a/azure-devops/azure/devops/v7_0/contributions/models.py b/azure-devops/azure/devops/v7_2/contributions/models.py similarity index 95% rename from azure-devops/azure/devops/v7_0/contributions/models.py rename to azure-devops/azure/devops/v7_2/contributions/models.py index 74f52f21..80ace164 100644 --- a/azure-devops/azure/devops/v7_0/contributions/models.py +++ b/azure-devops/azure/devops/v7_2/contributions/models.py @@ -20,7 +20,7 @@ class ClientContribution(Model): :param includes: Includes is a set of contributions that should have this contribution included in their targets list. :type includes: list of str :param properties: Properties/attributes of this contribution - :type properties: :class:`object ` + :type properties: :class:`object ` :param targets: The ids of the contribution(s) that this contribution targets. (parent contributions) :type targets: list of str :param type: Id of the Contribution Type @@ -50,24 +50,24 @@ class ClientContributionNode(Model): """ Representation of a ContributionNode that can be used for serialized to clients. - :param contribution: Contribution associated with this node. - :type contribution: :class:`ClientContribution ` :param children: List of ids for contributions which are children to the current contribution. :type children: list of str + :param contribution: Contribution associated with this node. + :type contribution: :class:`ClientContribution ` :param parents: List of ids for contributions which are parents to the current contribution. :type parents: list of str """ _attribute_map = { - 'contribution': {'key': 'contribution', 'type': 'ClientContribution'}, 'children': {'key': 'children', 'type': '[str]'}, + 'contribution': {'key': 'contribution', 'type': 'ClientContribution'}, 'parents': {'key': 'parents', 'type': '[str]'} } - def __init__(self, contribution=None, children=None, parents=None): + def __init__(self, children=None, contribution=None, parents=None): super(ClientContributionNode, self).__init__() - self.contribution = contribution self.children = children + self.contribution = contribution self.parents = parents @@ -136,7 +136,7 @@ class ContributionConstraint(Model): :param name: Name of the IContributionFilter plugin :type name: str :param properties: Properties that are fed to the contribution filter class - :type properties: :class:`object ` + :type properties: :class:`object ` :param relationships: Constraints can be optionally be applied to one or more of the relationships defined in the contribution. If no relationships are defined then all relationships are associated with the constraint. This means the default behaviour will eliminate the contribution from the tree completely if the constraint is applied. :type relationships: list of str """ @@ -167,7 +167,7 @@ class ContributionNodeQuery(Model): :param contribution_ids: The contribution ids of the nodes to find. :type contribution_ids: list of str :param data_provider_context: Contextual information that can be leveraged by contribution constraints - :type data_provider_context: :class:`DataProviderContext ` + :type data_provider_context: :class:`DataProviderContext ` :param include_provider_details: Indicator if contribution provider details should be included in the result. :type include_provider_details: bool :param query_options: Query options tpo be used when fetching ContributionNodes @@ -318,7 +318,7 @@ class DataProviderQuery(Model): A query that can be issued for data provider data :param context: Contextual information to pass to the data providers - :type context: :class:`DataProviderContext ` + :type context: :class:`DataProviderContext ` :param contribution_ids: The contribution ids of the data providers to resolve :type contribution_ids: list of str """ @@ -345,7 +345,7 @@ class DataProviderResult(Model): :param exceptions: Set of exceptions that occurred resolving the data providers. :type exceptions: dict :param resolved_providers: List of data providers resolved in the data-provider query - :type resolved_providers: list of :class:`ResolvedDataProvider ` + :type resolved_providers: list of :class:`ResolvedDataProvider ` :param scope_name: Scope name applied to this data provider result. :type scope_name: str :param scope_value: Scope value applied to this data provider result. @@ -397,19 +397,19 @@ class ExtensionEventCallbackCollection(Model): Collection of event callbacks - endpoints called when particular extension events occur. :param post_disable: Optional. Defines an endpoint that gets called via a POST request to notify that an extension disable has occurred. - :type post_disable: :class:`ExtensionEventCallback ` + :type post_disable: :class:`ExtensionEventCallback ` :param post_enable: Optional. Defines an endpoint that gets called via a POST request to notify that an extension enable has occurred. - :type post_enable: :class:`ExtensionEventCallback ` + :type post_enable: :class:`ExtensionEventCallback ` :param post_install: Optional. Defines an endpoint that gets called via a POST request to notify that an extension install has completed. - :type post_install: :class:`ExtensionEventCallback ` + :type post_install: :class:`ExtensionEventCallback ` :param post_uninstall: Optional. Defines an endpoint that gets called via a POST request to notify that an extension uninstall has occurred. - :type post_uninstall: :class:`ExtensionEventCallback ` + :type post_uninstall: :class:`ExtensionEventCallback ` :param post_update: Optional. Defines an endpoint that gets called via a POST request to notify that an extension update has occurred. - :type post_update: :class:`ExtensionEventCallback ` + :type post_update: :class:`ExtensionEventCallback ` :param pre_install: Optional. Defines an endpoint that gets called via a POST request to notify that an extension install is about to occur. Response indicates whether to proceed or abort. - :type pre_install: :class:`ExtensionEventCallback ` + :type pre_install: :class:`ExtensionEventCallback ` :param version_check: For multi-version extensions, defines an endpoint that gets called via an OPTIONS request to determine the particular version of the extension to be used - :type version_check: :class:`ExtensionEventCallback ` + :type version_check: :class:`ExtensionEventCallback ` """ _attribute_map = { @@ -461,7 +461,7 @@ class ExtensionLicensing(Model): How an extension should handle including contributions based on licensing :param overrides: A list of contributions which deviate from the default licensing behavior - :type overrides: list of :class:`LicensingOverride ` + :type overrides: list of :class:`LicensingOverride ` """ _attribute_map = { @@ -480,21 +480,21 @@ class ExtensionManifest(Model): :param base_uri: Uri used as base for other relative uri's defined in extension :type base_uri: str :param constraints: List of shared constraints defined by this extension - :type constraints: list of :class:`ContributionConstraint ` + :type constraints: list of :class:`ContributionConstraint ` :param contributions: List of contributions made by this extension - :type contributions: list of :class:`Contribution ` + :type contributions: list of :class:`Contribution ` :param contribution_types: List of contribution types defined by this extension - :type contribution_types: list of :class:`ContributionType ` + :type contribution_types: list of :class:`ContributionType ` :param demands: List of explicit demands required by this extension :type demands: list of str :param event_callbacks: Collection of endpoints that get called when particular extension events occur - :type event_callbacks: :class:`ExtensionEventCallbackCollection ` + :type event_callbacks: :class:`ExtensionEventCallbackCollection ` :param fallback_base_uri: Secondary location that can be used as base for other relative uri's defined in extension :type fallback_base_uri: str :param language: Language Culture Name set by the Gallery :type language: str :param licensing: How this extension behaves with respect to licensing - :type licensing: :class:`ExtensionLicensing ` + :type licensing: :class:`ExtensionLicensing ` :param manifest_version: Version of the extension manifest format/content :type manifest_version: float :param restricted_to: Default user claims applied to all contributions (except the ones which have been specified restrictedTo explicitly) to control the visibility of a contribution. @@ -545,21 +545,21 @@ class InstalledExtension(ExtensionManifest): :param base_uri: Uri used as base for other relative uri's defined in extension :type base_uri: str :param constraints: List of shared constraints defined by this extension - :type constraints: list of :class:`ContributionConstraint ` + :type constraints: list of :class:`ContributionConstraint ` :param contributions: List of contributions made by this extension - :type contributions: list of :class:`Contribution ` + :type contributions: list of :class:`Contribution ` :param contribution_types: List of contribution types defined by this extension - :type contribution_types: list of :class:`ContributionType ` + :type contribution_types: list of :class:`ContributionType ` :param demands: List of explicit demands required by this extension :type demands: list of str :param event_callbacks: Collection of endpoints that get called when particular extension events occur - :type event_callbacks: :class:`ExtensionEventCallbackCollection ` + :type event_callbacks: :class:`ExtensionEventCallbackCollection ` :param fallback_base_uri: Secondary location that can be used as base for other relative uri's defined in extension :type fallback_base_uri: str :param language: Language Culture Name set by the Gallery :type language: str :param licensing: How this extension behaves with respect to licensing - :type licensing: :class:`ExtensionLicensing ` + :type licensing: :class:`ExtensionLicensing ` :param manifest_version: Version of the extension manifest format/content :type manifest_version: float :param restricted_to: Default user claims applied to all contributions (except the ones which have been specified restrictedTo explicitly) to control the visibility of a contribution. @@ -573,11 +573,11 @@ class InstalledExtension(ExtensionManifest): :param extension_name: The display name of the extension. :type extension_name: str :param files: This is the set of files available from the extension. - :type files: list of :class:`ExtensionFile ` + :type files: list of :class:`ExtensionFile ` :param flags: Extension flags relevant to contribution consumers :type flags: object :param install_state: Information about this particular installation of the extension - :type install_state: :class:`InstalledExtensionState ` + :type install_state: :class:`InstalledExtensionState ` :param last_published: This represents the date/time the extensions was last updated in the gallery. This doesnt mean this version was updated the value represents changes to any and all versions of the extension. :type last_published: datetime :param publisher_id: Unique id of the publisher of this extension @@ -637,7 +637,7 @@ class InstalledExtensionState(Model): :param flags: States of an installed extension :type flags: object :param installation_issues: List of installation issues - :type installation_issues: list of :class:`InstalledExtensionStateIssue ` + :type installation_issues: list of :class:`InstalledExtensionStateIssue ` :param last_updated: The time at which this installation was last updated :type last_updated: datetime """ @@ -731,7 +731,7 @@ class ClientDataProviderQuery(DataProviderQuery): A client data provider are the details needed to make the data provider request from the client. :param context: Contextual information to pass to the data providers - :type context: :class:`DataProviderContext ` + :type context: :class:`DataProviderContext ` :param contribution_ids: The contribution ids of the data providers to resolve :type contribution_ids: list of str :param query_service_instance_type: The Id of the service instance type that should be communicated with in order to resolve the data providers from the client given the query values. @@ -760,11 +760,11 @@ class Contribution(ContributionBase): :param visible_to: VisibleTo can be used to restrict whom can reference a given contribution/type. This value should be a list of publishers or extensions access is restricted too. Examples: "ms" - Means only the "ms" publisher can reference this. "ms.vss-web" - Means only the "vss-web" extension from the "ms" publisher can reference this. :type visible_to: list of str :param constraints: List of constraints (filters) that should be applied to the availability of this contribution - :type constraints: list of :class:`ContributionConstraint ` + :type constraints: list of :class:`ContributionConstraint ` :param includes: Includes is a set of contributions that should have this contribution included in their targets list. :type includes: list of str :param properties: Properties/attributes of this contribution - :type properties: :class:`object ` + :type properties: :class:`object ` :param restricted_to: List of demanded claims in order for the user to see this contribution (like anonymous, public, member...). :type restricted_to: list of str :param targets: The ids of the contribution(s) that this contribution targets. (parent contributions) diff --git a/azure-devops/azure/devops/v7_0/core/__init__.py b/azure-devops/azure/devops/v7_2/core/__init__.py similarity index 97% rename from azure-devops/azure/devops/v7_0/core/__init__.py rename to azure-devops/azure/devops/v7_2/core/__init__.py index cb87e9b4..076cdc7d 100644 --- a/azure-devops/azure/devops/v7_0/core/__init__.py +++ b/azure-devops/azure/devops/v7_2/core/__init__.py @@ -10,6 +10,7 @@ from .core_client import CoreClient __all__ = [ + 'CategorizedWebApiTeams', 'GraphSubjectBase', 'Identity', 'IdentityBase', diff --git a/azure-devops/azure/devops/v7_0/core/core_client.py b/azure-devops/azure/devops/v7_2/core/core_client.py similarity index 80% rename from azure-devops/azure/devops/v7_0/core/core_client.py rename to azure-devops/azure/devops/v7_2/core/core_client.py index 9bdf8aca..2eb5c120 100644 --- a/azure-devops/azure/devops/v7_0/core/core_client.py +++ b/azure-devops/azure/devops/v7_2/core/core_client.py @@ -35,13 +35,13 @@ def remove_project_avatar(self, project_id): route_values['projectId'] = self._serialize.url('project_id', project_id, 'str') self._send(http_method='DELETE', location_id='54b2a2a0-859b-4d05-827c-ec4c862f641a', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) def set_project_avatar(self, avatar_blob, project_id): """SetProjectAvatar. [Preview API] Sets the avatar for the project. - :param :class:` ` avatar_blob: The avatar blob data object to upload. + :param :class:` ` avatar_blob: The avatar blob data object to upload. :param str project_id: The ID or name of the project. """ route_values = {} @@ -50,16 +50,42 @@ def set_project_avatar(self, avatar_blob, project_id): content = self._serialize.body(avatar_blob, 'ProjectAvatar') self._send(http_method='PUT', location_id='54b2a2a0-859b-4d05-827c-ec4c862f641a', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, content=content) + def get_project_teams_by_category(self, project_id, expand_identity=None, top=None, skip=None): + """GetProjectTeamsByCategory. + [Preview API] Gets list of user readable teams in a project and teams user is member of (excluded from readable list). + :param str project_id: The name or ID (GUID) of the team project containing the teams to retrieve. + :param bool expand_identity: A value indicating whether or not to expand Identity information in the result WebApiTeam object. + :param int top: Maximum number of teams to return. + :param int skip: Number of teams to skip. + :rtype: :class:` ` + """ + route_values = {} + if project_id is not None: + route_values['projectId'] = self._serialize.url('project_id', project_id, 'str') + query_parameters = {} + if expand_identity is not None: + query_parameters['$expandIdentity'] = self._serialize.query('expand_identity', expand_identity, 'bool') + if top is not None: + query_parameters['$top'] = self._serialize.query('top', top, 'int') + if skip is not None: + query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') + response = self._send(http_method='GET', + location_id='6f9619ff-8b86-d011-b42d-00c04fc964ff', + version='7.2-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('CategorizedWebApiTeams', response) + def create_connected_service(self, connected_service_creation_data, project_id): """CreateConnectedService. [Preview API] - :param :class:` ` connected_service_creation_data: + :param :class:` ` connected_service_creation_data: :param str project_id: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project_id is not None: @@ -67,7 +93,7 @@ def create_connected_service(self, connected_service_creation_data, project_id): content = self._serialize.body(connected_service_creation_data, 'WebApiConnectedServiceDetails') response = self._send(http_method='POST', location_id='b4f70219-e18b-42c5-abe3-98b07d35525e', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('WebApiConnectedService', response) @@ -77,7 +103,7 @@ def get_connected_service_details(self, project_id, name): [Preview API] :param str project_id: :param str name: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project_id is not None: @@ -86,7 +112,7 @@ def get_connected_service_details(self, project_id, name): route_values['name'] = self._serialize.url('name', name, 'str') response = self._send(http_method='GET', location_id='b4f70219-e18b-42c5-abe3-98b07d35525e', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) return self._deserialize('WebApiConnectedServiceDetails', response) @@ -105,14 +131,14 @@ def get_connected_services(self, project_id, kind=None): query_parameters['kind'] = self._serialize.query('kind', kind, 'str') response = self._send(http_method='GET', location_id='b4f70219-e18b-42c5-abe3-98b07d35525e', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[WebApiConnectedService]', self._unwrap_collection(response)) def get_team_members_with_extended_properties(self, project_id, team_id, top=None, skip=None): """GetTeamMembersWithExtendedProperties. - Get a list of members for a specific team. + [Preview API] Get a list of members for a specific team. :param str project_id: The name or ID (GUID) of the team project the team belongs to. :param str team_id: The name or ID (GUID) of the team . :param int top: @@ -131,54 +157,54 @@ def get_team_members_with_extended_properties(self, project_id, team_id, top=Non query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') response = self._send(http_method='GET', location_id='294c494c-2600-4d7e-b76c-3dd50c3c95be', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TeamMember]', self._unwrap_collection(response)) def get_process_by_id(self, process_id): """GetProcessById. - Get a process by ID. + [Preview API] Get a process by ID. :param str process_id: ID for a process. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if process_id is not None: route_values['processId'] = self._serialize.url('process_id', process_id, 'str') response = self._send(http_method='GET', location_id='93878975-88c5-4e6a-8abb-7ddd77a8a7d8', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('Process', response) def get_processes(self): """GetProcesses. - Get a list of processes. + [Preview API] Get a list of processes. :rtype: [Process] """ response = self._send(http_method='GET', location_id='93878975-88c5-4e6a-8abb-7ddd77a8a7d8', - version='7.0') + version='7.2-preview.1') return self._deserialize('[Process]', self._unwrap_collection(response)) def get_project_collection(self, collection_id): """GetProjectCollection. - Get project collection with the specified id or name. + [Preview API] Get project collection with the specified id or name. :param str collection_id: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if collection_id is not None: route_values['collectionId'] = self._serialize.url('collection_id', collection_id, 'str') response = self._send(http_method='GET', location_id='8031090f-ef1d-4af6-85fc-698cd75d42bf', - version='7.0', + version='7.2-preview.2', route_values=route_values) return self._deserialize('TeamProjectCollection', response) def get_project_collections(self, top=None, skip=None): """GetProjectCollections. - Get project collection references for this application. + [Preview API] Get project collection references for this application. :param int top: :param int skip: :rtype: [TeamProjectCollectionReference] @@ -190,17 +216,17 @@ def get_project_collections(self, top=None, skip=None): query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') response = self._send(http_method='GET', location_id='8031090f-ef1d-4af6-85fc-698cd75d42bf', - version='7.0', + version='7.2-preview.2', query_parameters=query_parameters) return self._deserialize('[TeamProjectCollectionReference]', self._unwrap_collection(response)) def get_project(self, project_id, include_capabilities=None, include_history=None): """GetProject. - Get project with the specified id or name, optionally including capabilities. + [Preview API] Get project with the specified id or name, optionally including capabilities. :param str project_id: :param bool include_capabilities: Include capabilities (such as source control) in the team project result (default: false). :param bool include_history: Search within renamed projects (that had such name in the past). - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project_id is not None: @@ -212,20 +238,20 @@ def get_project(self, project_id, include_capabilities=None, include_history=Non query_parameters['includeHistory'] = self._serialize.query('include_history', include_history, 'bool') response = self._send(http_method='GET', location_id='603fe2ac-9723-48b9-88ad-09305aa6c6e1', - version='7.0', + version='7.2-preview.4', route_values=route_values, query_parameters=query_parameters) return self._deserialize('TeamProject', response) def get_projects(self, state_filter=None, top=None, skip=None, continuation_token=None, get_default_team_image_url=None): """GetProjects. - Get all projects in the organization that the authenticated user has access to. + [Preview API] Get all projects in the organization that the authenticated user has access to. :param str state_filter: Filter on team projects in a specific team project state (default: WellFormed). :param int top: :param int skip: - :param str continuation_token: + :param int continuation_token: Pointer that shows how many projects already been fetched. :param bool get_default_team_image_url: - :rtype: :class:`<[TeamProjectReference]> ` + :rtype: :class:`<[TeamProjectReference]> ` """ query_parameters = {} if state_filter is not None: @@ -235,49 +261,49 @@ def get_projects(self, state_filter=None, top=None, skip=None, continuation_toke if skip is not None: query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') if continuation_token is not None: - query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'str') + query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'int') if get_default_team_image_url is not None: query_parameters['getDefaultTeamImageUrl'] = self._serialize.query('get_default_team_image_url', get_default_team_image_url, 'bool') response = self._send(http_method='GET', location_id='603fe2ac-9723-48b9-88ad-09305aa6c6e1', - version='7.0', + version='7.2-preview.4', query_parameters=query_parameters) return self._deserialize('[TeamProjectReference]', self._unwrap_collection(response)) def queue_create_project(self, project_to_create): """QueueCreateProject. - Queues a project to be created. Use the [GetOperation](../../operations/operations/get) to periodically check for create project status. - :param :class:` ` project_to_create: The project to create. - :rtype: :class:` ` + [Preview API] Queues a project to be created. Use the [GetOperation](../../operations/operations/get) to periodically check for create project status. + :param :class:` ` project_to_create: The project to create. + :rtype: :class:` ` """ content = self._serialize.body(project_to_create, 'TeamProject') response = self._send(http_method='POST', location_id='603fe2ac-9723-48b9-88ad-09305aa6c6e1', - version='7.0', + version='7.2-preview.4', content=content) return self._deserialize('OperationReference', response) def queue_delete_project(self, project_id): """QueueDeleteProject. - Queues a project to be deleted. Use the [GetOperation](../../operations/operations/get) to periodically check for delete project status. + [Preview API] Queues a project to be deleted. Use the [GetOperation](../../operations/operations/get) to periodically check for delete project status. :param str project_id: The project id of the project to delete. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project_id is not None: route_values['projectId'] = self._serialize.url('project_id', project_id, 'str') response = self._send(http_method='DELETE', location_id='603fe2ac-9723-48b9-88ad-09305aa6c6e1', - version='7.0', + version='7.2-preview.4', route_values=route_values) return self._deserialize('OperationReference', response) def update_project(self, project_update, project_id): """UpdateProject. - Update an existing project's name, abbreviation, description, or restore a project. - :param :class:` ` project_update: The updates for the project. The state must be set to wellFormed to restore the project. + [Preview API] Update an existing project's name, abbreviation, description, or restore a project. + :param :class:` ` project_update: The updates for the project. The state must be set to wellFormed to restore the project. :param str project_id: The project id of the project to update. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project_id is not None: @@ -285,7 +311,7 @@ def update_project(self, project_update, project_id): content = self._serialize.body(project_update, 'TeamProject') response = self._send(http_method='PATCH', location_id='603fe2ac-9723-48b9-88ad-09305aa6c6e1', - version='7.0', + version='7.2-preview.4', route_values=route_values, content=content) return self._deserialize('OperationReference', response) @@ -306,7 +332,7 @@ def get_project_properties(self, project_id, keys=None): query_parameters['keys'] = self._serialize.query('keys', keys, 'str') response = self._send(http_method='GET', location_id='4976a71a-4487-49aa-8aab-a1eda469037a', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[ProjectProperty]', self._unwrap_collection(response)) @@ -315,7 +341,7 @@ def set_project_properties(self, project_id, patch_document): """SetProjectProperties. [Preview API] Create, update, and delete team project properties. :param str project_id: The team project ID. - :param :class:`<[JsonPatchOperation]> ` patch_document: A JSON Patch document that represents an array of property operations. See RFC 6902 for more details on JSON Patch. The accepted operation verbs are Add and Remove, where Add is used for both creating and updating properties. The path consists of a forward slash and a property name. + :param :class:`<[JsonPatchOperation]> ` patch_document: A JSON Patch document that represents an array of property operations. See RFC 6902 for more details on JSON Patch. The accepted operation verbs are Add and Remove, where Add is used for both creating and updating properties. The path consists of a forward slash and a property name. """ route_values = {} if project_id is not None: @@ -323,7 +349,7 @@ def set_project_properties(self, project_id, patch_document): content = self._serialize.body(patch_document, '[JsonPatchOperation]') self._send(http_method='PATCH', location_id='4976a71a-4487-49aa-8aab-a1eda469037a', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, content=content, media_type='application/json-patch+json') @@ -331,13 +357,13 @@ def set_project_properties(self, project_id, patch_document): def create_or_update_proxy(self, proxy): """CreateOrUpdateProxy. [Preview API] - :param :class:` ` proxy: - :rtype: :class:` ` + :param :class:` ` proxy: + :rtype: :class:` ` """ content = self._serialize.body(proxy, 'Proxy') response = self._send(http_method='PUT', location_id='ec1f4311-f2b4-4c15-b2b8-8990b80d2908', - version='7.0-preview.2', + version='7.2-preview.2', content=content) return self._deserialize('Proxy', response) @@ -354,7 +380,7 @@ def delete_proxy(self, proxy_url, site=None): query_parameters['site'] = self._serialize.query('site', site, 'str') self._send(http_method='DELETE', location_id='ec1f4311-f2b4-4c15-b2b8-8990b80d2908', - version='7.0-preview.2', + version='7.2-preview.2', query_parameters=query_parameters) def get_proxies(self, proxy_url=None): @@ -368,16 +394,40 @@ def get_proxies(self, proxy_url=None): query_parameters['proxyUrl'] = self._serialize.query('proxy_url', proxy_url, 'str') response = self._send(http_method='GET', location_id='ec1f4311-f2b4-4c15-b2b8-8990b80d2908', - version='7.0-preview.2', + version='7.2-preview.2', query_parameters=query_parameters) return self._deserialize('[Proxy]', self._unwrap_collection(response)) + def get_all_teams(self, mine=None, top=None, skip=None, expand_identity=None): + """GetAllTeams. + [Preview API] Get a list of all teams. + :param bool mine: If true, then return all teams requesting user is member. Otherwise return all teams user has read access. + :param int top: Maximum number of teams to return. + :param int skip: Number of teams to skip. + :param bool expand_identity: A value indicating whether or not to expand Identity information in the result WebApiTeam object. + :rtype: [WebApiTeam] + """ + query_parameters = {} + if mine is not None: + query_parameters['$mine'] = self._serialize.query('mine', mine, 'bool') + if top is not None: + query_parameters['$top'] = self._serialize.query('top', top, 'int') + if skip is not None: + query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') + if expand_identity is not None: + query_parameters['$expandIdentity'] = self._serialize.query('expand_identity', expand_identity, 'bool') + response = self._send(http_method='GET', + location_id='7a4d9ee9-3433-4347-b47a-7a80f1cf307e', + version='7.2-preview.3', + query_parameters=query_parameters) + return self._deserialize('[WebApiTeam]', self._unwrap_collection(response)) + def create_team(self, team, project_id): """CreateTeam. - Create a team in a team project. - :param :class:` ` team: The team data used to create the team. + [Preview API] Create a team in a team project. + :param :class:` ` team: The team data used to create the team. :param str project_id: The name or ID (GUID) of the team project in which to create the team. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project_id is not None: @@ -385,14 +435,14 @@ def create_team(self, team, project_id): content = self._serialize.body(team, 'WebApiTeam') response = self._send(http_method='POST', location_id='d30a3dd1-f8ba-442a-b86a-bd0c0c383e59', - version='7.0', + version='7.2-preview.3', route_values=route_values, content=content) return self._deserialize('WebApiTeam', response) def delete_team(self, project_id, team_id): """DeleteTeam. - Delete a team. + [Preview API] Delete a team. :param str project_id: The name or ID (GUID) of the team project containing the team to delete. :param str team_id: The name or ID of the team to delete. """ @@ -403,16 +453,16 @@ def delete_team(self, project_id, team_id): route_values['teamId'] = self._serialize.url('team_id', team_id, 'str') self._send(http_method='DELETE', location_id='d30a3dd1-f8ba-442a-b86a-bd0c0c383e59', - version='7.0', + version='7.2-preview.3', route_values=route_values) def get_team(self, project_id, team_id, expand_identity=None): """GetTeam. - Get a specific team. + [Preview API] Get a specific team. :param str project_id: The name or ID (GUID) of the team project containing the team. :param str team_id: The name or ID (GUID) of the team. :param bool expand_identity: A value indicating whether or not to expand Identity information in the result WebApiTeam object. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project_id is not None: @@ -424,14 +474,14 @@ def get_team(self, project_id, team_id, expand_identity=None): query_parameters['$expandIdentity'] = self._serialize.query('expand_identity', expand_identity, 'bool') response = self._send(http_method='GET', location_id='d30a3dd1-f8ba-442a-b86a-bd0c0c383e59', - version='7.0', + version='7.2-preview.3', route_values=route_values, query_parameters=query_parameters) return self._deserialize('WebApiTeam', response) def get_teams(self, project_id, mine=None, top=None, skip=None, expand_identity=None): """GetTeams. - Get a list of teams. + [Preview API] Get a list of teams. :param str project_id: :param bool mine: If true return all the teams requesting user is member, otherwise return all the teams user has read access. :param int top: Maximum number of teams to return. @@ -453,18 +503,18 @@ def get_teams(self, project_id, mine=None, top=None, skip=None, expand_identity= query_parameters['$expandIdentity'] = self._serialize.query('expand_identity', expand_identity, 'bool') response = self._send(http_method='GET', location_id='d30a3dd1-f8ba-442a-b86a-bd0c0c383e59', - version='7.0', + version='7.2-preview.3', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[WebApiTeam]', self._unwrap_collection(response)) def update_team(self, team_data, project_id, team_id): """UpdateTeam. - Update a team's name and/or description. - :param :class:` ` team_data: + [Preview API] Update a team's name and/or description. + :param :class:` ` team_data: :param str project_id: The name or ID (GUID) of the team project containing the team to update. :param str team_id: The name of ID of the team to update. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project_id is not None: @@ -474,32 +524,8 @@ def update_team(self, team_data, project_id, team_id): content = self._serialize.body(team_data, 'WebApiTeam') response = self._send(http_method='PATCH', location_id='d30a3dd1-f8ba-442a-b86a-bd0c0c383e59', - version='7.0', + version='7.2-preview.3', route_values=route_values, content=content) return self._deserialize('WebApiTeam', response) - def get_all_teams(self, mine=None, top=None, skip=None, expand_identity=None): - """GetAllTeams. - [Preview API] Get a list of all teams. - :param bool mine: If true, then return all teams requesting user is member. Otherwise return all teams user has read access. - :param int top: Maximum number of teams to return. - :param int skip: Number of teams to skip. - :param bool expand_identity: A value indicating whether or not to expand Identity information in the result WebApiTeam object. - :rtype: [WebApiTeam] - """ - query_parameters = {} - if mine is not None: - query_parameters['$mine'] = self._serialize.query('mine', mine, 'bool') - if top is not None: - query_parameters['$top'] = self._serialize.query('top', top, 'int') - if skip is not None: - query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') - if expand_identity is not None: - query_parameters['$expandIdentity'] = self._serialize.query('expand_identity', expand_identity, 'bool') - response = self._send(http_method='GET', - location_id='7a4d9ee9-3433-4347-b47a-7a80f1cf307e', - version='7.0-preview.3', - query_parameters=query_parameters) - return self._deserialize('[WebApiTeam]', self._unwrap_collection(response)) - diff --git a/azure-devops/azure/devops/v7_0/core/models.py b/azure-devops/azure/devops/v7_2/core/models.py similarity index 92% rename from azure-devops/azure/devops/v7_0/core/models.py rename to azure-devops/azure/devops/v7_2/core/models.py index 9397a76c..aef54896 100644 --- a/azure-devops/azure/devops/v7_0/core/models.py +++ b/azure-devops/azure/devops/v7_2/core/models.py @@ -9,10 +9,29 @@ from msrest.serialization import Model +class CategorizedWebApiTeams(Model): + """ + :param my_teams: Teams that the user is a member of. + :type my_teams: list of :class:`WebApiTeam ` + :param other_readable_teams: Teams that the user can read but is not member of. + :type other_readable_teams: list of :class:`WebApiTeam ` + """ + + _attribute_map = { + 'my_teams': {'key': 'myTeams', 'type': '[WebApiTeam]'}, + 'other_readable_teams': {'key': 'otherReadableTeams', 'type': '[WebApiTeam]'} + } + + def __init__(self, my_teams=None, other_readable_teams=None): + super(CategorizedWebApiTeams, self).__init__() + self.my_teams = my_teams + self.other_readable_teams = other_readable_teams + + class GraphSubjectBase(Model): """ :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. :type descriptor: str :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. @@ -43,7 +62,7 @@ class IdentityBase(Model): :param custom_display_name: The custom display name for the identity (if any). Setting this property to an empty string will clear the existing custom display name. Setting this property to null will not affect the existing persisted value (since null values do not get sent over the wire or to the database) :type custom_display_name: str :param descriptor: - :type descriptor: :class:`str ` + :type descriptor: :class:`str ` :param id: Identity Identifier. Also called Storage Key, or VSID :type id: str :param is_active: True if the identity has a membership in any Azure Devops group in the organization. @@ -55,21 +74,21 @@ class IdentityBase(Model): :param member_ids: Id of the members of the identity (groups only). :type member_ids: list of str :param member_of: - :type member_of: list of :class:`str ` + :type member_of: list of :class:`str ` :param members: - :type members: list of :class:`str ` + :type members: list of :class:`str ` :param meta_type_id: :type meta_type_id: int :param properties: - :type properties: :class:`object ` + :type properties: :class:`object ` :param provider_display_name: The display name for the identity as specified by the source identity provider. :type provider_display_name: str :param resource_version: :type resource_version: int :param social_descriptor: - :type social_descriptor: :class:`str ` + :type social_descriptor: :class:`str ` :param subject_descriptor: Subject descriptor of a Graph entity. - :type subject_descriptor: :class:`str ` + :type subject_descriptor: :class:`str ` :param unique_user_id: :type unique_user_id: int """ @@ -131,7 +150,7 @@ def __init__(self, identity_ids=None): class IdentityRef(GraphSubjectBase): """ :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. :type descriptor: str :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. @@ -296,7 +315,7 @@ class ProjectInfo(Model): :param name: The name of the project. :type name: str :param properties: A set of name-value pairs storing additional property data related to the project. - :type properties: list of :class:`ProjectProperty ` + :type properties: list of :class:`ProjectProperty ` :param revision: The current revision of the project. :type revision: long :param state: The current state of the project. @@ -343,7 +362,7 @@ class ProjectProperties(Model): :param project_id: The team project Id :type project_id: str :param properties: The collection of team project properties - :type properties: list of :class:`ProjectProperty ` + :type properties: list of :class:`ProjectProperty ` """ _attribute_map = { @@ -381,7 +400,7 @@ def __init__(self, name=None, value=None): class Proxy(Model): """ :param authorization: - :type authorization: :class:`ProxyAuthorization ` + :type authorization: :class:`ProxyAuthorization ` :param description: This is a description string :type description: str :param friendly_name: The friendly name of the server @@ -424,9 +443,9 @@ class ProxyAuthorization(Model): :param client_id: Gets or sets the client identifier for this proxy. :type client_id: str :param identity: Gets or sets the user identity to authorize for on-prem. - :type identity: :class:`str ` + :type identity: :class:`str ` :param public_key: Gets or sets the public key used to verify the identity of this proxy. Only specify on hosted. - :type public_key: :class:`PublicKey ` + :type public_key: :class:`PublicKey ` """ _attribute_map = { @@ -485,7 +504,7 @@ def __init__(self, links=None): class TeamMember(Model): """ :param identity: - :type identity: :class:`IdentityRef ` + :type identity: :class:`IdentityRef ` :param is_team_admin: :type is_team_admin: bool """ @@ -505,6 +524,8 @@ class TeamProjectCollectionReference(Model): """ Reference object for a TeamProjectCollection. + :param avatar_url: Collection avatar Url. + :type avatar_url: str :param id: Collection Id. :type id: str :param name: Collection Name. @@ -514,13 +535,15 @@ class TeamProjectCollectionReference(Model): """ _attribute_map = { + 'avatar_url': {'key': 'avatarUrl', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'url': {'key': 'url', 'type': 'str'} } - def __init__(self, id=None, name=None, url=None): + def __init__(self, avatar_url=None, id=None, name=None, url=None): super(TeamProjectCollectionReference, self).__init__() + self.avatar_url = avatar_url self.id = id self.name = name self.url = url @@ -626,7 +649,7 @@ class Identity(IdentityBase): :param custom_display_name: The custom display name for the identity (if any). Setting this property to an empty string will clear the existing custom display name. Setting this property to null will not affect the existing persisted value (since null values do not get sent over the wire or to the database) :type custom_display_name: str :param descriptor: - :type descriptor: :class:`str ` + :type descriptor: :class:`str ` :param id: Identity Identifier. Also called Storage Key, or VSID :type id: str :param is_active: True if the identity has a membership in any Azure Devops group in the organization. @@ -638,21 +661,21 @@ class Identity(IdentityBase): :param member_ids: Id of the members of the identity (groups only). :type member_ids: list of str :param member_of: - :type member_of: list of :class:`str ` + :type member_of: list of :class:`str ` :param members: - :type members: list of :class:`str ` + :type members: list of :class:`str ` :param meta_type_id: :type meta_type_id: int :param properties: - :type properties: :class:`object ` + :type properties: :class:`object ` :param provider_display_name: The display name for the identity as specified by the source identity provider. :type provider_display_name: str :param resource_version: :type resource_version: int :param social_descriptor: - :type social_descriptor: :class:`str ` + :type social_descriptor: :class:`str ` :param subject_descriptor: Subject descriptor of a Graph entity. - :type subject_descriptor: :class:`str ` + :type subject_descriptor: :class:`str ` :param unique_user_id: :type unique_user_id: int """ @@ -687,7 +710,7 @@ class Process(ProcessReference): :param url: :type url: str :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param description: :type description: str :param id: @@ -742,11 +765,11 @@ class TeamProject(TeamProjectReference): :param visibility: Project visibility. :type visibility: object :param _links: The links to other objects related to this object. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param capabilities: Set of capabilities this project has (such as process template & version control). :type capabilities: dict :param default_team: The shallow ref to the default team. - :type default_team: :class:`WebApiTeamRef ` + :type default_team: :class:`WebApiTeamRef ` """ _attribute_map = { @@ -776,6 +799,8 @@ class TeamProjectCollection(TeamProjectCollectionReference): """ Data contract for a TeamProjectCollection. + :param avatar_url: Collection avatar Url. + :type avatar_url: str :param id: Collection Id. :type id: str :param name: Collection Name. @@ -783,7 +808,7 @@ class TeamProjectCollection(TeamProjectCollectionReference): :param url: Collection REST Url. :type url: str :param _links: The links to other objects related to this object. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param description: Project collection description. :type description: str :param process_customization_type: Process customization type on this collection. It can be Xml or Inherited. @@ -793,6 +818,7 @@ class TeamProjectCollection(TeamProjectCollectionReference): """ _attribute_map = { + 'avatar_url': {'key': 'avatarUrl', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'url': {'key': 'url', 'type': 'str'}, @@ -802,8 +828,8 @@ class TeamProjectCollection(TeamProjectCollectionReference): 'state': {'key': 'state', 'type': 'str'} } - def __init__(self, id=None, name=None, url=None, _links=None, description=None, process_customization_type=None, state=None): - super(TeamProjectCollection, self).__init__(id=id, name=name, url=url) + def __init__(self, avatar_url=None, id=None, name=None, url=None, _links=None, description=None, process_customization_type=None, state=None): + super(TeamProjectCollection, self).__init__(avatar_url=avatar_url, id=id, name=name, url=url) self._links = _links self.description = description self.process_customization_type = process_customization_type @@ -815,7 +841,7 @@ class WebApiConnectedService(WebApiConnectedServiceRef): :param url: :type url: str :param authenticated_by: The user who did the OAuth authentication to created this service - :type authenticated_by: :class:`IdentityRef ` + :type authenticated_by: :class:`IdentityRef ` :param description: Extra description on the service. :type description: str :param friendly_name: Friendly Name of service connection @@ -825,7 +851,7 @@ class WebApiConnectedService(WebApiConnectedServiceRef): :param kind: The kind of service. :type kind: str :param project: The project associated with this service - :type project: :class:`TeamProjectReference ` + :type project: :class:`TeamProjectReference ` :param service_uri: Optional uri to connect directly to the service such as https://windows.azure.com :type service_uri: str """ @@ -859,7 +885,7 @@ class WebApiConnectedServiceDetails(WebApiConnectedServiceRef): :param url: :type url: str :param connected_service_meta_data: Meta data for service connection - :type connected_service_meta_data: :class:`WebApiConnectedService ` + :type connected_service_meta_data: :class:`WebApiConnectedService ` :param credentials_xml: Credential info :type credentials_xml: str :param end_point: Optional uri to connect directly to the service such as https://windows.azure.com @@ -892,7 +918,7 @@ class WebApiTeam(WebApiTeamRef): :param description: Team description :type description: str :param identity: Team identity. - :type identity: :class:`Identity ` + :type identity: :class:`Identity ` :param identity_url: Identity REST API Url to this team :type identity_url: str :param project_id: @@ -922,6 +948,7 @@ def __init__(self, id=None, name=None, url=None, description=None, identity=None __all__ = [ + 'CategorizedWebApiTeams', 'GraphSubjectBase', 'IdentityBase', 'IdentityData', diff --git a/azure-devops/azure/devops/v7_0/customer_intelligence/__init__.py b/azure-devops/azure/devops/v7_2/customer_intelligence/__init__.py similarity index 100% rename from azure-devops/azure/devops/v7_0/customer_intelligence/__init__.py rename to azure-devops/azure/devops/v7_2/customer_intelligence/__init__.py diff --git a/azure-devops/azure/devops/v7_0/customer_intelligence/customer_intelligence_client.py b/azure-devops/azure/devops/v7_2/customer_intelligence/customer_intelligence_client.py similarity index 97% rename from azure-devops/azure/devops/v7_0/customer_intelligence/customer_intelligence_client.py rename to azure-devops/azure/devops/v7_2/customer_intelligence/customer_intelligence_client.py index 3a4f0c4b..71722e7a 100644 --- a/azure-devops/azure/devops/v7_0/customer_intelligence/customer_intelligence_client.py +++ b/azure-devops/azure/devops/v7_2/customer_intelligence/customer_intelligence_client.py @@ -33,6 +33,6 @@ def publish_events(self, events): content = self._serialize.body(events, '[CustomerIntelligenceEvent]') self._send(http_method='POST', location_id='b5cc35c2-ff2b-491d-a085-24b6e9f396fd', - version='7.0-preview.1', + version='7.2-preview.1', content=content) diff --git a/azure-devops/azure/devops/v7_0/customer_intelligence/models.py b/azure-devops/azure/devops/v7_2/customer_intelligence/models.py similarity index 100% rename from azure-devops/azure/devops/v7_0/customer_intelligence/models.py rename to azure-devops/azure/devops/v7_2/customer_intelligence/models.py diff --git a/azure-devops/azure/devops/v7_0/dashboard/__init__.py b/azure-devops/azure/devops/v7_2/dashboard/__init__.py similarity index 100% rename from azure-devops/azure/devops/v7_0/dashboard/__init__.py rename to azure-devops/azure/devops/v7_2/dashboard/__init__.py diff --git a/azure-devops/azure/devops/v7_0/dashboard/dashboard_client.py b/azure-devops/azure/devops/v7_2/dashboard/dashboard_client.py similarity index 89% rename from azure-devops/azure/devops/v7_0/dashboard/dashboard_client.py rename to azure-devops/azure/devops/v7_2/dashboard/dashboard_client.py index aaeaaf7f..f0d133b4 100644 --- a/azure-devops/azure/devops/v7_0/dashboard/dashboard_client.py +++ b/azure-devops/azure/devops/v7_2/dashboard/dashboard_client.py @@ -28,9 +28,9 @@ def __init__(self, base_url=None, creds=None): def create_dashboard(self, dashboard, team_context): """CreateDashboard. [Preview API] Create the supplied dashboard. - :param :class:` ` dashboard: The initial state of the dashboard - :param :class:` ` team_context: The team context for the operation - :rtype: :class:` ` + :param :class:` ` dashboard: The initial state of the dashboard + :param :class:` ` team_context: The team context for the operation + :rtype: :class:` ` """ project = None team = None @@ -52,7 +52,7 @@ def create_dashboard(self, dashboard, team_context): content = self._serialize.body(dashboard, 'Dashboard') response = self._send(http_method='POST', location_id='454b3e51-2e6e-48d4-ad81-978154089351', - version='7.0-preview.3', + version='7.2-preview.3', route_values=route_values, content=content) return self._deserialize('Dashboard', response) @@ -60,7 +60,7 @@ def create_dashboard(self, dashboard, team_context): def delete_dashboard(self, team_context, dashboard_id): """DeleteDashboard. [Preview API] Delete a dashboard given its ID. This also deletes the widgets associated with this dashboard. - :param :class:` ` team_context: The team context for the operation + :param :class:` ` team_context: The team context for the operation :param str dashboard_id: ID of the dashboard to delete. """ project = None @@ -84,15 +84,15 @@ def delete_dashboard(self, team_context, dashboard_id): route_values['dashboardId'] = self._serialize.url('dashboard_id', dashboard_id, 'str') self._send(http_method='DELETE', location_id='454b3e51-2e6e-48d4-ad81-978154089351', - version='7.0-preview.3', + version='7.2-preview.3', route_values=route_values) def get_dashboard(self, team_context, dashboard_id): """GetDashboard. [Preview API] Get a dashboard by its ID. - :param :class:` ` team_context: The team context for the operation + :param :class:` ` team_context: The team context for the operation :param str dashboard_id: - :rtype: :class:` ` + :rtype: :class:` ` """ project = None team = None @@ -115,14 +115,14 @@ def get_dashboard(self, team_context, dashboard_id): route_values['dashboardId'] = self._serialize.url('dashboard_id', dashboard_id, 'str') response = self._send(http_method='GET', location_id='454b3e51-2e6e-48d4-ad81-978154089351', - version='7.0-preview.3', + version='7.2-preview.3', route_values=route_values) return self._deserialize('Dashboard', response) def get_dashboards_by_project(self, team_context): """GetDashboardsByProject. [Preview API] Get a list of dashboards under a project. - :param :class:` ` team_context: The team context for the operation + :param :class:` ` team_context: The team context for the operation :rtype: [Dashboard] """ project = None @@ -144,17 +144,17 @@ def get_dashboards_by_project(self, team_context): route_values['team'] = self._serialize.url('team', team, 'string') response = self._send(http_method='GET', location_id='454b3e51-2e6e-48d4-ad81-978154089351', - version='7.0-preview.3', + version='7.2-preview.3', route_values=route_values) return self._deserialize('[Dashboard]', self._unwrap_collection(response)) def replace_dashboard(self, dashboard, team_context, dashboard_id): """ReplaceDashboard. [Preview API] Replace configuration for the specified dashboard. Replaces Widget list on Dashboard, only if property is supplied. - :param :class:` ` dashboard: The Configuration of the dashboard to replace. - :param :class:` ` team_context: The team context for the operation + :param :class:` ` dashboard: The Configuration of the dashboard to replace. + :param :class:` ` team_context: The team context for the operation :param str dashboard_id: ID of the dashboard to replace. - :rtype: :class:` ` + :rtype: :class:` ` """ project = None team = None @@ -178,7 +178,7 @@ def replace_dashboard(self, dashboard, team_context, dashboard_id): content = self._serialize.body(dashboard, 'Dashboard') response = self._send(http_method='PUT', location_id='454b3e51-2e6e-48d4-ad81-978154089351', - version='7.0-preview.3', + version='7.2-preview.3', route_values=route_values, content=content) return self._deserialize('Dashboard', response) @@ -186,9 +186,9 @@ def replace_dashboard(self, dashboard, team_context, dashboard_id): def replace_dashboards(self, group, team_context): """ReplaceDashboards. [Preview API] Update the name and position of dashboards in the supplied group, and remove omitted dashboards. Does not modify dashboard content. - :param :class:` ` group: - :param :class:` ` team_context: The team context for the operation - :rtype: :class:` ` + :param :class:` ` group: + :param :class:` ` team_context: The team context for the operation + :rtype: :class:` ` """ project = None team = None @@ -210,7 +210,7 @@ def replace_dashboards(self, group, team_context): content = self._serialize.body(group, 'DashboardGroup') response = self._send(http_method='PUT', location_id='454b3e51-2e6e-48d4-ad81-978154089351', - version='7.0-preview.3', + version='7.2-preview.3', route_values=route_values, content=content) return self._deserialize('DashboardGroup', response) @@ -218,10 +218,10 @@ def replace_dashboards(self, group, team_context): def create_widget(self, widget, team_context, dashboard_id): """CreateWidget. [Preview API] Create a widget on the specified dashboard. - :param :class:` ` widget: State of the widget to add - :param :class:` ` team_context: The team context for the operation + :param :class:` ` widget: State of the widget to add + :param :class:` ` team_context: The team context for the operation :param str dashboard_id: ID of dashboard the widget will be added to. - :rtype: :class:` ` + :rtype: :class:` ` """ project = None team = None @@ -245,7 +245,7 @@ def create_widget(self, widget, team_context, dashboard_id): content = self._serialize.body(widget, 'Widget') response = self._send(http_method='POST', location_id='bdcff53a-8355-4172-a00a-40497ea23afc', - version='7.0-preview.2', + version='7.2-preview.2', route_values=route_values, content=content) return self._deserialize('Widget', response) @@ -253,10 +253,10 @@ def create_widget(self, widget, team_context, dashboard_id): def delete_widget(self, team_context, dashboard_id, widget_id): """DeleteWidget. [Preview API] Delete the specified widget. - :param :class:` ` team_context: The team context for the operation + :param :class:` ` team_context: The team context for the operation :param str dashboard_id: ID of the dashboard containing the widget. :param str widget_id: ID of the widget to update. - :rtype: :class:` ` + :rtype: :class:` ` """ project = None team = None @@ -281,17 +281,17 @@ def delete_widget(self, team_context, dashboard_id, widget_id): route_values['widgetId'] = self._serialize.url('widget_id', widget_id, 'str') response = self._send(http_method='DELETE', location_id='bdcff53a-8355-4172-a00a-40497ea23afc', - version='7.0-preview.2', + version='7.2-preview.2', route_values=route_values) return self._deserialize('Dashboard', response) def get_widget(self, team_context, dashboard_id, widget_id): """GetWidget. [Preview API] Get the current state of the specified widget. - :param :class:` ` team_context: The team context for the operation + :param :class:` ` team_context: The team context for the operation :param str dashboard_id: ID of the dashboard containing the widget. :param str widget_id: ID of the widget to read. - :rtype: :class:` ` + :rtype: :class:` ` """ project = None team = None @@ -316,17 +316,17 @@ def get_widget(self, team_context, dashboard_id, widget_id): route_values['widgetId'] = self._serialize.url('widget_id', widget_id, 'str') response = self._send(http_method='GET', location_id='bdcff53a-8355-4172-a00a-40497ea23afc', - version='7.0-preview.2', + version='7.2-preview.2', route_values=route_values) return self._deserialize('Widget', response) def get_widgets(self, team_context, dashboard_id, eTag=None): """GetWidgets. [Preview API] Get widgets contained on the specified dashboard. - :param :class:` ` team_context: The team context for the operation + :param :class:` ` team_context: The team context for the operation :param str dashboard_id: ID of the dashboard to read. :param String eTag: Dashboard Widgets Version - :rtype: :class:` ` + :rtype: :class:` ` """ project = None team = None @@ -352,7 +352,7 @@ def get_widgets(self, team_context, dashboard_id, eTag=None): additional_headers['ETag'] = eTag response = self._send(http_method='GET', location_id='bdcff53a-8355-4172-a00a-40497ea23afc', - version='7.0-preview.2', + version='7.2-preview.2', route_values=route_values, additional_headers=additional_headers) response_object = models.WidgetsVersionedList() @@ -363,11 +363,11 @@ def get_widgets(self, team_context, dashboard_id, eTag=None): def replace_widget(self, widget, team_context, dashboard_id, widget_id): """ReplaceWidget. [Preview API] Override the state of the specified widget. - :param :class:` ` widget: State to be written for the widget. - :param :class:` ` team_context: The team context for the operation + :param :class:` ` widget: State to be written for the widget. + :param :class:` ` team_context: The team context for the operation :param str dashboard_id: ID of the dashboard containing the widget. :param str widget_id: ID of the widget to update. - :rtype: :class:` ` + :rtype: :class:` ` """ project = None team = None @@ -393,7 +393,7 @@ def replace_widget(self, widget, team_context, dashboard_id, widget_id): content = self._serialize.body(widget, 'Widget') response = self._send(http_method='PUT', location_id='bdcff53a-8355-4172-a00a-40497ea23afc', - version='7.0-preview.2', + version='7.2-preview.2', route_values=route_values, content=content) return self._deserialize('Widget', response) @@ -402,10 +402,10 @@ def replace_widgets(self, widgets, team_context, dashboard_id, eTag=None): """ReplaceWidgets. [Preview API] Replace the widgets on specified dashboard with the supplied widgets. :param [Widget] widgets: Revised state of widgets to store for the dashboard. - :param :class:` ` team_context: The team context for the operation + :param :class:` ` team_context: The team context for the operation :param str dashboard_id: ID of the Dashboard to modify. :param String eTag: Dashboard Widgets Version - :rtype: :class:` ` + :rtype: :class:` ` """ project = None team = None @@ -432,7 +432,7 @@ def replace_widgets(self, widgets, team_context, dashboard_id, eTag=None): content = self._serialize.body(widgets, '[Widget]') response = self._send(http_method='PUT', location_id='bdcff53a-8355-4172-a00a-40497ea23afc', - version='7.0-preview.2', + version='7.2-preview.2', route_values=route_values, additional_headers=additional_headers, content=content) @@ -444,11 +444,11 @@ def replace_widgets(self, widgets, team_context, dashboard_id, eTag=None): def update_widget(self, widget, team_context, dashboard_id, widget_id): """UpdateWidget. [Preview API] Perform a partial update of the specified widget. - :param :class:` ` widget: Description of the widget changes to apply. All non-null fields will be replaced. - :param :class:` ` team_context: The team context for the operation + :param :class:` ` widget: Description of the widget changes to apply. All non-null fields will be replaced. + :param :class:` ` team_context: The team context for the operation :param str dashboard_id: ID of the dashboard containing the widget. :param str widget_id: ID of the widget to update. - :rtype: :class:` ` + :rtype: :class:` ` """ project = None team = None @@ -474,7 +474,7 @@ def update_widget(self, widget, team_context, dashboard_id, widget_id): content = self._serialize.body(widget, 'Widget') response = self._send(http_method='PATCH', location_id='bdcff53a-8355-4172-a00a-40497ea23afc', - version='7.0-preview.2', + version='7.2-preview.2', route_values=route_values, content=content) return self._deserialize('Widget', response) @@ -483,10 +483,10 @@ def update_widgets(self, widgets, team_context, dashboard_id, eTag=None): """UpdateWidgets. [Preview API] Update the supplied widgets on the dashboard using supplied state. State of existing Widgets not passed in the widget list is preserved. :param [Widget] widgets: The set of widget states to update on the dashboard. - :param :class:` ` team_context: The team context for the operation + :param :class:` ` team_context: The team context for the operation :param str dashboard_id: ID of the Dashboard to modify. :param String eTag: Dashboard Widgets Version - :rtype: :class:` ` + :rtype: :class:` ` """ project = None team = None @@ -513,7 +513,7 @@ def update_widgets(self, widgets, team_context, dashboard_id, eTag=None): content = self._serialize.body(widgets, '[Widget]') response = self._send(http_method='PATCH', location_id='bdcff53a-8355-4172-a00a-40497ea23afc', - version='7.0-preview.2', + version='7.2-preview.2', route_values=route_values, additional_headers=additional_headers, content=content) @@ -527,7 +527,7 @@ def get_widget_metadata(self, contribution_id, project=None): [Preview API] Get the widget metadata satisfying the specified contribution ID. :param str contribution_id: The ID of Contribution for the Widget :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -536,7 +536,7 @@ def get_widget_metadata(self, contribution_id, project=None): route_values['contributionId'] = self._serialize.url('contribution_id', contribution_id, 'str') response = self._send(http_method='GET', location_id='6b3628d3-e96f-4fc7-b176-50240b03b515', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) return self._deserialize('WidgetMetadataResponse', response) @@ -545,7 +545,7 @@ def get_widget_types(self, scope, project=None): [Preview API] Get all available widget metadata in alphabetical order, including widgets marked with isVisibleFromCatalog == false. :param str scope: :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -555,7 +555,7 @@ def get_widget_types(self, scope, project=None): query_parameters['$scope'] = self._serialize.query('scope', scope, 'str') response = self._send(http_method='GET', location_id='6b3628d3-e96f-4fc7-b176-50240b03b515', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('WidgetTypesResponse', response) diff --git a/azure-devops/azure/devops/v7_0/dashboard/models.py b/azure-devops/azure/devops/v7_2/dashboard/models.py similarity index 87% rename from azure-devops/azure/devops/v7_0/dashboard/models.py rename to azure-devops/azure/devops/v7_2/dashboard/models.py index 5f28e616..d27977b8 100644 --- a/azure-devops/azure/devops/v7_0/dashboard/models.py +++ b/azure-devops/azure/devops/v7_2/dashboard/models.py @@ -57,9 +57,9 @@ def __init__(self, copy_dashboard_scope=None, copy_queries_flag=None, descriptio class CopyDashboardResponse(Model): """ :param copied_dashboard: Copied Dashboard - :type copied_dashboard: :class:`Dashboard ` + :type copied_dashboard: :class:`Dashboard ` :param copy_dashboard_options: Copy Dashboard options - :type copy_dashboard_options: :class:`CopyDashboardOptions ` + :type copy_dashboard_options: :class:`CopyDashboardOptions ` """ _attribute_map = { @@ -78,7 +78,7 @@ class Dashboard(Model): Model of a Dashboard. :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param dashboard_scope: Entity to which the dashboard is scoped. :type dashboard_scope: object :param description: Description of the dashboard. @@ -89,6 +89,12 @@ class Dashboard(Model): :type group_id: str :param id: ID of the Dashboard. Provided by service at creation time. :type id: str + :param last_accessed_date: Dashboard Last Accessed Date. + :type last_accessed_date: datetime + :param modified_by: Id of the person who modified Dashboard. + :type modified_by: str + :param modified_date: Dashboard's last modified date. + :type modified_date: datetime :param name: Name of the Dashboard. :type name: str :param owner_id: ID of the owner for a dashboard. For team-scoped dashboards, this is the unique identifier for the team associated with the dashboard. For project-scoped dashboards, this is the unique identifier for the user identity associated with the dashboard. @@ -100,7 +106,7 @@ class Dashboard(Model): :param url: :type url: str :param widgets: The set of Widgets on the dashboard. - :type widgets: list of :class:`Widget ` + :type widgets: list of :class:`Widget ` """ _attribute_map = { @@ -110,6 +116,9 @@ class Dashboard(Model): 'eTag': {'key': 'eTag', 'type': 'str'}, 'group_id': {'key': 'groupId', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, + 'last_accessed_date': {'key': 'lastAccessedDate', 'type': 'iso-8601'}, + 'modified_by': {'key': 'modifiedBy', 'type': 'str'}, + 'modified_date': {'key': 'modifiedDate', 'type': 'iso-8601'}, 'name': {'key': 'name', 'type': 'str'}, 'owner_id': {'key': 'ownerId', 'type': 'str'}, 'position': {'key': 'position', 'type': 'int'}, @@ -118,7 +127,7 @@ class Dashboard(Model): 'widgets': {'key': 'widgets', 'type': '[Widget]'} } - def __init__(self, _links=None, dashboard_scope=None, description=None, eTag=None, group_id=None, id=None, name=None, owner_id=None, position=None, refresh_interval=None, url=None, widgets=None): + def __init__(self, _links=None, dashboard_scope=None, description=None, eTag=None, group_id=None, id=None, last_accessed_date=None, modified_by=None, modified_date=None, name=None, owner_id=None, position=None, refresh_interval=None, url=None, widgets=None): super(Dashboard, self).__init__() self._links = _links self.dashboard_scope = dashboard_scope @@ -126,6 +135,9 @@ def __init__(self, _links=None, dashboard_scope=None, description=None, eTag=Non self.eTag = eTag self.group_id = group_id self.id = id + self.last_accessed_date = last_accessed_date + self.modified_by = modified_by + self.modified_date = modified_date self.name = name self.owner_id = owner_id self.position = position @@ -139,9 +151,9 @@ class DashboardGroup(Model): Describes a list of dashboards associated to an owner. Currently, teams own dashboard groups. :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param dashboard_entries: A list of Dashboards held by the Dashboard Group - :type dashboard_entries: list of :class:`DashboardGroupEntry ` + :type dashboard_entries: list of :class:`DashboardGroupEntry ` :param permission: Deprecated: The old permission model describing the level of permissions for the current team. Pre-M125. :type permission: object :param team_dashboard_permission: A permissions bit mask describing the security permissions of the current team for dashboards. When this permission is the value None, use GroupMemberPermission. Permissions are evaluated based on the presence of a value other than None, else the GroupMemberPermission will be saved. @@ -172,7 +184,7 @@ class DashboardGroupEntry(Dashboard): Dashboard group entry, wrapping around Dashboard (needed?) :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param dashboard_scope: Entity to which the dashboard is scoped. :type dashboard_scope: object :param description: Description of the dashboard. @@ -183,6 +195,12 @@ class DashboardGroupEntry(Dashboard): :type group_id: str :param id: ID of the Dashboard. Provided by service at creation time. :type id: str + :param last_accessed_date: Dashboard Last Accessed Date. + :type last_accessed_date: datetime + :param modified_by: Id of the person who modified Dashboard. + :type modified_by: str + :param modified_date: Dashboard's last modified date. + :type modified_date: datetime :param name: Name of the Dashboard. :type name: str :param owner_id: ID of the owner for a dashboard. For team-scoped dashboards, this is the unique identifier for the team associated with the dashboard. For project-scoped dashboards, this is the unique identifier for the user identity associated with the dashboard. @@ -194,7 +212,7 @@ class DashboardGroupEntry(Dashboard): :param url: :type url: str :param widgets: The set of Widgets on the dashboard. - :type widgets: list of :class:`Widget ` + :type widgets: list of :class:`Widget ` """ _attribute_map = { @@ -204,6 +222,9 @@ class DashboardGroupEntry(Dashboard): 'eTag': {'key': 'eTag', 'type': 'str'}, 'group_id': {'key': 'groupId', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, + 'last_accessed_date': {'key': 'lastAccessedDate', 'type': 'iso-8601'}, + 'modified_by': {'key': 'modifiedBy', 'type': 'str'}, + 'modified_date': {'key': 'modifiedDate', 'type': 'iso-8601'}, 'name': {'key': 'name', 'type': 'str'}, 'owner_id': {'key': 'ownerId', 'type': 'str'}, 'position': {'key': 'position', 'type': 'int'}, @@ -212,8 +233,8 @@ class DashboardGroupEntry(Dashboard): 'widgets': {'key': 'widgets', 'type': '[Widget]'}, } - def __init__(self, _links=None, dashboard_scope=None, description=None, eTag=None, group_id=None, id=None, name=None, owner_id=None, position=None, refresh_interval=None, url=None, widgets=None): - super(DashboardGroupEntry, self).__init__(_links=_links, dashboard_scope=dashboard_scope, description=description, eTag=eTag, group_id=group_id, id=id, name=name, owner_id=owner_id, position=position, refresh_interval=refresh_interval, url=url, widgets=widgets) + def __init__(self, _links=None, dashboard_scope=None, description=None, eTag=None, group_id=None, id=None, last_accessed_date=None, modified_by=None, modified_date=None, name=None, owner_id=None, position=None, refresh_interval=None, url=None, widgets=None): + super(DashboardGroupEntry, self).__init__(_links=_links, dashboard_scope=dashboard_scope, description=description, eTag=eTag, group_id=group_id, id=id, last_accessed_date=last_accessed_date, modified_by=modified_by, modified_date=modified_date, name=name, owner_id=owner_id, position=position, refresh_interval=refresh_interval, url=url, widgets=widgets) class DashboardGroupEntryResponse(DashboardGroupEntry): @@ -221,7 +242,7 @@ class DashboardGroupEntryResponse(DashboardGroupEntry): Response from RestAPI when saving and editing DashboardGroupEntry :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param dashboard_scope: Entity to which the dashboard is scoped. :type dashboard_scope: object :param description: Description of the dashboard. @@ -232,6 +253,12 @@ class DashboardGroupEntryResponse(DashboardGroupEntry): :type group_id: str :param id: ID of the Dashboard. Provided by service at creation time. :type id: str + :param last_accessed_date: Dashboard Last Accessed Date. + :type last_accessed_date: datetime + :param modified_by: Id of the person who modified Dashboard. + :type modified_by: str + :param modified_date: Dashboard's last modified date. + :type modified_date: datetime :param name: Name of the Dashboard. :type name: str :param owner_id: ID of the owner for a dashboard. For team-scoped dashboards, this is the unique identifier for the team associated with the dashboard. For project-scoped dashboards, this is the unique identifier for the user identity associated with the dashboard. @@ -243,7 +270,7 @@ class DashboardGroupEntryResponse(DashboardGroupEntry): :param url: :type url: str :param widgets: The set of Widgets on the dashboard. - :type widgets: list of :class:`Widget ` + :type widgets: list of :class:`Widget ` """ _attribute_map = { @@ -253,6 +280,9 @@ class DashboardGroupEntryResponse(DashboardGroupEntry): 'eTag': {'key': 'eTag', 'type': 'str'}, 'group_id': {'key': 'groupId', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, + 'last_accessed_date': {'key': 'lastAccessedDate', 'type': 'iso-8601'}, + 'modified_by': {'key': 'modifiedBy', 'type': 'str'}, + 'modified_date': {'key': 'modifiedDate', 'type': 'iso-8601'}, 'name': {'key': 'name', 'type': 'str'}, 'owner_id': {'key': 'ownerId', 'type': 'str'}, 'position': {'key': 'position', 'type': 'int'}, @@ -261,14 +291,14 @@ class DashboardGroupEntryResponse(DashboardGroupEntry): 'widgets': {'key': 'widgets', 'type': '[Widget]'}, } - def __init__(self, _links=None, dashboard_scope=None, description=None, eTag=None, group_id=None, id=None, name=None, owner_id=None, position=None, refresh_interval=None, url=None, widgets=None): - super(DashboardGroupEntryResponse, self).__init__(_links=_links, dashboard_scope=dashboard_scope, description=description, eTag=eTag, group_id=group_id, id=id, name=name, owner_id=owner_id, position=position, refresh_interval=refresh_interval, url=url, widgets=widgets) + def __init__(self, _links=None, dashboard_scope=None, description=None, eTag=None, group_id=None, id=None, last_accessed_date=None, modified_by=None, modified_date=None, name=None, owner_id=None, position=None, refresh_interval=None, url=None, widgets=None): + super(DashboardGroupEntryResponse, self).__init__(_links=_links, dashboard_scope=dashboard_scope, description=description, eTag=eTag, group_id=group_id, id=id, last_accessed_date=last_accessed_date, modified_by=modified_by, modified_date=modified_date, name=name, owner_id=owner_id, position=position, refresh_interval=refresh_interval, url=url, widgets=widgets) class DashboardResponse(DashboardGroupEntry): """ :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param dashboard_scope: Entity to which the dashboard is scoped. :type dashboard_scope: object :param description: Description of the dashboard. @@ -279,6 +309,12 @@ class DashboardResponse(DashboardGroupEntry): :type group_id: str :param id: ID of the Dashboard. Provided by service at creation time. :type id: str + :param last_accessed_date: Dashboard Last Accessed Date. + :type last_accessed_date: datetime + :param modified_by: Id of the person who modified Dashboard. + :type modified_by: str + :param modified_date: Dashboard's last modified date. + :type modified_date: datetime :param name: Name of the Dashboard. :type name: str :param owner_id: ID of the owner for a dashboard. For team-scoped dashboards, this is the unique identifier for the team associated with the dashboard. For project-scoped dashboards, this is the unique identifier for the user identity associated with the dashboard. @@ -290,7 +326,7 @@ class DashboardResponse(DashboardGroupEntry): :param url: :type url: str :param widgets: The set of Widgets on the dashboard. - :type widgets: list of :class:`Widget ` + :type widgets: list of :class:`Widget ` """ _attribute_map = { @@ -300,6 +336,9 @@ class DashboardResponse(DashboardGroupEntry): 'eTag': {'key': 'eTag', 'type': 'str'}, 'group_id': {'key': 'groupId', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, + 'last_accessed_date': {'key': 'lastAccessedDate', 'type': 'iso-8601'}, + 'modified_by': {'key': 'modifiedBy', 'type': 'str'}, + 'modified_date': {'key': 'modifiedDate', 'type': 'iso-8601'}, 'name': {'key': 'name', 'type': 'str'}, 'owner_id': {'key': 'ownerId', 'type': 'str'}, 'position': {'key': 'position', 'type': 'int'}, @@ -308,8 +347,8 @@ class DashboardResponse(DashboardGroupEntry): 'widgets': {'key': 'widgets', 'type': '[Widget]'}, } - def __init__(self, _links=None, dashboard_scope=None, description=None, eTag=None, group_id=None, id=None, name=None, owner_id=None, position=None, refresh_interval=None, url=None, widgets=None): - super(DashboardResponse, self).__init__(_links=_links, dashboard_scope=dashboard_scope, description=description, eTag=eTag, group_id=group_id, id=id, name=name, owner_id=owner_id, position=position, refresh_interval=refresh_interval, url=url, widgets=widgets) + def __init__(self, _links=None, dashboard_scope=None, description=None, eTag=None, group_id=None, id=None, last_accessed_date=None, modified_by=None, modified_date=None, name=None, owner_id=None, position=None, refresh_interval=None, url=None, widgets=None): + super(DashboardResponse, self).__init__(_links=_links, dashboard_scope=dashboard_scope, description=description, eTag=eTag, group_id=group_id, id=id, last_accessed_date=last_accessed_date, modified_by=modified_by, modified_date=modified_date, name=name, owner_id=owner_id, position=position, refresh_interval=refresh_interval, url=url, widgets=widgets) class LightboxOptions(Model): @@ -413,9 +452,9 @@ class Widget(Model): Widget data :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param allowed_sizes: Refers to the allowed sizes for the widget. This gets populated when user wants to configure the widget - :type allowed_sizes: list of :class:`WidgetSize ` + :type allowed_sizes: list of :class:`WidgetSize ` :param are_settings_blocked_for_user: Read-Only Property from Dashboard Service. Indicates if settings are blocked for the current user. :type are_settings_blocked_for_user: bool :param artifact_id: Refers to unique identifier of a feature artifact. Used for pinning+unpinning a specific artifact. @@ -429,7 +468,7 @@ class Widget(Model): :param contribution_id: The id of the underlying contribution defining the supplied Widget Configuration. :type contribution_id: str :param dashboard: Optional partial dashboard content, to support exchanging dashboard-level version ETag for widget-level APIs - :type dashboard: :class:`Dashboard ` + :type dashboard: :class:`Dashboard ` :param eTag: :type eTag: str :param id: @@ -439,19 +478,19 @@ class Widget(Model): :param is_name_configurable: :type is_name_configurable: bool :param lightbox_options: - :type lightbox_options: :class:`LightboxOptions ` + :type lightbox_options: :class:`LightboxOptions ` :param loading_image_url: :type loading_image_url: str :param name: :type name: str :param position: - :type position: :class:`WidgetPosition ` + :type position: :class:`WidgetPosition ` :param settings: :type settings: str :param settings_version: - :type settings_version: :class:`SemanticVersion ` + :type settings_version: :class:`SemanticVersion ` :param size: - :type size: :class:`WidgetSize ` + :type size: :class:`WidgetSize ` :param type_id: :type type_id: str :param url: @@ -514,7 +553,7 @@ class WidgetMetadata(Model): Contribution based information describing Dashboard Widgets. :param allowed_sizes: Sizes supported by the Widget. - :type allowed_sizes: list of :class:`WidgetSize ` + :type allowed_sizes: list of :class:`WidgetSize ` :param analytics_service_required: Opt-in boolean that indicates if the widget requires the Analytics Service to function. Widgets requiring the analytics service are hidden from the catalog if the Analytics Service is not available. :type analytics_service_required: bool :param catalog_icon_url: Resource for an icon in the widget catalog. @@ -544,7 +583,7 @@ class WidgetMetadata(Model): :param keywords: Keywords associated with this widget, non-filterable and invisible :type keywords: list of str :param lightbox_options: Opt-in properties for customizing widget presentation in a "lightbox" dialog. - :type lightbox_options: :class:`LightboxOptions ` + :type lightbox_options: :class:`LightboxOptions ` :param loading_image_url: Resource for a loading placeholder image on dashboard :type loading_image_url: str :param name: User facing name of the widget type. Each widget must use a unique value here. @@ -619,7 +658,7 @@ class WidgetMetadataResponse(Model): :param uri: :type uri: str :param widget_metadata: - :type widget_metadata: :class:`WidgetMetadata ` + :type widget_metadata: :class:`WidgetMetadata ` """ _attribute_map = { @@ -657,9 +696,9 @@ class WidgetResponse(Widget): Response from RestAPI when saving and editing Widget :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param allowed_sizes: Refers to the allowed sizes for the widget. This gets populated when user wants to configure the widget - :type allowed_sizes: list of :class:`WidgetSize ` + :type allowed_sizes: list of :class:`WidgetSize ` :param are_settings_blocked_for_user: Read-Only Property from Dashboard Service. Indicates if settings are blocked for the current user. :type are_settings_blocked_for_user: bool :param artifact_id: Refers to unique identifier of a feature artifact. Used for pinning+unpinning a specific artifact. @@ -673,7 +712,7 @@ class WidgetResponse(Widget): :param contribution_id: The id of the underlying contribution defining the supplied Widget Configuration. :type contribution_id: str :param dashboard: Optional partial dashboard content, to support exchanging dashboard-level version ETag for widget-level APIs - :type dashboard: :class:`Dashboard ` + :type dashboard: :class:`Dashboard ` :param eTag: :type eTag: str :param id: @@ -683,19 +722,19 @@ class WidgetResponse(Widget): :param is_name_configurable: :type is_name_configurable: bool :param lightbox_options: - :type lightbox_options: :class:`LightboxOptions ` + :type lightbox_options: :class:`LightboxOptions ` :param loading_image_url: :type loading_image_url: str :param name: :type name: str :param position: - :type position: :class:`WidgetPosition ` + :type position: :class:`WidgetPosition ` :param settings: :type settings: str :param settings_version: - :type settings_version: :class:`SemanticVersion ` + :type settings_version: :class:`SemanticVersion ` :param size: - :type size: :class:`WidgetSize ` + :type size: :class:`WidgetSize ` :param type_id: :type type_id: str :param url: @@ -757,7 +796,7 @@ class WidgetsVersionedList(Model): :param eTag: :type eTag: list of str :param widgets: - :type widgets: list of :class:`Widget ` + :type widgets: list of :class:`Widget ` """ _attribute_map = { @@ -774,11 +813,11 @@ def __init__(self, eTag=None, widgets=None): class WidgetTypesResponse(Model): """ :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param uri: :type uri: str :param widget_types: - :type widget_types: list of :class:`WidgetMetadata ` + :type widget_types: list of :class:`WidgetMetadata ` """ _attribute_map = { diff --git a/azure-devops/azure/devops/v7_0/elastic/__init__.py b/azure-devops/azure/devops/v7_2/elastic/__init__.py similarity index 100% rename from azure-devops/azure/devops/v7_0/elastic/__init__.py rename to azure-devops/azure/devops/v7_2/elastic/__init__.py diff --git a/azure-devops/azure/devops/v7_0/elastic/elastic_client.py b/azure-devops/azure/devops/v7_2/elastic/elastic_client.py similarity index 83% rename from azure-devops/azure/devops/v7_0/elastic/elastic_client.py rename to azure-devops/azure/devops/v7_2/elastic/elastic_client.py index 2cdb69f9..51ac6924 100644 --- a/azure-devops/azure/devops/v7_0/elastic/elastic_client.py +++ b/azure-devops/azure/devops/v7_2/elastic/elastic_client.py @@ -27,7 +27,7 @@ def __init__(self, base_url=None, creds=None): def get_elastic_pool_logs(self, pool_id, top=None): """GetElasticPoolLogs. - Get elastic pool diagnostics logs for a specified Elastic Pool. + [Preview API] Get elastic pool diagnostics logs for a specified Elastic Pool. :param int pool_id: Pool Id of the Elastic Pool :param int top: Number of elastic pool logs to retrieve :rtype: [ElasticPoolLog] @@ -40,20 +40,20 @@ def get_elastic_pool_logs(self, pool_id, top=None): query_parameters['$top'] = self._serialize.query('top', top, 'int') response = self._send(http_method='GET', location_id='595b1769-61d5-4076-a72a-98a02105ca9a', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[ElasticPoolLog]', self._unwrap_collection(response)) def create_elastic_pool(self, elastic_pool, pool_name, authorize_all_pipelines=None, auto_provision_project_pools=None, project_id=None): """CreateElasticPool. - Create a new elastic pool. This will create a new TaskAgentPool at the organization level. If a project id is provided, this will create a new TaskAgentQueue in the specified project. - :param :class:` ` elastic_pool: Elastic pool to create. Contains the properties necessary for configuring a new ElasticPool. + [Preview API] Create a new elastic pool. This will create a new TaskAgentPool at the organization level. If a project id is provided, this will create a new TaskAgentQueue in the specified project. + :param :class:` ` elastic_pool: Elastic pool to create. Contains the properties necessary for configuring a new ElasticPool. :param str pool_name: Name to use for the new TaskAgentPool :param bool authorize_all_pipelines: Setting to determine if all pipelines are authorized to use this TaskAgentPool by default. :param bool auto_provision_project_pools: Setting to automatically provision TaskAgentQueues in every project for the new pool. :param str project_id: Optional: If provided, a new TaskAgentQueue will be created in the specified project. - :rtype: :class:` ` + :rtype: :class:` ` """ query_parameters = {} if pool_name is not None: @@ -67,42 +67,42 @@ def create_elastic_pool(self, elastic_pool, pool_name, authorize_all_pipelines=N content = self._serialize.body(elastic_pool, 'ElasticPool') response = self._send(http_method='POST', location_id='dd3c938f-835b-4971-b99a-db75a47aad43', - version='7.0', + version='7.2-preview.1', query_parameters=query_parameters, content=content) return self._deserialize('ElasticPoolCreationResult', response) def get_elastic_pool(self, pool_id): """GetElasticPool. - Returns the Elastic Pool with the specified Pool Id. + [Preview API] Returns the Elastic Pool with the specified Pool Id. :param int pool_id: Pool Id of the associated TaskAgentPool - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if pool_id is not None: route_values['poolId'] = self._serialize.url('pool_id', pool_id, 'int') response = self._send(http_method='GET', location_id='dd3c938f-835b-4971-b99a-db75a47aad43', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('ElasticPool', response) def get_elastic_pools(self): """GetElasticPools. - Get a list of all Elastic Pools. + [Preview API] Get a list of all Elastic Pools. :rtype: [ElasticPool] """ response = self._send(http_method='GET', location_id='dd3c938f-835b-4971-b99a-db75a47aad43', - version='7.0') + version='7.2-preview.1') return self._deserialize('[ElasticPool]', self._unwrap_collection(response)) def update_elastic_pool(self, elastic_pool_settings, pool_id): """UpdateElasticPool. - Update settings on a specified Elastic Pool. - :param :class:` ` elastic_pool_settings: New Elastic Pool settings data + [Preview API] Update settings on a specified Elastic Pool. + :param :class:` ` elastic_pool_settings: New Elastic Pool settings data :param int pool_id: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if pool_id is not None: @@ -110,14 +110,14 @@ def update_elastic_pool(self, elastic_pool_settings, pool_id): content = self._serialize.body(elastic_pool_settings, 'ElasticPoolSettings') response = self._send(http_method='PATCH', location_id='dd3c938f-835b-4971-b99a-db75a47aad43', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('ElasticPool', response) def get_elastic_nodes(self, pool_id, state=None): """GetElasticNodes. - Get a list of ElasticNodes currently in the ElasticPool + [Preview API] Get a list of ElasticNodes currently in the ElasticPool :param int pool_id: Pool id of the ElasticPool :param str state: Optional: Filter to only retrieve ElasticNodes in the given ElasticNodeState :rtype: [ElasticNode] @@ -130,18 +130,18 @@ def get_elastic_nodes(self, pool_id, state=None): query_parameters['$state'] = self._serialize.query('state', state, 'str') response = self._send(http_method='GET', location_id='1b232402-5ff0-42ad-9703-d76497835eb6', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[ElasticNode]', self._unwrap_collection(response)) def update_elastic_node(self, elastic_node_settings, pool_id, elastic_node_id): """UpdateElasticNode. - Update properties on a specified ElasticNode - :param :class:` ` elastic_node_settings: + [Preview API] Update properties on a specified ElasticNode + :param :class:` ` elastic_node_settings: :param int pool_id: :param int elastic_node_id: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if pool_id is not None: @@ -151,7 +151,7 @@ def update_elastic_node(self, elastic_node_settings, pool_id, elastic_node_id): content = self._serialize.body(elastic_node_settings, 'ElasticNodeSettings') response = self._send(http_method='PATCH', location_id='1b232402-5ff0-42ad-9703-d76497835eb6', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('ElasticNode', response) diff --git a/azure-devops/azure/devops/v7_0/elastic/models.py b/azure-devops/azure/devops/v7_2/elastic/models.py similarity index 93% rename from azure-devops/azure/devops/v7_0/elastic/models.py rename to azure-devops/azure/devops/v7_2/elastic/models.py index a9d722b6..5b7e90fc 100644 --- a/azure-devops/azure/devops/v7_0/elastic/models.py +++ b/azure-devops/azure/devops/v7_2/elastic/models.py @@ -101,6 +101,8 @@ class ElasticPool(Model): :type max_saved_node_count: int :param offline_since: Timestamp the pool was first detected to be offline :type offline_since: datetime + :param orchestration_type: Operating system type of the nodes in the pool + :type orchestration_type: object :param os_type: Operating system type of the nodes in the pool :type os_type: object :param pool_id: Id of the associated TaskAgentPool @@ -127,6 +129,7 @@ class ElasticPool(Model): 'max_capacity': {'key': 'maxCapacity', 'type': 'int'}, 'max_saved_node_count': {'key': 'maxSavedNodeCount', 'type': 'int'}, 'offline_since': {'key': 'offlineSince', 'type': 'iso-8601'}, + 'orchestration_type': {'key': 'orchestrationType', 'type': 'object'}, 'os_type': {'key': 'osType', 'type': 'object'}, 'pool_id': {'key': 'poolId', 'type': 'int'}, 'recycle_after_each_use': {'key': 'recycleAfterEachUse', 'type': 'bool'}, @@ -137,7 +140,7 @@ class ElasticPool(Model): 'time_to_live_minutes': {'key': 'timeToLiveMinutes', 'type': 'int'} } - def __init__(self, agent_interactive_uI=None, azure_id=None, desired_idle=None, desired_size=None, max_capacity=None, max_saved_node_count=None, offline_since=None, os_type=None, pool_id=None, recycle_after_each_use=None, service_endpoint_id=None, service_endpoint_scope=None, sizing_attempts=None, state=None, time_to_live_minutes=None): + def __init__(self, agent_interactive_uI=None, azure_id=None, desired_idle=None, desired_size=None, max_capacity=None, max_saved_node_count=None, offline_since=None, orchestration_type=None, os_type=None, pool_id=None, recycle_after_each_use=None, service_endpoint_id=None, service_endpoint_scope=None, sizing_attempts=None, state=None, time_to_live_minutes=None): super(ElasticPool, self).__init__() self.agent_interactive_uI = agent_interactive_uI self.azure_id = azure_id @@ -146,6 +149,7 @@ def __init__(self, agent_interactive_uI=None, azure_id=None, desired_idle=None, self.max_capacity = max_capacity self.max_saved_node_count = max_saved_node_count self.offline_since = offline_since + self.orchestration_type = orchestration_type self.os_type = os_type self.pool_id = pool_id self.recycle_after_each_use = recycle_after_each_use @@ -161,11 +165,11 @@ class ElasticPoolCreationResult(Model): Returned result from creating a new elastic pool :param agent_pool: Created agent pool - :type agent_pool: :class:`TaskAgentPool ` + :type agent_pool: :class:`TaskAgentPool ` :param agent_queue: Created agent queue - :type agent_queue: :class:`TaskAgentQueue ` + :type agent_queue: :class:`TaskAgentQueue ` :param elastic_pool: Created elastic pool - :type elastic_pool: :class:`ElasticPool ` + :type elastic_pool: :class:`ElasticPool ` """ _attribute_map = { @@ -232,6 +236,8 @@ class ElasticPoolSettings(Model): :type max_capacity: int :param max_saved_node_count: Keep machines in the pool on failure for investigation :type max_saved_node_count: int + :param orchestration_type: Operating system type of the machines in the pool + :type orchestration_type: object :param os_type: Operating system type of the machines in the pool :type os_type: object :param recycle_after_each_use: Discard machines after each job completes @@ -250,6 +256,7 @@ class ElasticPoolSettings(Model): 'desired_idle': {'key': 'desiredIdle', 'type': 'int'}, 'max_capacity': {'key': 'maxCapacity', 'type': 'int'}, 'max_saved_node_count': {'key': 'maxSavedNodeCount', 'type': 'int'}, + 'orchestration_type': {'key': 'orchestrationType', 'type': 'object'}, 'os_type': {'key': 'osType', 'type': 'object'}, 'recycle_after_each_use': {'key': 'recycleAfterEachUse', 'type': 'bool'}, 'service_endpoint_id': {'key': 'serviceEndpointId', 'type': 'str'}, @@ -257,13 +264,14 @@ class ElasticPoolSettings(Model): 'time_to_live_minutes': {'key': 'timeToLiveMinutes', 'type': 'int'} } - def __init__(self, agent_interactive_uI=None, azure_id=None, desired_idle=None, max_capacity=None, max_saved_node_count=None, os_type=None, recycle_after_each_use=None, service_endpoint_id=None, service_endpoint_scope=None, time_to_live_minutes=None): + def __init__(self, agent_interactive_uI=None, azure_id=None, desired_idle=None, max_capacity=None, max_saved_node_count=None, orchestration_type=None, os_type=None, recycle_after_each_use=None, service_endpoint_id=None, service_endpoint_scope=None, time_to_live_minutes=None): super(ElasticPoolSettings, self).__init__() self.agent_interactive_uI = agent_interactive_uI self.azure_id = azure_id self.desired_idle = desired_idle self.max_capacity = max_capacity self.max_saved_node_count = max_saved_node_count + self.orchestration_type = orchestration_type self.os_type = os_type self.recycle_after_each_use = recycle_after_each_use self.service_endpoint_id = service_endpoint_id @@ -274,7 +282,7 @@ def __init__(self, agent_interactive_uI=None, azure_id=None, desired_idle=None, class GraphSubjectBase(Model): """ :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. :type descriptor: str :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. @@ -301,7 +309,7 @@ def __init__(self, _links=None, descriptor=None, display_name=None, url=None): class IdentityRef(GraphSubjectBase): """ :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. :type descriptor: str :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. @@ -426,7 +434,7 @@ class TaskAgentQueue(Model): :param name: Name of the queue :type name: str :param pool: Pool reference for this queue - :type pool: :class:`TaskAgentPoolReference ` + :type pool: :class:`TaskAgentPoolReference ` :param project_id: Project ID :type project_id: str """ @@ -475,14 +483,14 @@ class TaskAgentPool(TaskAgentPoolReference): :param auto_update: Whether or not agents in this pool are allowed to automatically update :type auto_update: bool :param created_by: Creator of the pool. The creator of the pool is automatically added into the administrators group for the pool on creation. - :type created_by: :class:`IdentityRef ` + :type created_by: :class:`IdentityRef ` :param created_on: The date/time of the pool creation. :type created_on: datetime :param owner: Owner or administrator of the pool. - :type owner: :class:`IdentityRef ` + :type owner: :class:`IdentityRef ` :param properties: - :type properties: :class:`object ` - :param target_size: Target parallelism. + :type properties: :class:`object ` + :param target_size: Target parallelism - Only applies to agent pools that are backed by pool providers. It will be null for regular pools. :type target_size: int """ diff --git a/azure-devops/azure/devops/v7_0/extension_management/__init__.py b/azure-devops/azure/devops/v7_2/extension_management/__init__.py similarity index 100% rename from azure-devops/azure/devops/v7_0/extension_management/__init__.py rename to azure-devops/azure/devops/v7_2/extension_management/__init__.py diff --git a/azure-devops/azure/devops/v7_0/extension_management/extension_management_client.py b/azure-devops/azure/devops/v7_2/extension_management/extension_management_client.py similarity index 93% rename from azure-devops/azure/devops/v7_0/extension_management/extension_management_client.py rename to azure-devops/azure/devops/v7_2/extension_management/extension_management_client.py index c001326f..beee2238 100644 --- a/azure-devops/azure/devops/v7_0/extension_management/extension_management_client.py +++ b/azure-devops/azure/devops/v7_2/extension_management/extension_management_client.py @@ -46,20 +46,20 @@ def get_installed_extensions(self, include_disabled_extensions=None, include_err query_parameters['includeInstallationIssues'] = self._serialize.query('include_installation_issues', include_installation_issues, 'bool') response = self._send(http_method='GET', location_id='275424d0-c844-4fe2-bda6-04933a1357d8', - version='7.0-preview.1', + version='7.2-preview.1', query_parameters=query_parameters) return self._deserialize('[InstalledExtension]', self._unwrap_collection(response)) def update_installed_extension(self, extension): """UpdateInstalledExtension. [Preview API] Update an installed extension. Typically this API is used to enable or disable an extension. - :param :class:` ` extension: - :rtype: :class:` ` + :param :class:` ` extension: + :rtype: :class:` ` """ content = self._serialize.body(extension, 'InstalledExtension') response = self._send(http_method='PATCH', location_id='275424d0-c844-4fe2-bda6-04933a1357d8', - version='7.0-preview.1', + version='7.2-preview.1', content=content) return self._deserialize('InstalledExtension', response) @@ -69,7 +69,7 @@ def get_installed_extension_by_name(self, publisher_name, extension_name, asset_ :param str publisher_name: Name of the publisher. Example: "fabrikam". :param str extension_name: Name of the extension. Example: "ops-tools". :param [str] asset_types: Determines which files are returned in the files array. Provide the wildcard '*' to return all files, or a colon separated list to retrieve files with specific asset types. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if publisher_name is not None: @@ -82,7 +82,7 @@ def get_installed_extension_by_name(self, publisher_name, extension_name, asset_ query_parameters['assetTypes'] = self._serialize.query('asset_types', asset_types, 'str') response = self._send(http_method='GET', location_id='fb0da285-f23e-4b56-8b53-3ef5f9f6de66', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('InstalledExtension', response) @@ -93,7 +93,7 @@ def install_extension_by_name(self, publisher_name, extension_name, version=None :param str publisher_name: Name of the publisher. Example: "fabrikam". :param str extension_name: Name of the extension. Example: "ops-tools". :param str version: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if publisher_name is not None: @@ -104,7 +104,7 @@ def install_extension_by_name(self, publisher_name, extension_name, version=None route_values['version'] = self._serialize.url('version', version, 'str') response = self._send(http_method='POST', location_id='fb0da285-f23e-4b56-8b53-3ef5f9f6de66', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) return self._deserialize('InstalledExtension', response) @@ -128,7 +128,7 @@ def uninstall_extension_by_name(self, publisher_name, extension_name, reason=Non query_parameters['reasonCode'] = self._serialize.query('reason_code', reason_code, 'str') self._send(http_method='DELETE', location_id='fb0da285-f23e-4b56-8b53-3ef5f9f6de66', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) diff --git a/azure-devops/azure/devops/v7_0/extension_management/models.py b/azure-devops/azure/devops/v7_2/extension_management/models.py similarity index 95% rename from azure-devops/azure/devops/v7_0/extension_management/models.py rename to azure-devops/azure/devops/v7_2/extension_management/models.py index 878073ff..a89e3236 100644 --- a/azure-devops/azure/devops/v7_0/extension_management/models.py +++ b/azure-devops/azure/devops/v7_2/extension_management/models.py @@ -11,14 +11,14 @@ class AcquisitionOperation(Model): """ - :param operation_state: State of the the AcquisitionOperation for the current user + :param operation_state: State of the AcquisitionOperation for the current user :type operation_state: object :param operation_type: AcquisitionOperationType: install, request, buy, etc... :type operation_type: object :param reason: Optional reason to justify current state. Typically used with Disallow state. :type reason: str :param reasons: List of reasons indicating why the operation is not allowed. - :type reasons: list of :class:`AcquisitionOperationDisallowReason ` + :type reasons: list of :class:`AcquisitionOperationDisallowReason ` """ _attribute_map = { @@ -60,13 +60,13 @@ class AcquisitionOptions(Model): Market item acquisition options (install, buy, etc) for an installation target. :param default_operation: Default Operation for the ItemId in this target - :type default_operation: :class:`AcquisitionOperation ` + :type default_operation: :class:`AcquisitionOperation ` :param item_id: The item id that this options refer to :type item_id: str :param operations: Operations allowed for the ItemId in this target - :type operations: list of :class:`AcquisitionOperation ` + :type operations: list of :class:`AcquisitionOperation ` :param properties: Additional properties which can be added to the request. - :type properties: :class:`object ` + :type properties: :class:`object ` :param target: The target that this options refer to :type target: str """ @@ -126,7 +126,7 @@ class ContributionConstraint(Model): :param name: Name of the IContributionFilter plugin :type name: str :param properties: Properties that are fed to the contribution filter class - :type properties: :class:`object ` + :type properties: :class:`object ` :param relationships: Constraints can be optionally be applied to one or more of the relationships defined in the contribution. If no relationships are defined then all relationships are associated with the constraint. This means the default behaviour will eliminate the contribution from the tree completely if the constraint is applied. :type relationships: list of str """ @@ -226,7 +226,7 @@ class ExtensionAcquisitionRequest(Model): :param operation_type: The type of operation, such as install, request, purchase :type operation_type: object :param properties: Additional properties which can be added to the request. - :type properties: :class:`object ` + :type properties: :class:`object ` :param quantity: How many licenses should be purchased :type quantity: int """ @@ -255,7 +255,7 @@ class ExtensionAuditLog(Model): Audit log for an extension :param entries: Collection of audit log entries - :type entries: list of :class:`ExtensionAuditLogEntry ` + :type entries: list of :class:`ExtensionAuditLogEntry ` :param extension_name: Extension that the change was made for :type extension_name: str :param publisher_name: Publisher that the extension is part of @@ -286,7 +286,7 @@ class ExtensionAuditLogEntry(Model): :param comment: Extra information about the change :type comment: str :param updated_by: Represents the user who made the change - :type updated_by: :class:`IdentityRef ` + :type updated_by: :class:`IdentityRef ` """ _attribute_map = { @@ -353,7 +353,7 @@ class ExtensionDataCollection(Model): :param collection_name: The name of the collection :type collection_name: str :param documents: A list of documents belonging to the collection - :type documents: list of :class:`object ` + :type documents: list of :class:`object ` :param scope_type: The type of the collection's scope, such as Default or User :type scope_type: str :param scope_value: The value of the collection's scope, such as Current or Me @@ -380,7 +380,7 @@ class ExtensionDataCollectionQuery(Model): Represents a query to receive a set of extension data collections :param collections: A list of collections to query - :type collections: list of :class:`ExtensionDataCollection ` + :type collections: list of :class:`ExtensionDataCollection ` """ _attribute_map = { @@ -414,19 +414,19 @@ class ExtensionEventCallbackCollection(Model): Collection of event callbacks - endpoints called when particular extension events occur. :param post_disable: Optional. Defines an endpoint that gets called via a POST request to notify that an extension disable has occurred. - :type post_disable: :class:`ExtensionEventCallback ` + :type post_disable: :class:`ExtensionEventCallback ` :param post_enable: Optional. Defines an endpoint that gets called via a POST request to notify that an extension enable has occurred. - :type post_enable: :class:`ExtensionEventCallback ` + :type post_enable: :class:`ExtensionEventCallback ` :param post_install: Optional. Defines an endpoint that gets called via a POST request to notify that an extension install has completed. - :type post_install: :class:`ExtensionEventCallback ` + :type post_install: :class:`ExtensionEventCallback ` :param post_uninstall: Optional. Defines an endpoint that gets called via a POST request to notify that an extension uninstall has occurred. - :type post_uninstall: :class:`ExtensionEventCallback ` + :type post_uninstall: :class:`ExtensionEventCallback ` :param post_update: Optional. Defines an endpoint that gets called via a POST request to notify that an extension update has occurred. - :type post_update: :class:`ExtensionEventCallback ` + :type post_update: :class:`ExtensionEventCallback ` :param pre_install: Optional. Defines an endpoint that gets called via a POST request to notify that an extension install is about to occur. Response indicates whether to proceed or abort. - :type pre_install: :class:`ExtensionEventCallback ` + :type pre_install: :class:`ExtensionEventCallback ` :param version_check: For multi-version extensions, defines an endpoint that gets called via an OPTIONS request to determine the particular version of the extension to be used - :type version_check: :class:`ExtensionEventCallback ` + :type version_check: :class:`ExtensionEventCallback ` """ _attribute_map = { @@ -499,7 +499,7 @@ class ExtensionLicensing(Model): How an extension should handle including contributions based on licensing :param overrides: A list of contributions which deviate from the default licensing behavior - :type overrides: list of :class:`LicensingOverride ` + :type overrides: list of :class:`LicensingOverride ` """ _attribute_map = { @@ -518,21 +518,21 @@ class ExtensionManifest(Model): :param base_uri: Uri used as base for other relative uri's defined in extension :type base_uri: str :param constraints: List of shared constraints defined by this extension - :type constraints: list of :class:`ContributionConstraint ` + :type constraints: list of :class:`ContributionConstraint ` :param contributions: List of contributions made by this extension - :type contributions: list of :class:`Contribution ` + :type contributions: list of :class:`Contribution ` :param contribution_types: List of contribution types defined by this extension - :type contribution_types: list of :class:`ContributionType ` + :type contribution_types: list of :class:`ContributionType ` :param demands: List of explicit demands required by this extension :type demands: list of str :param event_callbacks: Collection of endpoints that get called when particular extension events occur - :type event_callbacks: :class:`ExtensionEventCallbackCollection ` + :type event_callbacks: :class:`ExtensionEventCallbackCollection ` :param fallback_base_uri: Secondary location that can be used as base for other relative uri's defined in extension :type fallback_base_uri: str :param language: Language Culture Name set by the Gallery :type language: str :param licensing: How this extension behaves with respect to licensing - :type licensing: :class:`ExtensionLicensing ` + :type licensing: :class:`ExtensionLicensing ` :param manifest_version: Version of the extension manifest format/content :type manifest_version: float :param restricted_to: Default user claims applied to all contributions (except the ones which have been specified restrictedTo explicitly) to control the visibility of a contribution. @@ -606,7 +606,7 @@ class ExtensionRequest(Model): :param request_date: Date at which the request was made :type request_date: datetime :param requested_by: Represents the user who made the request - :type requested_by: :class:`IdentityRef ` + :type requested_by: :class:`IdentityRef ` :param request_message: Optional message supplied by the requester justifying the request :type request_message: str :param request_state: Represents the state of the request @@ -614,7 +614,7 @@ class ExtensionRequest(Model): :param resolve_date: Date at which the request was resolved :type resolve_date: datetime :param resolved_by: Represents the user who resolved the request - :type resolved_by: :class:`IdentityRef ` + :type resolved_by: :class:`IdentityRef ` """ _attribute_map = { @@ -689,11 +689,11 @@ class ExtensionVersion(Model): :param asset_uri: :type asset_uri: str :param badges: - :type badges: list of :class:`ExtensionBadge ` + :type badges: list of :class:`ExtensionBadge ` :param fallback_asset_uri: :type fallback_asset_uri: str :param files: - :type files: list of :class:`ExtensionFile ` + :type files: list of :class:`ExtensionFile ` :param flags: :type flags: object :param last_updated: @@ -742,7 +742,7 @@ def __init__(self, asset_uri=None, badges=None, fallback_asset_uri=None, files=N class GraphSubjectBase(Model): """ :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. :type descriptor: str :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. @@ -769,7 +769,7 @@ def __init__(self, _links=None, descriptor=None, display_name=None, url=None): class IdentityRef(GraphSubjectBase): """ :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. :type descriptor: str :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. @@ -863,21 +863,21 @@ class InstalledExtension(ExtensionManifest): :param base_uri: Uri used as base for other relative uri's defined in extension :type base_uri: str :param constraints: List of shared constraints defined by this extension - :type constraints: list of :class:`ContributionConstraint ` + :type constraints: list of :class:`ContributionConstraint ` :param contributions: List of contributions made by this extension - :type contributions: list of :class:`Contribution ` + :type contributions: list of :class:`Contribution ` :param contribution_types: List of contribution types defined by this extension - :type contribution_types: list of :class:`ContributionType ` + :type contribution_types: list of :class:`ContributionType ` :param demands: List of explicit demands required by this extension :type demands: list of str :param event_callbacks: Collection of endpoints that get called when particular extension events occur - :type event_callbacks: :class:`ExtensionEventCallbackCollection ` + :type event_callbacks: :class:`ExtensionEventCallbackCollection ` :param fallback_base_uri: Secondary location that can be used as base for other relative uri's defined in extension :type fallback_base_uri: str :param language: Language Culture Name set by the Gallery :type language: str :param licensing: How this extension behaves with respect to licensing - :type licensing: :class:`ExtensionLicensing ` + :type licensing: :class:`ExtensionLicensing ` :param manifest_version: Version of the extension manifest format/content :type manifest_version: float :param restricted_to: Default user claims applied to all contributions (except the ones which have been specified restrictedTo explicitly) to control the visibility of a contribution. @@ -891,11 +891,11 @@ class InstalledExtension(ExtensionManifest): :param extension_name: The display name of the extension. :type extension_name: str :param files: This is the set of files available from the extension. - :type files: list of :class:`ExtensionFile ` + :type files: list of :class:`ExtensionFile ` :param flags: Extension flags relevant to contribution consumers :type flags: object :param install_state: Information about this particular installation of the extension - :type install_state: :class:`InstalledExtensionState ` + :type install_state: :class:`InstalledExtensionState ` :param last_published: This represents the date/time the extensions was last updated in the gallery. This doesnt mean this version was updated the value represents changes to any and all versions of the extension. :type last_published: datetime :param publisher_id: Unique id of the publisher of this extension @@ -953,7 +953,7 @@ class InstalledExtensionQuery(Model): :param asset_types: :type asset_types: list of str :param monikers: - :type monikers: list of :class:`ExtensionIdentifier ` + :type monikers: list of :class:`ExtensionIdentifier ` """ _attribute_map = { @@ -974,7 +974,7 @@ class InstalledExtensionState(Model): :param flags: States of an installed extension :type flags: object :param installation_issues: List of installation issues - :type installation_issues: list of :class:`InstalledExtensionStateIssue ` + :type installation_issues: list of :class:`InstalledExtensionStateIssue ` :param last_updated: The time at which this installation was last updated :type last_updated: datetime """ @@ -1053,7 +1053,7 @@ class PublishedExtension(Model): :param flags: :type flags: object :param installation_targets: - :type installation_targets: list of :class:`InstallationTarget ` + :type installation_targets: list of :class:`InstallationTarget ` :param last_updated: :type last_updated: datetime :param long_description: @@ -1063,19 +1063,19 @@ class PublishedExtension(Model): :param published_date: Date on which the extension was first uploaded. :type published_date: datetime :param publisher: - :type publisher: :class:`PublisherFacts ` + :type publisher: :class:`PublisherFacts ` :param release_date: Date on which the extension first went public. :type release_date: datetime :param shared_with: - :type shared_with: list of :class:`ExtensionShare ` + :type shared_with: list of :class:`ExtensionShare ` :param short_description: :type short_description: str :param statistics: - :type statistics: list of :class:`ExtensionStatistic ` + :type statistics: list of :class:`ExtensionStatistic ` :param tags: :type tags: list of str :param versions: - :type versions: list of :class:`ExtensionVersion ` + :type versions: list of :class:`ExtensionVersion ` """ _attribute_map = { @@ -1182,7 +1182,7 @@ class RequestedExtension(Model): :param extension_name: The unique name of the extension :type extension_name: str :param extension_requests: A list of each request for the extension - :type extension_requests: list of :class:`ExtensionRequest ` + :type extension_requests: list of :class:`ExtensionRequest ` :param publisher_display_name: DisplayName of the publisher that owns the extension being published. :type publisher_display_name: str :param publisher_name: Represents the Publisher of the requested extension @@ -1215,7 +1215,7 @@ class UserExtensionPolicy(Model): :param display_name: User display name that this policy refers to :type display_name: str :param permissions: The extension policy applied to the user - :type permissions: :class:`ExtensionPolicy ` + :type permissions: :class:`ExtensionPolicy ` :param user_id: User id that this policy refers to :type user_id: str """ @@ -1244,11 +1244,11 @@ class Contribution(ContributionBase): :param visible_to: VisibleTo can be used to restrict whom can reference a given contribution/type. This value should be a list of publishers or extensions access is restricted too. Examples: "ms" - Means only the "ms" publisher can reference this. "ms.vss-web" - Means only the "vss-web" extension from the "ms" publisher can reference this. :type visible_to: list of str :param constraints: List of constraints (filters) that should be applied to the availability of this contribution - :type constraints: list of :class:`ContributionConstraint ` + :type constraints: list of :class:`ContributionConstraint ` :param includes: Includes is a set of contributions that should have this contribution included in their targets list. :type includes: list of str :param properties: Properties/attributes of this contribution - :type properties: :class:`object ` + :type properties: :class:`object ` :param restricted_to: List of demanded claims in order for the user to see this contribution (like anonymous, public, member...). :type restricted_to: list of str :param targets: The ids of the contribution(s) that this contribution targets. (parent contributions) @@ -1286,7 +1286,7 @@ class ExtensionState(InstalledExtensionState): :param flags: States of an installed extension :type flags: object :param installation_issues: List of installation issues - :type installation_issues: list of :class:`InstalledExtensionStateIssue ` + :type installation_issues: list of :class:`InstalledExtensionStateIssue ` :param last_updated: The time at which this installation was last updated :type last_updated: datetime :param extension_name: diff --git a/azure-devops/azure/devops/v7_0/feature_availability/__init__.py b/azure-devops/azure/devops/v7_2/feature_availability/__init__.py similarity index 100% rename from azure-devops/azure/devops/v7_0/feature_availability/__init__.py rename to azure-devops/azure/devops/v7_2/feature_availability/__init__.py diff --git a/azure-devops/azure/devops/v7_0/feature_availability/feature_availability_client.py b/azure-devops/azure/devops/v7_2/feature_availability/feature_availability_client.py similarity index 92% rename from azure-devops/azure/devops/v7_0/feature_availability/feature_availability_client.py rename to azure-devops/azure/devops/v7_2/feature_availability/feature_availability_client.py index 27493317..731aa575 100644 --- a/azure-devops/azure/devops/v7_0/feature_availability/feature_availability_client.py +++ b/azure-devops/azure/devops/v7_2/feature_availability/feature_availability_client.py @@ -36,7 +36,7 @@ def get_all_feature_flags(self, user_email=None): query_parameters['userEmail'] = self._serialize.query('user_email', user_email, 'str') response = self._send(http_method='GET', location_id='3e2b80f8-9e6f-441e-8393-005610692d9c', - version='7.0-preview.1', + version='7.2-preview.1', query_parameters=query_parameters) return self._deserialize('[FeatureFlag]', self._unwrap_collection(response)) @@ -45,7 +45,7 @@ def get_feature_flag_by_name(self, name, check_feature_exists=None): [Preview API] Retrieve information on a single feature flag and its current states :param str name: The name of the feature to retrieve :param bool check_feature_exists: Check if feature exists - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if name is not None: @@ -55,7 +55,7 @@ def get_feature_flag_by_name(self, name, check_feature_exists=None): query_parameters['checkFeatureExists'] = self._serialize.query('check_feature_exists', check_feature_exists, 'bool') response = self._send(http_method='GET', location_id='3e2b80f8-9e6f-441e-8393-005610692d9c', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('FeatureFlag', response) @@ -66,7 +66,7 @@ def get_feature_flag_by_name_and_user_email(self, name, user_email, check_featur :param str name: The name of the feature to retrieve :param str user_email: The email of the user to check :param bool check_feature_exists: Check if feature exists - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if name is not None: @@ -78,7 +78,7 @@ def get_feature_flag_by_name_and_user_email(self, name, user_email, check_featur query_parameters['checkFeatureExists'] = self._serialize.query('check_feature_exists', check_feature_exists, 'bool') response = self._send(http_method='GET', location_id='3e2b80f8-9e6f-441e-8393-005610692d9c', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('FeatureFlag', response) @@ -89,7 +89,7 @@ def get_feature_flag_by_name_and_user_id(self, name, user_id, check_feature_exis :param str name: The name of the feature to retrieve :param str user_id: The id of the user to check :param bool check_feature_exists: Check if feature exists - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if name is not None: @@ -101,7 +101,7 @@ def get_feature_flag_by_name_and_user_id(self, name, user_id, check_feature_exis query_parameters['checkFeatureExists'] = self._serialize.query('check_feature_exists', check_feature_exists, 'bool') response = self._send(http_method='GET', location_id='3e2b80f8-9e6f-441e-8393-005610692d9c', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('FeatureFlag', response) @@ -109,12 +109,12 @@ def get_feature_flag_by_name_and_user_id(self, name, user_id, check_feature_exis def update_feature_flag(self, state, name, user_email=None, check_feature_exists=None, set_at_application_level_also=None): """UpdateFeatureFlag. [Preview API] Change the state of an individual feature flag for a name - :param :class:` ` state: State that should be set + :param :class:` ` state: State that should be set :param str name: The name of the feature to change :param str user_email: :param bool check_feature_exists: Checks if the feature exists before setting the state :param bool set_at_application_level_also: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if name is not None: @@ -129,7 +129,7 @@ def update_feature_flag(self, state, name, user_email=None, check_feature_exists content = self._serialize.body(state, 'FeatureFlagPatch') response = self._send(http_method='PATCH', location_id='3e2b80f8-9e6f-441e-8393-005610692d9c', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters, content=content) diff --git a/azure-devops/azure/devops/v7_0/feature_availability/models.py b/azure-devops/azure/devops/v7_2/feature_availability/models.py similarity index 100% rename from azure-devops/azure/devops/v7_0/feature_availability/models.py rename to azure-devops/azure/devops/v7_2/feature_availability/models.py diff --git a/azure-devops/azure/devops/v7_0/feature_management/__init__.py b/azure-devops/azure/devops/v7_2/feature_management/__init__.py similarity index 100% rename from azure-devops/azure/devops/v7_0/feature_management/__init__.py rename to azure-devops/azure/devops/v7_2/feature_management/__init__.py diff --git a/azure-devops/azure/devops/v7_0/feature_management/feature_management_client.py b/azure-devops/azure/devops/v7_2/feature_management/feature_management_client.py similarity index 90% rename from azure-devops/azure/devops/v7_0/feature_management/feature_management_client.py rename to azure-devops/azure/devops/v7_2/feature_management/feature_management_client.py index 6035b09d..79b16a4f 100644 --- a/azure-devops/azure/devops/v7_0/feature_management/feature_management_client.py +++ b/azure-devops/azure/devops/v7_2/feature_management/feature_management_client.py @@ -29,14 +29,14 @@ def get_feature(self, feature_id): """GetFeature. [Preview API] Get a specific feature by its id :param str feature_id: The contribution id of the feature - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if feature_id is not None: route_values['featureId'] = self._serialize.url('feature_id', feature_id, 'str') response = self._send(http_method='GET', location_id='c4209f25-7a27-41dd-9f04-06080c7b6afd', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) return self._deserialize('ContributedFeature', response) @@ -51,7 +51,7 @@ def get_features(self, target_contribution_id=None): query_parameters['targetContributionId'] = self._serialize.query('target_contribution_id', target_contribution_id, 'str') response = self._send(http_method='GET', location_id='c4209f25-7a27-41dd-9f04-06080c7b6afd', - version='7.0-preview.1', + version='7.2-preview.1', query_parameters=query_parameters) return self._deserialize('[ContributedFeature]', self._unwrap_collection(response)) @@ -60,7 +60,7 @@ def get_feature_state(self, feature_id, user_scope): [Preview API] Get the state of the specified feature for the given user/all-users scope :param str feature_id: Contribution id of the feature :param str user_scope: User-Scope at which to get the value. Should be "me" for the current user or "host" for all users. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if feature_id is not None: @@ -69,19 +69,19 @@ def get_feature_state(self, feature_id, user_scope): route_values['userScope'] = self._serialize.url('user_scope', user_scope, 'str') response = self._send(http_method='GET', location_id='98911314-3f9b-4eaf-80e8-83900d8e85d9', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) return self._deserialize('ContributedFeatureState', response) def set_feature_state(self, feature, feature_id, user_scope, reason=None, reason_code=None): """SetFeatureState. [Preview API] Set the state of a feature - :param :class:` ` feature: Posted feature state object. Should specify the effective value. + :param :class:` ` feature: Posted feature state object. Should specify the effective value. :param str feature_id: Contribution id of the feature :param str user_scope: User-Scope at which to set the value. Should be "me" for the current user or "host" for all users. :param str reason: Reason for changing the state :param str reason_code: Short reason code - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if feature_id is not None: @@ -96,7 +96,7 @@ def set_feature_state(self, feature, feature_id, user_scope, reason=None, reason content = self._serialize.body(feature, 'ContributedFeatureState') response = self._send(http_method='PATCH', location_id='98911314-3f9b-4eaf-80e8-83900d8e85d9', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters, content=content) @@ -109,7 +109,7 @@ def get_feature_state_for_scope(self, feature_id, user_scope, scope_name, scope_ :param str user_scope: User-Scope at which to get the value. Should be "me" for the current user or "host" for all users. :param str scope_name: Scope at which to get the feature setting for (e.g. "project" or "team") :param str scope_value: Value of the scope (e.g. the project or team id) - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if feature_id is not None: @@ -122,21 +122,21 @@ def get_feature_state_for_scope(self, feature_id, user_scope, scope_name, scope_ route_values['scopeValue'] = self._serialize.url('scope_value', scope_value, 'str') response = self._send(http_method='GET', location_id='dd291e43-aa9f-4cee-8465-a93c78e414a4', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) return self._deserialize('ContributedFeatureState', response) def set_feature_state_for_scope(self, feature, feature_id, user_scope, scope_name, scope_value, reason=None, reason_code=None): """SetFeatureStateForScope. [Preview API] Set the state of a feature at a specific scope - :param :class:` ` feature: Posted feature state object. Should specify the effective value. + :param :class:` ` feature: Posted feature state object. Should specify the effective value. :param str feature_id: Contribution id of the feature :param str user_scope: User-Scope at which to set the value. Should be "me" for the current user or "host" for all users. :param str scope_name: Scope at which to get the feature setting for (e.g. "project" or "team") :param str scope_value: Value of the scope (e.g. the project or team id) :param str reason: Reason for changing the state :param str reason_code: Short reason code - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if feature_id is not None: @@ -155,7 +155,7 @@ def set_feature_state_for_scope(self, feature, feature_id, user_scope, scope_nam content = self._serialize.body(feature, 'ContributedFeatureState') response = self._send(http_method='PATCH', location_id='dd291e43-aa9f-4cee-8465-a93c78e414a4', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters, content=content) @@ -164,22 +164,22 @@ def set_feature_state_for_scope(self, feature, feature_id, user_scope, scope_nam def query_feature_states(self, query): """QueryFeatureStates. [Preview API] Get the effective state for a list of feature ids - :param :class:` ` query: Features to query along with current scope values - :rtype: :class:` ` + :param :class:` ` query: Features to query along with current scope values + :rtype: :class:` ` """ content = self._serialize.body(query, 'ContributedFeatureStateQuery') response = self._send(http_method='POST', location_id='2b4486ad-122b-400c-ae65-17b6672c1f9d', - version='7.0-preview.1', + version='7.2-preview.1', content=content) return self._deserialize('ContributedFeatureStateQuery', response) def query_feature_states_for_default_scope(self, query, user_scope): """QueryFeatureStatesForDefaultScope. [Preview API] Get the states of the specified features for the default scope - :param :class:` ` query: Query describing the features to query. + :param :class:` ` query: Query describing the features to query. :param str user_scope: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if user_scope is not None: @@ -187,7 +187,7 @@ def query_feature_states_for_default_scope(self, query, user_scope): content = self._serialize.body(query, 'ContributedFeatureStateQuery') response = self._send(http_method='POST', location_id='3f810f28-03e2-4239-b0bc-788add3005e5', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('ContributedFeatureStateQuery', response) @@ -195,11 +195,11 @@ def query_feature_states_for_default_scope(self, query, user_scope): def query_feature_states_for_named_scope(self, query, user_scope, scope_name, scope_value): """QueryFeatureStatesForNamedScope. [Preview API] Get the states of the specified features for the specific named scope - :param :class:` ` query: Query describing the features to query. + :param :class:` ` query: Query describing the features to query. :param str user_scope: :param str scope_name: :param str scope_value: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if user_scope is not None: @@ -211,7 +211,7 @@ def query_feature_states_for_named_scope(self, query, user_scope, scope_name, sc content = self._serialize.body(query, 'ContributedFeatureStateQuery') response = self._send(http_method='POST', location_id='f29e997b-c2da-4d15-8380-765788a1a74c', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('ContributedFeatureStateQuery', response) diff --git a/azure-devops/azure/devops/v7_0/feature_management/models.py b/azure-devops/azure/devops/v7_2/feature_management/models.py similarity index 96% rename from azure-devops/azure/devops/v7_0/feature_management/models.py rename to azure-devops/azure/devops/v7_2/feature_management/models.py index 9a1180a9..6f3467ac 100644 --- a/azure-devops/azure/devops/v7_0/feature_management/models.py +++ b/azure-devops/azure/devops/v7_2/feature_management/models.py @@ -14,17 +14,17 @@ class ContributedFeature(Model): A feature that can be enabled or disabled :param _links: Named links describing the feature - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param default_state: If true, the feature is enabled unless overridden at some scope :type default_state: bool :param default_value_rules: Rules for setting the default value if not specified by any setting/scope. Evaluated in order until a rule returns an Enabled or Disabled state (not Undefined) - :type default_value_rules: list of :class:`ContributedFeatureValueRule ` + :type default_value_rules: list of :class:`ContributedFeatureValueRule ` :param description: The description of the feature :type description: str :param feature_properties: Extra properties for the feature :type feature_properties: dict :param feature_state_changed_listeners: Handler for listening to setter calls on feature value. These listeners are only invoked after a successful set has occurred - :type feature_state_changed_listeners: list of :class:`ContributedFeatureListener ` + :type feature_state_changed_listeners: list of :class:`ContributedFeatureListener ` :param id: The full contribution id of the feature :type id: str :param include_as_claim: If this is set to true, then the id for this feature will be added to the list of claims for the request. @@ -34,9 +34,9 @@ class ContributedFeature(Model): :param order: Suggested order to display feature in. :type order: int :param override_rules: Rules for overriding a feature value. These rules are run before explicit user/host state values are checked. They are evaluated in order until a rule returns an Enabled or Disabled state (not Undefined) - :type override_rules: list of :class:`ContributedFeatureValueRule ` + :type override_rules: list of :class:`ContributedFeatureValueRule ` :param scopes: The scopes/levels at which settings can set the enabled/disabled state of this feature - :type scopes: list of :class:`ContributedFeatureSettingScope ` + :type scopes: list of :class:`ContributedFeatureSettingScope ` :param service_instance_type: The service instance id of the service that owns this feature :type service_instance_type: str :param tags: Tags associated with the feature. @@ -148,7 +148,7 @@ class ContributedFeatureState(Model): :param reason: Reason that the state was set (by a plugin/rule). :type reason: str :param scope: The scope at which this state applies - :type scope: :class:`ContributedFeatureSettingScope ` + :type scope: :class:`ContributedFeatureSettingScope ` :param state: The current state of this feature :type state: object """ diff --git a/azure-devops/azure/devops/v7_0/feed/__init__.py b/azure-devops/azure/devops/v7_2/feed/__init__.py similarity index 98% rename from azure-devops/azure/devops/v7_0/feed/__init__.py rename to azure-devops/azure/devops/v7_2/feed/__init__.py index 9778080a..a0791e17 100644 --- a/azure-devops/azure/devops/v7_0/feed/__init__.py +++ b/azure-devops/azure/devops/v7_2/feed/__init__.py @@ -13,9 +13,10 @@ 'Feed', 'FeedBatchData', 'FeedBatchOperationData', - 'FeedCore', 'FeedChange', 'FeedChangesResponse', + 'FeedCore', + 'FeedIdsResult', 'FeedPermission', 'FeedRetentionPolicy', 'FeedUpdate', @@ -25,10 +26,10 @@ 'MinimalPackageVersion', 'OperationReference', 'Package', - 'PackageDependency', - 'PackageFile', 'PackageChange', 'PackageChangesResponse', + 'PackageDependency', + 'PackageFile', 'PackageMetrics', 'PackageMetricsQuery', 'PackageVersion', diff --git a/azure-devops/azure/devops/v7_0/feed/feed_client.py b/azure-devops/azure/devops/v7_2/feed/feed_client.py similarity index 87% rename from azure-devops/azure/devops/v7_0/feed/feed_client.py rename to azure-devops/azure/devops/v7_2/feed/feed_client.py index 6263b354..c28323f0 100644 --- a/azure-devops/azure/devops/v7_0/feed/feed_client.py +++ b/azure-devops/azure/devops/v7_2/feed/feed_client.py @@ -27,7 +27,7 @@ def __init__(self, base_url=None, creds=None): def get_badge(self, feed_id, package_id, project=None, **kwargs): """GetBadge. - Generate a SVG badge for the latest version of a package. The generated SVG is typically used as the image in an HTML link which takes users to the feed containing the package to accelerate discovery and consumption. + [Preview API] Generate a SVG badge for the latest version of a package. The generated SVG is typically used as the image in an HTML link which takes users to the feed containing the package to accelerate discovery and consumption. :param str feed_id: Name or Id of the feed. :param str package_id: Id of the package (GUID Id, not name). :param str project: Project ID or project name @@ -42,7 +42,7 @@ def get_badge(self, feed_id, package_id, project=None, **kwargs): route_values['packageId'] = self._serialize.url('package_id', package_id, 'str') response = self._send(http_method='GET', location_id='61d885fd-10f3-4a55-82b6-476d866b673f', - version='7.0', + version='7.2-preview.1', route_values=route_values, accept_media_type='image/svg+xml') if "callback" in kwargs: @@ -53,10 +53,10 @@ def get_badge(self, feed_id, package_id, project=None, **kwargs): def get_feed_change(self, feed_id, project=None): """GetFeedChange. - Query a feed to determine its current state. + [Preview API] Query a feed to determine its current state. :param str feed_id: Name or ID of the feed. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -65,18 +65,18 @@ def get_feed_change(self, feed_id, project=None): route_values['feedId'] = self._serialize.url('feed_id', feed_id, 'str') response = self._send(http_method='GET', location_id='29ba2dad-389a-4661-b5d3-de76397ca05b', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('FeedChange', response) def get_feed_changes(self, project=None, include_deleted=None, continuation_token=None, batch_size=None): """GetFeedChanges. - Query to determine which feeds have changed since the last call, tracked through the provided continuationToken. Only changes to a feed itself are returned and impact the continuationToken, not additions or alterations to packages within the feeds. + [Preview API] Query to determine which feeds have changed since the last call, tracked through the provided continuationToken. Only changes to a feed itself are returned and impact the continuationToken, not additions or alterations to packages within the feeds. :param str project: Project ID or project name :param bool include_deleted: If true, get changes for all feeds including deleted feeds. The default value is false. :param long continuation_token: A continuation token which acts as a bookmark to a previously retrieved change. This token allows the user to continue retrieving changes in batches, picking up where the previous batch left off. If specified, all the changes that occur strictly after the token will be returned. If not specified or 0, iteration will start with the first change. :param int batch_size: Number of package changes to fetch. The default value is 1000. The maximum value is 2000. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -90,14 +90,14 @@ def get_feed_changes(self, project=None, include_deleted=None, continuation_toke query_parameters['batchSize'] = self._serialize.query('batch_size', batch_size, 'int') response = self._send(http_method='GET', location_id='29ba2dad-389a-4661-b5d3-de76397ca05b', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('FeedChangesResponse', response) def get_feeds_from_recycle_bin(self, project=None): """GetFeedsFromRecycleBin. - Query for feeds within the recycle bin. + [Preview API] Query for feeds within the recycle bin. :param str project: Project ID or project name :rtype: [Feed] """ @@ -106,13 +106,14 @@ def get_feeds_from_recycle_bin(self, project=None): route_values['project'] = self._serialize.url('project', project, 'str') response = self._send(http_method='GET', location_id='0cee643d-beb9-41f8-9368-3ada763a8344', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('[Feed]', self._unwrap_collection(response)) def permanent_delete_feed(self, feed_id, project=None): """PermanentDeleteFeed. - :param str feed_id: + [Preview API] Permanently delete a feed and all of its packages. The action is irreversible and the package content will be deleted immediately. + :param str feed_id: Name or Id of the feed. :param str project: Project ID or project name """ route_values = {} @@ -122,13 +123,14 @@ def permanent_delete_feed(self, feed_id, project=None): route_values['feedId'] = self._serialize.url('feed_id', feed_id, 'str') self._send(http_method='DELETE', location_id='0cee643d-beb9-41f8-9368-3ada763a8344', - version='7.0', + version='7.2-preview.1', route_values=route_values) def restore_deleted_feed(self, patch_json, feed_id, project=None): """RestoreDeletedFeed. - :param :class:`<[JsonPatchOperation]> ` patch_json: - :param str feed_id: + [Preview API] Restores a deleted feed and all of its packages. + :param :class:`<[JsonPatchOperation]> ` patch_json: + :param str feed_id: Name or Id of the feed. :param str project: Project ID or project name """ route_values = {} @@ -139,17 +141,17 @@ def restore_deleted_feed(self, patch_json, feed_id, project=None): content = self._serialize.body(patch_json, '[JsonPatchOperation]') self._send(http_method='PATCH', location_id='0cee643d-beb9-41f8-9368-3ada763a8344', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content, media_type='application/json-patch+json') def create_feed(self, feed, project=None): """CreateFeed. - Create a feed, a container for various package types. - :param :class:` ` feed: A JSON object containing both required and optional attributes for the feed. Name is the only required value. + [Preview API] Create a feed, a container for various package types. + :param :class:` ` feed: A JSON object containing both required and optional attributes for the feed. Name is the only required value. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -157,14 +159,14 @@ def create_feed(self, feed, project=None): content = self._serialize.body(feed, 'Feed') response = self._send(http_method='POST', location_id='c65009a7-474a-4ad1-8b42-7d852107ef8c', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('Feed', response) def delete_feed(self, feed_id, project=None): """DeleteFeed. - Remove a feed and all its packages. The feed moves to the recycle bin and is reversible. + [Preview API] Remove a feed and all its packages. The feed moves to the recycle bin and is reversible. :param str feed_id: Name or Id of the feed. :param str project: Project ID or project name """ @@ -175,16 +177,16 @@ def delete_feed(self, feed_id, project=None): route_values['feedId'] = self._serialize.url('feed_id', feed_id, 'str') self._send(http_method='DELETE', location_id='c65009a7-474a-4ad1-8b42-7d852107ef8c', - version='7.0', + version='7.2-preview.1', route_values=route_values) def get_feed(self, feed_id, project=None, include_deleted_upstreams=None): """GetFeed. - Get the settings for a specific feed. + [Preview API] Get the settings for a specific feed. :param str feed_id: Name or Id of the feed. :param str project: Project ID or project name :param bool include_deleted_upstreams: Include upstreams that have been deleted in the response. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -196,14 +198,14 @@ def get_feed(self, feed_id, project=None, include_deleted_upstreams=None): query_parameters['includeDeletedUpstreams'] = self._serialize.query('include_deleted_upstreams', include_deleted_upstreams, 'bool') response = self._send(http_method='GET', location_id='c65009a7-474a-4ad1-8b42-7d852107ef8c', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('Feed', response) def get_feeds(self, project=None, feed_role=None, include_deleted_upstreams=None, include_urls=None): """GetFeeds. - Get all feeds in an account where you have the provided role access. + [Preview API] Get all feeds in an account where you have the provided role access. :param str project: Project ID or project name :param str feed_role: Filter by this role, either Administrator(4), Contributor(3), or Reader(2) level permissions. :param bool include_deleted_upstreams: Include upstreams that have been deleted in the response. @@ -222,18 +224,18 @@ def get_feeds(self, project=None, feed_role=None, include_deleted_upstreams=None query_parameters['includeUrls'] = self._serialize.query('include_urls', include_urls, 'bool') response = self._send(http_method='GET', location_id='c65009a7-474a-4ad1-8b42-7d852107ef8c', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[Feed]', self._unwrap_collection(response)) def update_feed(self, feed, feed_id, project=None): """UpdateFeed. - Change the attributes of a feed. - :param :class:` ` feed: A JSON object containing the feed settings to be updated. + [Preview API] Change the attributes of a feed. + :param :class:` ` feed: A JSON object containing the feed settings to be updated. :param str feed_id: Name or Id of the feed. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -243,14 +245,14 @@ def update_feed(self, feed, feed_id, project=None): content = self._serialize.body(feed, 'FeedUpdate') response = self._send(http_method='PATCH', location_id='c65009a7-474a-4ad1-8b42-7d852107ef8c', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('Feed', response) def get_global_permissions(self, include_ids=None): """GetGlobalPermissions. - Get all service-wide feed creation and administration permissions. + [Preview API] Get all service-wide feed creation and administration permissions. :param bool include_ids: Set to true to add IdentityIds to the permission objects. :rtype: [GlobalPermission] """ @@ -259,31 +261,31 @@ def get_global_permissions(self, include_ids=None): query_parameters['includeIds'] = self._serialize.query('include_ids', include_ids, 'bool') response = self._send(http_method='GET', location_id='a74419ef-b477-43df-8758-3cd1cd5f56c6', - version='7.0', + version='7.2-preview.1', query_parameters=query_parameters) return self._deserialize('[GlobalPermission]', self._unwrap_collection(response)) def set_global_permissions(self, global_permissions): """SetGlobalPermissions. - Set service-wide permissions that govern feed creation and administration. + [Preview API] Set service-wide permissions that govern feed creation and administration. :param [GlobalPermission] global_permissions: New permissions for the organization. :rtype: [GlobalPermission] """ content = self._serialize.body(global_permissions, '[GlobalPermission]') response = self._send(http_method='PATCH', location_id='a74419ef-b477-43df-8758-3cd1cd5f56c6', - version='7.0', + version='7.2-preview.1', content=content) return self._deserialize('[GlobalPermission]', self._unwrap_collection(response)) def get_package_changes(self, feed_id, project=None, continuation_token=None, batch_size=None): """GetPackageChanges. - Get a batch of package changes made to a feed. The changes returned are 'most recent change' so if an Add is followed by an Update before you begin enumerating, you'll only see one change in the batch. While consuming batches using the continuation token, you may see changes to the same package version multiple times if they are happening as you enumerate. + [Preview API] Get a batch of package changes made to a feed. The changes returned are 'most recent change' so if an Add is followed by an Update before you begin enumerating, you'll only see one change in the batch. While consuming batches using the continuation token, you may see changes to the same package version multiple times if they are happening as you enumerate. :param str feed_id: Name or Id of the feed. :param str project: Project ID or project name :param long continuation_token: A continuation token which acts as a bookmark to a previously retrieved change. This token allows the user to continue retrieving changes in batches, picking up where the previous batch left off. If specified, all the changes that occur strictly after the token will be returned. If not specified or 0, iteration will start with the first change. :param int batch_size: Number of package changes to fetch. The default value is 1000. The maximum value is 2000. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -297,14 +299,15 @@ def get_package_changes(self, feed_id, project=None, continuation_token=None, ba query_parameters['batchSize'] = self._serialize.query('batch_size', batch_size, 'int') response = self._send(http_method='GET', location_id='323a0631-d083-4005-85ae-035114dfb681', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('PackageChangesResponse', response) def query_package_metrics(self, package_id_query, feed_id, project=None): """QueryPackageMetrics. - :param :class:` ` package_id_query: + [Preview API] + :param :class:` ` package_id_query: :param str feed_id: :param str project: Project ID or project name :rtype: [PackageMetrics] @@ -317,14 +320,14 @@ def query_package_metrics(self, package_id_query, feed_id, project=None): content = self._serialize.body(package_id_query, 'PackageMetricsQuery') response = self._send(http_method='POST', location_id='bddc9b3c-8a59-4a9f-9b40-ee1dcaa2cc0d', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('[PackageMetrics]', self._unwrap_collection(response)) def get_package(self, feed_id, package_id, project=None, include_all_versions=None, include_urls=None, is_listed=None, is_release=None, include_deleted=None, include_description=None): """GetPackage. - Get details about a specific package. + [Preview API] Get details about a specific package. :param str feed_id: Name or Id of the feed. :param str package_id: The package Id (GUID Id, not the package name). :param str project: Project ID or project name @@ -334,7 +337,7 @@ def get_package(self, feed_id, package_id, project=None, include_all_versions=No :param bool is_release: Only applicable for Nuget packages. Use this to filter the response when includeAllVersions is set to true. Default is True (only return packages without prerelease versioning). :param bool include_deleted: Return deleted or unpublished versions of packages in the response. Default is False. :param bool include_description: Return the description for every version of each package in the response. Default is False. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -358,14 +361,14 @@ def get_package(self, feed_id, package_id, project=None, include_all_versions=No query_parameters['includeDescription'] = self._serialize.query('include_description', include_description, 'bool') response = self._send(http_method='GET', location_id='7a20d846-c929-4acc-9ea2-0d5a7df1b197', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('Package', response) def get_packages(self, feed_id, project=None, protocol_type=None, package_name_query=None, normalized_package_name=None, include_urls=None, include_all_versions=None, is_listed=None, get_top_package_versions=None, is_release=None, include_description=None, top=None, skip=None, include_deleted=None, is_cached=None, direct_upstream_id=None): """GetPackages. - Get details about all of the packages in the feed. Use the various filters to include or exclude information from the result set. + [Preview API] Get details about all of the packages in the feed. Use the various filters to include or exclude information from the result set. :param str feed_id: Name or Id of the feed. :param str project: Project ID or project name :param str protocol_type: One of the supported artifact package types. @@ -420,14 +423,14 @@ def get_packages(self, feed_id, project=None, protocol_type=None, package_name_q query_parameters['directUpstreamId'] = self._serialize.query('direct_upstream_id', direct_upstream_id, 'str') response = self._send(http_method='GET', location_id='7a20d846-c929-4acc-9ea2-0d5a7df1b197', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[Package]', self._unwrap_collection(response)) def get_feed_permissions(self, feed_id, project=None, include_ids=None, exclude_inherited_permissions=None, identity_descriptor=None, include_deleted_feeds=None): """GetFeedPermissions. - Get the permissions for a feed. + [Preview API] Get the permissions for a feed. :param str feed_id: Name or Id of the feed. :param str project: Project ID or project name :param bool include_ids: True to include user Ids in the response. Default is false. @@ -452,14 +455,14 @@ def get_feed_permissions(self, feed_id, project=None, include_ids=None, exclude_ query_parameters['includeDeletedFeeds'] = self._serialize.query('include_deleted_feeds', include_deleted_feeds, 'bool') response = self._send(http_method='GET', location_id='be8c1476-86a7-44ed-b19d-aec0e9275cd8', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[FeedPermission]', self._unwrap_collection(response)) def set_feed_permissions(self, feed_permission, feed_id, project=None): """SetFeedPermissions. - Update the permissions on a feed. + [Preview API] Update the permissions on a feed. :param [FeedPermission] feed_permission: Permissions to set. :param str feed_id: Name or Id of the feed. :param str project: Project ID or project name @@ -473,7 +476,7 @@ def set_feed_permissions(self, feed_permission, feed_id, project=None): content = self._serialize.body(feed_permission, '[FeedPermission]') response = self._send(http_method='PATCH', location_id='be8c1476-86a7-44ed-b19d-aec0e9275cd8', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('[FeedPermission]', self._unwrap_collection(response)) @@ -485,7 +488,7 @@ def get_package_version_provenance(self, feed_id, package_id, package_version_id :param str package_id: Id of the package (GUID Id, not name). :param str package_version_id: Id of the package version (GUID Id, not name). :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -498,16 +501,16 @@ def get_package_version_provenance(self, feed_id, package_id, package_version_id route_values['packageVersionId'] = self._serialize.url('package_version_id', package_version_id, 'str') response = self._send(http_method='GET', location_id='0aaeabd4-85cd-4686-8a77-8d31c15690b8', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) return self._deserialize('PackageVersionProvenance', response) def empty_recycle_bin(self, feed_id, project=None): """EmptyRecycleBin. - Queues a job to remove all package versions from a feed's recycle bin + [Preview API] Queues a job to remove all package versions from a feed's recycle bin :param str feed_id: Name or Id of the feed :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -516,18 +519,18 @@ def empty_recycle_bin(self, feed_id, project=None): route_values['feedId'] = self._serialize.url('feed_id', feed_id, 'str') response = self._send(http_method='DELETE', location_id='2704e72c-f541-4141-99be-2004b50b05fa', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('OperationReference', response) def get_recycle_bin_package(self, feed_id, package_id, project=None, include_urls=None): """GetRecycleBinPackage. - Get information about a package and all its versions within the recycle bin. + [Preview API] Get information about a package and all its versions within the recycle bin. :param str feed_id: Name or Id of the feed. :param str package_id: The package Id (GUID Id, not the package name). :param str project: Project ID or project name :param bool include_urls: True to return REST Urls with the response. Default is True. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -541,14 +544,14 @@ def get_recycle_bin_package(self, feed_id, package_id, project=None, include_url query_parameters['includeUrls'] = self._serialize.query('include_urls', include_urls, 'bool') response = self._send(http_method='GET', location_id='2704e72c-f541-4141-99be-2004b50b05fa', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('Package', response) def get_recycle_bin_packages(self, feed_id, project=None, protocol_type=None, package_name_query=None, include_urls=None, top=None, skip=None, include_all_versions=None): """GetRecycleBinPackages. - Query for packages within the recycle bin. + [Preview API] Query for packages within the recycle bin. :param str feed_id: Name or Id of the feed. :param str project: Project ID or project name :param str protocol_type: Type of package (e.g. NuGet, npm, ...). @@ -579,20 +582,20 @@ def get_recycle_bin_packages(self, feed_id, project=None, protocol_type=None, pa query_parameters['includeAllVersions'] = self._serialize.query('include_all_versions', include_all_versions, 'bool') response = self._send(http_method='GET', location_id='2704e72c-f541-4141-99be-2004b50b05fa', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[Package]', self._unwrap_collection(response)) def get_recycle_bin_package_version(self, feed_id, package_id, package_version_id, project=None, include_urls=None): """GetRecycleBinPackageVersion. - Get information about a package version within the recycle bin. + [Preview API] Get information about a package version within the recycle bin. :param str feed_id: Name or Id of the feed. :param str package_id: The package Id (GUID Id, not the package name). :param str package_version_id: The package version Id 9guid Id, not the version string). :param str project: Project ID or project name :param bool include_urls: True to return REST Urls with the response. Default is True. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -608,14 +611,14 @@ def get_recycle_bin_package_version(self, feed_id, package_id, package_version_i query_parameters['includeUrls'] = self._serialize.query('include_urls', include_urls, 'bool') response = self._send(http_method='GET', location_id='aceb4be7-8737-4820-834c-4c549e10fdc7', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('RecycleBinPackageVersion', response) def get_recycle_bin_package_versions(self, feed_id, package_id, project=None, include_urls=None): """GetRecycleBinPackageVersions. - Get a list of package versions within the recycle bin. + [Preview API] Get a list of package versions within the recycle bin. :param str feed_id: Name or Id of the feed. :param str package_id: The package Id (GUID Id, not the package name). :param str project: Project ID or project name @@ -634,14 +637,14 @@ def get_recycle_bin_package_versions(self, feed_id, package_id, project=None, in query_parameters['includeUrls'] = self._serialize.query('include_urls', include_urls, 'bool') response = self._send(http_method='GET', location_id='aceb4be7-8737-4820-834c-4c549e10fdc7', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[RecycleBinPackageVersion]', self._unwrap_collection(response)) def delete_feed_retention_policies(self, feed_id, project=None): """DeleteFeedRetentionPolicies. - Delete the retention policy for a feed. + [Preview API] Delete the retention policy for a feed. :param str feed_id: Name or ID of the feed. :param str project: Project ID or project name """ @@ -652,15 +655,15 @@ def delete_feed_retention_policies(self, feed_id, project=None): route_values['feedId'] = self._serialize.url('feed_id', feed_id, 'str') self._send(http_method='DELETE', location_id='ed52a011-0112-45b5-9f9e-e14efffb3193', - version='7.0', + version='7.2-preview.1', route_values=route_values) def get_feed_retention_policies(self, feed_id, project=None): """GetFeedRetentionPolicies. - Get the retention policy for a feed. + [Preview API] Get the retention policy for a feed. :param str feed_id: Name or ID of the feed. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -669,17 +672,17 @@ def get_feed_retention_policies(self, feed_id, project=None): route_values['feedId'] = self._serialize.url('feed_id', feed_id, 'str') response = self._send(http_method='GET', location_id='ed52a011-0112-45b5-9f9e-e14efffb3193', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('FeedRetentionPolicy', response) def set_feed_retention_policies(self, policy, feed_id, project=None): """SetFeedRetentionPolicies. - Set the retention policy for a feed. - :param :class:` ` policy: Feed retention policy. + [Preview API] Set the retention policy for a feed. + :param :class:` ` policy: Feed retention policy. :param str feed_id: Name or ID of the feed. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -689,14 +692,15 @@ def set_feed_retention_policies(self, policy, feed_id, project=None): content = self._serialize.body(policy, 'FeedRetentionPolicy') response = self._send(http_method='PUT', location_id='ed52a011-0112-45b5-9f9e-e14efffb3193', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('FeedRetentionPolicy', response) def query_package_version_metrics(self, package_version_id_query, feed_id, package_id, project=None): """QueryPackageVersionMetrics. - :param :class:` ` package_version_id_query: + [Preview API] + :param :class:` ` package_version_id_query: :param str feed_id: :param str package_id: :param str project: Project ID or project name @@ -712,14 +716,14 @@ def query_package_version_metrics(self, package_version_id_query, feed_id, packa content = self._serialize.body(package_version_id_query, 'PackageVersionMetricsQuery') response = self._send(http_method='POST', location_id='e6ae8caa-b6a8-4809-b840-91b2a42c19ad', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('[PackageVersionMetrics]', self._unwrap_collection(response)) def get_package_version(self, feed_id, package_id, package_version_id, project=None, include_urls=None, is_listed=None, is_deleted=None): """GetPackageVersion. - Get details about a specific package version. + [Preview API] Get details about a specific package version. :param str feed_id: Name or Id of the feed. :param str package_id: Id of the package (GUID Id, not name). :param str package_version_id: Id of the package version (GUID Id, not name). @@ -727,7 +731,7 @@ def get_package_version(self, feed_id, package_id, package_version_id, project=N :param bool include_urls: True to include urls for each version. Default is true. :param bool is_listed: Only applicable for NuGet packages. If false, delisted package versions will be returned. :param bool is_deleted: This does not have any effect on the requested package version, for other versions returned specifies whether to return only deleted or non-deleted versions of packages in the response. Default is unset (return all versions). - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -747,14 +751,14 @@ def get_package_version(self, feed_id, package_id, package_version_id, project=N query_parameters['isDeleted'] = self._serialize.query('is_deleted', is_deleted, 'bool') response = self._send(http_method='GET', location_id='3b331909-6a86-44cc-b9ec-c1834c35498f', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('PackageVersion', response) def get_package_versions(self, feed_id, package_id, project=None, include_urls=None, is_listed=None, is_deleted=None): """GetPackageVersions. - Get a list of package versions, optionally filtering by state. + [Preview API] Get a list of package versions, optionally filtering by state. :param str feed_id: Name or Id of the feed. :param str package_id: Id of the package (GUID Id, not name). :param str project: Project ID or project name @@ -779,18 +783,18 @@ def get_package_versions(self, feed_id, package_id, project=None, include_urls=N query_parameters['isDeleted'] = self._serialize.query('is_deleted', is_deleted, 'bool') response = self._send(http_method='GET', location_id='3b331909-6a86-44cc-b9ec-c1834c35498f', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[PackageVersion]', self._unwrap_collection(response)) def create_feed_view(self, view, feed_id, project=None): """CreateFeedView. - Create a new view on the referenced feed. - :param :class:` ` view: View to be created. + [Preview API] Create a new view on the referenced feed. + :param :class:` ` view: View to be created. :param str feed_id: Name or Id of the feed. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -800,14 +804,14 @@ def create_feed_view(self, view, feed_id, project=None): content = self._serialize.body(view, 'FeedView') response = self._send(http_method='POST', location_id='42a8502a-6785-41bc-8c16-89477d930877', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('FeedView', response) def delete_feed_view(self, feed_id, view_id, project=None): """DeleteFeedView. - Delete a feed view. + [Preview API] Delete a feed view. :param str feed_id: Name or Id of the feed. :param str view_id: Name or Id of the view. :param str project: Project ID or project name @@ -821,16 +825,16 @@ def delete_feed_view(self, feed_id, view_id, project=None): route_values['viewId'] = self._serialize.url('view_id', view_id, 'str') self._send(http_method='DELETE', location_id='42a8502a-6785-41bc-8c16-89477d930877', - version='7.0', + version='7.2-preview.1', route_values=route_values) def get_feed_view(self, feed_id, view_id, project=None): """GetFeedView. - Get a view by Id. + [Preview API] Get a view by Id. :param str feed_id: Name or Id of the feed. :param str view_id: Name or Id of the view. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -841,13 +845,13 @@ def get_feed_view(self, feed_id, view_id, project=None): route_values['viewId'] = self._serialize.url('view_id', view_id, 'str') response = self._send(http_method='GET', location_id='42a8502a-6785-41bc-8c16-89477d930877', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('FeedView', response) def get_feed_views(self, feed_id, project=None): """GetFeedViews. - Get all views for a feed. + [Preview API] Get all views for a feed. :param str feed_id: Name or Id of the feed. :param str project: Project ID or project name :rtype: [FeedView] @@ -859,18 +863,18 @@ def get_feed_views(self, feed_id, project=None): route_values['feedId'] = self._serialize.url('feed_id', feed_id, 'str') response = self._send(http_method='GET', location_id='42a8502a-6785-41bc-8c16-89477d930877', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('[FeedView]', self._unwrap_collection(response)) def update_feed_view(self, view, feed_id, view_id, project=None): """UpdateFeedView. - Update a view. - :param :class:` ` view: New settings to apply to the specified view. + [Preview API] Update a view. + :param :class:` ` view: New settings to apply to the specified view. :param str feed_id: Name or Id of the feed. :param str view_id: Name or Id of the view. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -882,7 +886,7 @@ def update_feed_view(self, view, feed_id, view_id, project=None): content = self._serialize.body(view, 'FeedView') response = self._send(http_method='PATCH', location_id='42a8502a-6785-41bc-8c16-89477d930877', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('FeedView', response) diff --git a/azure-devops/azure/devops/v7_0/feed/models.py b/azure-devops/azure/devops/v7_2/feed/models.py similarity index 93% rename from azure-devops/azure/devops/v7_0/feed/models.py rename to azure-devops/azure/devops/v7_2/feed/models.py index b0d758ad..c36fe85f 100644 --- a/azure-devops/azure/devops/v7_0/feed/models.py +++ b/azure-devops/azure/devops/v7_2/feed/models.py @@ -12,7 +12,7 @@ class FeedBatchData(Model): """ :param data: - :type data: :class:`FeedBatchOperationData ` + :type data: :class:`FeedBatchOperationData ` :param operation: :type operation: object """ @@ -39,6 +39,64 @@ def __init__(self): super(FeedBatchOperationData, self).__init__() +class FeedChange(Model): + """ + A container that encapsulates the state of the feed after a create, update, or delete. + + :param change_type: The type of operation. + :type change_type: object + :param feed: The state of the feed after a after a create, update, or delete operation completed. + :type feed: :class:`Feed ` + :param feed_continuation_token: A token that identifies the next change in the log of changes. + :type feed_continuation_token: long + :param latest_package_continuation_token: A token that identifies the latest package change for this feed. This can be used to quickly determine if there have been any changes to packages in a specific feed. + :type latest_package_continuation_token: long + """ + + _attribute_map = { + 'change_type': {'key': 'changeType', 'type': 'object'}, + 'feed': {'key': 'feed', 'type': 'Feed'}, + 'feed_continuation_token': {'key': 'feedContinuationToken', 'type': 'long'}, + 'latest_package_continuation_token': {'key': 'latestPackageContinuationToken', 'type': 'long'} + } + + def __init__(self, change_type=None, feed=None, feed_continuation_token=None, latest_package_continuation_token=None): + super(FeedChange, self).__init__() + self.change_type = change_type + self.feed = feed + self.feed_continuation_token = feed_continuation_token + self.latest_package_continuation_token = latest_package_continuation_token + + +class FeedChangesResponse(Model): + """ + A result set containing the feed changes for the range that was requested. + + :param _links: + :type _links: :class:`ReferenceLinks ` + :param count: The number of changes in this set. + :type count: int + :param feed_changes: A container that encapsulates the state of the feed after a create, update, or delete. + :type feed_changes: list of :class:`FeedChange ` + :param next_feed_continuation_token: When iterating through the log of changes this value indicates the value that should be used for the next continuation token. + :type next_feed_continuation_token: long + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'count': {'key': 'count', 'type': 'int'}, + 'feed_changes': {'key': 'feedChanges', 'type': '[FeedChange]'}, + 'next_feed_continuation_token': {'key': 'nextFeedContinuationToken', 'type': 'long'} + } + + def __init__(self, _links=None, count=None, feed_changes=None, next_feed_continuation_token=None): + super(FeedChangesResponse, self).__init__() + self._links = _links + self.count = count + self.feed_changes = feed_changes + self.next_feed_continuation_token = next_feed_continuation_token + + class FeedCore(Model): """ An object that contains all of the settings for a specific feed. @@ -58,13 +116,13 @@ class FeedCore(Model): :param name: A name for the feed. feed names must follow these rules: Must not exceed 64 characters Must not contain whitespaces Must not start with an underscore or a period Must not end with a period Must not contain any of the following illegal characters: , |, /, \\, ?, :, &, $, *, \", #, [, ] ]]> :type name: str :param project: The project that this feed is associated with. - :type project: :class:`ProjectReference ` - :param upstream_enabled: OBSOLETE: This should always be true. Setting to false will override all sources in UpstreamSources. + :type project: :class:`ProjectReference ` + :param upstream_enabled: This should always be true. Setting to false will override all sources in UpstreamSources. :type upstream_enabled: bool :param upstream_sources: A list of sources that this feed will fetch packages from. An empty list indicates that this feed will not search any additional sources for packages. - :type upstream_sources: list of :class:`UpstreamSource ` + :type upstream_sources: list of :class:`UpstreamSource ` :param view: Definition of the view. - :type view: :class:`FeedView ` + :type view: :class:`FeedView ` :param view_id: View Id. :type view_id: str :param view_name: View name. @@ -104,62 +162,31 @@ def __init__(self, allow_upstream_name_conflict=None, capabilities=None, fully_q self.view_name = view_name -class FeedChange(Model): - """ - A container that encapsulates the state of the feed after a create, update, or delete. - - :param feed: The state of the feed after a after a create, update, or delete operation completed. - :type feed: :class:`Feed ` - :param feed_continuation_token: A token that identifies the next change in the log of changes. - :type feed_continuation_token: long - :param change_type: The type of operation. - :type change_type: object - :param latest_package_continuation_token: A token that identifies the latest package change for this feed. This can be used to quickly determine if there have been any changes to packages in a specific feed. - :type latest_package_continuation_token: long +class FeedIdsResult(Model): """ - - _attribute_map = { - 'feed': {'key': 'feed', 'type': 'Feed'}, - 'feed_continuation_token': {'key': 'feedContinuationToken', 'type': 'long'}, - 'change_type': {'key': 'changeType', 'type': 'object'}, - 'latest_package_continuation_token': {'key': 'latestPackageContinuationToken', 'type': 'long'} - } - - def __init__(self, feed=None, feed_continuation_token=None, change_type=None, latest_package_continuation_token=None): - super(FeedChange, self).__init__() - self.feed = feed - self.feed_continuation_token = feed_continuation_token - self.change_type = change_type - self.latest_package_continuation_token = latest_package_continuation_token - - -class FeedChangesResponse(Model): - """ - A result set containing the feed changes for the range that was requested. - - :param _links: - :type _links: :class:`ReferenceLinks ` - :param count: The number of changes in this set. - :type count: int - :param feed_changes: A container that encapsulates the state of the feed after a create, update, or delete. - :type feed_changes: list of :class:`FeedChange ` - :param next_feed_continuation_token: When iterating through the log of changes this value indicates the value that should be used for the next continuation token. - :type next_feed_continuation_token: long + :param id: + :type id: str + :param name: + :type name: str + :param project_id: + :type project_id: str + :param project_name: + :type project_name: str """ _attribute_map = { - '_links': {'key': '_links', 'type': 'ReferenceLinks'}, - 'count': {'key': 'count', 'type': 'int'}, - 'feed_changes': {'key': 'feedChanges', 'type': '[FeedChange]'}, - 'next_feed_continuation_token': {'key': 'nextFeedContinuationToken', 'type': 'long'} + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'project_id': {'key': 'projectId', 'type': 'str'}, + 'project_name': {'key': 'projectName', 'type': 'str'} } - def __init__(self, _links=None, count=None, feed_changes=None, next_feed_continuation_token=None): - super(FeedChangesResponse, self).__init__() - self._links = _links - self.count = count - self.feed_changes = feed_changes - self.next_feed_continuation_token = next_feed_continuation_token + def __init__(self, id=None, name=None, project_id=None, project_name=None): + super(FeedIdsResult, self).__init__() + self.id = id + self.name = name + self.project_id = project_id + self.project_name = project_name class FeedPermission(Model): @@ -169,7 +196,7 @@ class FeedPermission(Model): :param display_name: Display name for the identity. :type display_name: str :param identity_descriptor: Identity associated with this role. - :type identity_descriptor: :class:`str ` + :type identity_descriptor: :class:`str ` :param identity_id: Id of the identity associated with this role. :type identity_id: str :param is_inherited_role: Boolean indicating whether the role is inherited or set directly. @@ -238,10 +265,10 @@ class FeedUpdate(Model): :type id: str :param name: A name for the feed. feed names must follow these rules: Must not exceed 64 characters Must not contain whitespaces Must not start with an underscore or a period Must not end with a period Must not contain any of the following illegal characters: , |, /, \\, ?, :, &, $, *, \", #, [, ] ]]> :type name: str - :param upstream_enabled: OBSOLETE: If set, the feed can proxy packages from an upstream feed + :param upstream_enabled: If set, the feed can proxy packages from an upstream feed :type upstream_enabled: bool :param upstream_sources: A list of sources that this feed will fetch packages from. An empty list indicates that this feed will not search any additional sources for packages. - :type upstream_sources: list of :class:`UpstreamSource ` + :type upstream_sources: list of :class:`UpstreamSource ` """ _attribute_map = { @@ -274,7 +301,7 @@ class FeedView(Model): A view on top of a feed. :param _links: Related REST links. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param id: Id of the view. :type id: str :param name: Name of the view. @@ -311,7 +338,7 @@ class GlobalPermission(Model): Permissions for feed service-wide operations such as the creation of new feeds. :param identity_descriptor: Identity of the user with the provided Role. - :type identity_descriptor: :class:`str ` + :type identity_descriptor: :class:`str ` :param identity_id: IdentityId corresponding to the IdentityDescriptor :type identity_id: str :param role: Role associated with the Identity. @@ -374,7 +401,7 @@ class MinimalPackageVersion(Model): :type is_deleted: bool :param is_latest: True if this is the latest version of the package by package type sort order. :type is_latest: bool - :param is_listed: (NuGet Only) True if this package is listed. + :param is_listed: (NuGet and Cargo Only) True if this package is listed. :type is_listed: bool :param normalized_version: Normalized version using normalization rules specific to a package type. :type normalized_version: str @@ -387,7 +414,7 @@ class MinimalPackageVersion(Model): :param version: Display version. :type version: str :param views: List of views containing this package version. - :type views: list of :class:`FeedView ` + :type views: list of :class:`FeedView ` """ _attribute_map = { @@ -455,7 +482,7 @@ class Package(Model): A package, which is a container for one or more package versions. :param _links: Related REST links. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param id: Id of the package. :type id: str :param is_cached: Used for legacy scenarios and may be removed in future versions. @@ -471,7 +498,7 @@ class Package(Model): :param url: Url for this package. :type url: str :param versions: All versions for this package within its feed. - :type versions: list of :class:`MinimalPackageVersion ` + :type versions: list of :class:`MinimalPackageVersion ` """ _attribute_map = { @@ -499,6 +526,56 @@ def __init__(self, _links=None, id=None, is_cached=None, name=None, normalized_n self.versions = versions +class PackageChange(Model): + """ + A single change to a feed's packages. + + :param package: Package that was changed. + :type package: :class:`Package ` + :param package_version_change: Change that was performed on a package version. + :type package_version_change: :class:`PackageVersionChange ` + """ + + _attribute_map = { + 'package': {'key': 'package', 'type': 'Package'}, + 'package_version_change': {'key': 'packageVersionChange', 'type': 'PackageVersionChange'} + } + + def __init__(self, package=None, package_version_change=None): + super(PackageChange, self).__init__() + self.package = package + self.package_version_change = package_version_change + + +class PackageChangesResponse(Model): + """ + A set of change operations to a feed's packages. + + :param _links: Related REST links. + :type _links: :class:`ReferenceLinks ` + :param count: Number of changes in this batch. + :type count: int + :param next_package_continuation_token: Token that should be used in future calls for this feed to retrieve new changes. + :type next_package_continuation_token: long + :param package_changes: List of changes. + :type package_changes: list of :class:`PackageChange ` + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'count': {'key': 'count', 'type': 'int'}, + 'next_package_continuation_token': {'key': 'nextPackageContinuationToken', 'type': 'long'}, + 'package_changes': {'key': 'packageChanges', 'type': '[PackageChange]'} + } + + def __init__(self, _links=None, count=None, next_package_continuation_token=None, package_changes=None): + super(PackageChangesResponse, self).__init__() + self._links = _links + self.count = count + self.next_package_continuation_token = next_package_continuation_token + self.package_changes = package_changes + + class PackageDependency(Model): """ A dependency on another package version. @@ -529,11 +606,11 @@ class PackageFile(Model): A package file for a specific package version, only relevant to package types that contain multiple files per version. :param children: Hierarchical representation of files. - :type children: list of :class:`PackageFile ` + :type children: list of :class:`PackageFile ` :param name: File name. :type name: str :param protocol_metadata: Extended data unique to a specific package type. - :type protocol_metadata: :class:`ProtocolMetadata ` + :type protocol_metadata: :class:`ProtocolMetadata ` """ _attribute_map = { @@ -549,56 +626,6 @@ def __init__(self, children=None, name=None, protocol_metadata=None): self.protocol_metadata = protocol_metadata -class PackageChange(Model): - """ - A single change to a feed's packages. - - :param package: Package that was changed. - :type package: :class:`Package ` - :param package_version_change: Change that was performed on a package version. - :type package_version_change: :class:`PackageVersionChange ` - """ - - _attribute_map = { - 'package': {'key': 'package', 'type': 'Package'}, - 'package_version_change': {'key': 'packageVersionChange', 'type': 'PackageVersionChange'} - } - - def __init__(self, package=None, package_version_change=None): - super(PackageChange, self).__init__() - self.package = package - self.package_version_change = package_version_change - - -class PackageChangesResponse(Model): - """ - A set of change operations to a feed's packages. - - :param _links: Related REST links. - :type _links: :class:`ReferenceLinks ` - :param count: Number of changes in this batch. - :type count: int - :param next_package_continuation_token: Token that should be used in future calls for this feed to retrieve new changes. - :type next_package_continuation_token: long - :param package_changes: List of changes. - :type package_changes: list of :class:`PackageChange ` - """ - - _attribute_map = { - '_links': {'key': '_links', 'type': 'ReferenceLinks'}, - 'count': {'key': 'count', 'type': 'int'}, - 'next_package_continuation_token': {'key': 'nextPackageContinuationToken', 'type': 'long'}, - 'package_changes': {'key': 'packageChanges', 'type': '[PackageChange]'} - } - - def __init__(self, _links=None, count=None, next_package_continuation_token=None, package_changes=None): - super(PackageChangesResponse, self).__init__() - self._links = _links - self.count = count - self.next_package_continuation_token = next_package_continuation_token - self.package_changes = package_changes - - class PackageMetrics(Model): """ All metrics for a certain package id @@ -659,7 +686,7 @@ class PackageVersion(MinimalPackageVersion): :type is_deleted: bool :param is_latest: True if this is the latest version of the package by package type sort order. :type is_latest: bool - :param is_listed: (NuGet Only) True if this package is listed. + :param is_listed: (NuGet and Cargo Only) True if this package is listed. :type is_listed: bool :param normalized_version: Normalized version using normalization rules specific to a package type. :type normalized_version: str @@ -672,25 +699,25 @@ class PackageVersion(MinimalPackageVersion): :param version: Display version. :type version: str :param views: List of views containing this package version. - :type views: list of :class:`FeedView ` + :type views: list of :class:`FeedView ` :param _links: Related links - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param author: Package version author. :type author: str :param deleted_date: UTC date that this package version was deleted. :type deleted_date: datetime :param dependencies: List of dependencies for this package version. - :type dependencies: list of :class:`PackageDependency ` + :type dependencies: list of :class:`PackageDependency ` :param description: Package version description. :type description: str :param files: Files associated with this package version, only relevant for multi-file package types. - :type files: list of :class:`PackageFile ` + :type files: list of :class:`PackageFile ` :param other_versions: Other versions of this package. - :type other_versions: list of :class:`MinimalPackageVersion ` + :type other_versions: list of :class:`MinimalPackageVersion ` :param protocol_metadata: Extended data specific to a package type. - :type protocol_metadata: :class:`ProtocolMetadata ` + :type protocol_metadata: :class:`ProtocolMetadata ` :param source_chain: List of upstream sources through which a package version moved to land in this feed. - :type source_chain: list of :class:`UpstreamSource ` + :type source_chain: list of :class:`UpstreamSource ` :param summary: Package version summary. :type summary: str :param tags: Package version tags. @@ -746,24 +773,24 @@ class PackageVersionChange(Model): """ A change to a single package version. - :param continuation_token: Token marker for this change, allowing the caller to send this value back to the service and receive changes beyond this one. - :type continuation_token: long :param change_type: The type of change that was performed. :type change_type: object + :param continuation_token: Token marker for this change, allowing the caller to send this value back to the service and receive changes beyond this one. + :type continuation_token: long :param package_version: Package version that was changed. - :type package_version: :class:`PackageVersion ` + :type package_version: :class:`PackageVersion ` """ _attribute_map = { - 'continuation_token': {'key': 'continuationToken', 'type': 'long'}, 'change_type': {'key': 'changeType', 'type': 'object'}, + 'continuation_token': {'key': 'continuationToken', 'type': 'long'}, 'package_version': {'key': 'packageVersion', 'type': 'PackageVersion'} } - def __init__(self, continuation_token=None, change_type=None, package_version=None): + def __init__(self, change_type=None, continuation_token=None, package_version=None): super(PackageVersionChange, self).__init__() - self.continuation_token = continuation_token self.change_type = change_type + self.continuation_token = continuation_token self.package_version = package_version @@ -828,7 +855,7 @@ class PackageVersionProvenance(Model): :param package_version_id: Id of the package version (GUID Id, not name). :type package_version_id: str :param provenance: Provenance information for this package version. - :type provenance: :class:`Provenance ` + :type provenance: :class:`Provenance ` """ _attribute_map = { @@ -933,7 +960,7 @@ class RecycleBinPackageVersion(PackageVersion): :type is_deleted: bool :param is_latest: True if this is the latest version of the package by package type sort order. :type is_latest: bool - :param is_listed: (NuGet Only) True if this package is listed. + :param is_listed: (NuGet and Cargo Only) True if this package is listed. :type is_listed: bool :param normalized_version: Normalized version using normalization rules specific to a package type. :type normalized_version: str @@ -946,25 +973,25 @@ class RecycleBinPackageVersion(PackageVersion): :param version: Display version. :type version: str :param views: List of views containing this package version. - :type views: list of :class:`FeedView ` + :type views: list of :class:`FeedView ` :param _links: Related links - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param author: Package version author. :type author: str :param deleted_date: UTC date that this package version was deleted. :type deleted_date: datetime :param dependencies: List of dependencies for this package version. - :type dependencies: list of :class:`PackageDependency ` + :type dependencies: list of :class:`PackageDependency ` :param description: Package version description. :type description: str :param files: Files associated with this package version, only relevant for multi-file package types. - :type files: list of :class:`PackageFile ` + :type files: list of :class:`PackageFile ` :param other_versions: Other versions of this package. - :type other_versions: list of :class:`MinimalPackageVersion ` + :type other_versions: list of :class:`MinimalPackageVersion ` :param protocol_metadata: Extended data specific to a package type. - :type protocol_metadata: :class:`ProtocolMetadata ` + :type protocol_metadata: :class:`ProtocolMetadata ` :param source_chain: List of upstream sources through which a package version moved to land in this feed. - :type source_chain: list of :class:`UpstreamSource ` + :type source_chain: list of :class:`UpstreamSource ` :param summary: Package version summary. :type summary: str :param tags: Package version tags. @@ -1056,7 +1083,7 @@ class UpstreamSource(Model): :param status: Specifies the status of the upstream. :type status: object :param status_details: Provides a human-readable reason for the status of the upstream. - :type status_details: list of :class:`UpstreamStatusDetail ` + :type status_details: list of :class:`UpstreamStatusDetail ` :param upstream_source_type: Source type, such as Public or Internal. :type upstream_source_type: object """ @@ -1132,19 +1159,19 @@ class Feed(FeedCore): :param name: A name for the feed. feed names must follow these rules: Must not exceed 64 characters Must not contain whitespaces Must not start with an underscore or a period Must not end with a period Must not contain any of the following illegal characters: , |, /, \\, ?, :, &, $, *, \", #, [, ] ]]> :type name: str :param project: The project that this feed is associated with. - :type project: :class:`ProjectReference ` - :param upstream_enabled: OBSOLETE: This should always be true. Setting to false will override all sources in UpstreamSources. + :type project: :class:`ProjectReference ` + :param upstream_enabled: This should always be true. Setting to false will override all sources in UpstreamSources. :type upstream_enabled: bool :param upstream_sources: A list of sources that this feed will fetch packages from. An empty list indicates that this feed will not search any additional sources for packages. - :type upstream_sources: list of :class:`UpstreamSource ` + :type upstream_sources: list of :class:`UpstreamSource ` :param view: Definition of the view. - :type view: :class:`FeedView ` + :type view: :class:`FeedView ` :param view_id: View Id. :type view_id: str :param view_name: View name. :type view_name: str :param _links: Related REST links. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param badges_enabled: If set, this feed supports generation of package badges. :type badges_enabled: bool :param default_view_id: The view that the feed administrator has indicated is the default experience for readers. @@ -1158,7 +1185,7 @@ class Feed(FeedCore): :param permanent_deleted_date: The date that this feed was permanently deleted. :type permanent_deleted_date: datetime :param permissions: Explicit permissions for the feed. - :type permissions: list of :class:`FeedPermission ` + :type permissions: list of :class:`FeedPermission ` :param scheduled_permanent_delete_date: The date that this feed is scheduled to be permanently deleted. :type scheduled_permanent_delete_date: datetime :param upstream_enabled_changed_date: If set, time that the UpstreamEnabled property was changed. Will be null if UpstreamEnabled was never changed after Feed creation. @@ -1212,9 +1239,10 @@ def __init__(self, allow_upstream_name_conflict=None, capabilities=None, fully_q __all__ = [ 'FeedBatchData', 'FeedBatchOperationData', - 'FeedCore', 'FeedChange', 'FeedChangesResponse', + 'FeedCore', + 'FeedIdsResult', 'FeedPermission', 'FeedRetentionPolicy', 'FeedUpdate', @@ -1224,10 +1252,10 @@ def __init__(self, allow_upstream_name_conflict=None, capabilities=None, fully_q 'MinimalPackageVersion', 'OperationReference', 'Package', - 'PackageDependency', - 'PackageFile', 'PackageChange', 'PackageChangesResponse', + 'PackageDependency', + 'PackageFile', 'PackageMetrics', 'PackageMetricsQuery', 'PackageVersion', diff --git a/azure-devops/azure/devops/v7_0/file_container/__init__.py b/azure-devops/azure/devops/v7_2/file_container/__init__.py similarity index 100% rename from azure-devops/azure/devops/v7_0/file_container/__init__.py rename to azure-devops/azure/devops/v7_2/file_container/__init__.py diff --git a/azure-devops/azure/devops/v7_0/file_container/file_container_client.py b/azure-devops/azure/devops/v7_2/file_container/file_container_client.py similarity index 75% rename from azure-devops/azure/devops/v7_0/file_container/file_container_client.py rename to azure-devops/azure/devops/v7_2/file_container/file_container_client.py index 52478bf5..ea94a69e 100644 --- a/azure-devops/azure/devops/v7_0/file_container/file_container_client.py +++ b/azure-devops/azure/devops/v7_2/file_container/file_container_client.py @@ -27,8 +27,8 @@ def __init__(self, base_url=None, creds=None): def create_items(self, items, container_id, scope=None): """CreateItems. - [Preview API] Creates the specified items in in the referenced container. - :param :class:` ` items: + [Preview API] Creates the specified items in the referenced container. + :param :class:` ` items: :param int container_id: :param str scope: A guid representing the scope of the container. This is often the project id. :rtype: [FileContainerItem] @@ -42,7 +42,7 @@ def create_items(self, items, container_id, scope=None): content = self._serialize.body(items, 'VssJsonCollectionWrapper') response = self._send(http_method='POST', location_id='e4f5c81e-e250-447b-9fef-bd48471bea5e', - version='7.0-preview.4', + version='7.2-preview.4', route_values=route_values, query_parameters=query_parameters, content=content) @@ -65,7 +65,7 @@ def delete_item(self, container_id, item_path, scope=None): query_parameters['scope'] = self._serialize.query('scope', scope, 'str') self._send(http_method='DELETE', location_id='e4f5c81e-e250-447b-9fef-bd48471bea5e', - version='7.0-preview.4', + version='7.2-preview.4', route_values=route_values, query_parameters=query_parameters) @@ -83,24 +83,25 @@ def get_containers(self, scope=None, artifact_uris=None): query_parameters['artifactUris'] = self._serialize.query('artifact_uris', artifact_uris, 'str') response = self._send(http_method='GET', location_id='e4f5c81e-e250-447b-9fef-bd48471bea5e', - version='7.0-preview.4', + version='7.2-preview.4', query_parameters=query_parameters) return self._deserialize('[FileContainer]', self._unwrap_collection(response)) - def get_items(self, container_id, scope=None, item_path=None, metadata=None, format=None, download_file_name=None, include_download_tickets=None, is_shallow=None, ignore_requested_media_type=None, include_blob_metadata=None, save_absolute_path=None): + def get_items(self, container_id, scope=None, item_path=None, metadata=None, format=None, download_file_name=None, include_download_tickets=None, is_shallow=None, ignore_requested_media_type=None, include_blob_metadata=None, save_absolute_path=None, prefer_redirect=None): """GetItems. - [Preview API] - :param long container_id: - :param str scope: - :param str item_path: - :param bool metadata: - :param str format: - :param str download_file_name: + [Preview API] Gets the specified file container object in a format dependent upon the given parameters or HTTP Accept request header + :param long container_id: The requested container Id + :param str scope: A guid representing the scope of the container. This is often the project id. + :param str item_path: The path to the item of interest + :param bool metadata: If true, this overrides any specified format parameter or HTTP Accept request header to provide non-recursive information for the given itemPath + :param str format: If specified, this overrides the HTTP Accept request header to return either 'json' or 'zip'. If $format is specified, then api-version should also be specified as a query parameter. + :param str download_file_name: If specified and returning other than JSON format, then this download name will be used (else defaults to itemPath) :param bool include_download_tickets: - :param bool is_shallow: - :param bool ignore_requested_media_type: + :param bool is_shallow: If true, returns only immediate children(files & folders) for the given itemPath. False will return all items recursively within itemPath. + :param bool ignore_requested_media_type: Set to true to ignore the HTTP Accept request header. Default is false. :param bool include_blob_metadata: - :param bool save_absolute_path: + :param bool save_absolute_path: Set to false to not save the absolute path to the specified directory of the artifact in the returned archive. Works only for artifact directories. Default is true. + :param bool prefer_redirect: Set to true to get the redirect response which leads to the stream with content. Default is false. :rtype: [FileContainerItem] """ route_values = {} @@ -127,9 +128,11 @@ def get_items(self, container_id, scope=None, item_path=None, metadata=None, for query_parameters['includeBlobMetadata'] = self._serialize.query('include_blob_metadata', include_blob_metadata, 'bool') if save_absolute_path is not None: query_parameters['saveAbsolutePath'] = self._serialize.query('save_absolute_path', save_absolute_path, 'bool') + if prefer_redirect is not None: + query_parameters['preferRedirect'] = self._serialize.query('prefer_redirect', prefer_redirect, 'bool') response = self._send(http_method='GET', location_id='e4f5c81e-e250-447b-9fef-bd48471bea5e', - version='7.0-preview.4', + version='7.2-preview.4', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[FileContainerItem]', self._unwrap_collection(response)) diff --git a/azure-devops/azure/devops/v7_0/file_container/models.py b/azure-devops/azure/devops/v7_2/file_container/models.py similarity index 99% rename from azure-devops/azure/devops/v7_0/file_container/models.py rename to azure-devops/azure/devops/v7_2/file_container/models.py index a6480f3d..163b5c5e 100644 --- a/azure-devops/azure/devops/v7_0/file_container/models.py +++ b/azure-devops/azure/devops/v7_2/file_container/models.py @@ -118,7 +118,7 @@ class FileContainerItem(Model): :param artifact_id: Id for Blobstore reference :type artifact_id: long :param blob_metadata: - :type blob_metadata: :class:`ContainerItemBlobReference ` + :type blob_metadata: :class:`ContainerItemBlobReference ` :param container_id: Container Id. :type container_id: long :param content_id: diff --git a/azure-devops/azure/devops/v7_0/gallery/__init__.py b/azure-devops/azure/devops/v7_2/gallery/__init__.py similarity index 100% rename from azure-devops/azure/devops/v7_0/gallery/__init__.py rename to azure-devops/azure/devops/v7_2/gallery/__init__.py diff --git a/azure-devops/azure/devops/v7_0/gallery/gallery_client.py b/azure-devops/azure/devops/v7_2/gallery/gallery_client.py similarity index 89% rename from azure-devops/azure/devops/v7_0/gallery/gallery_client.py rename to azure-devops/azure/devops/v7_2/gallery/gallery_client.py index 703269cd..2ee683b7 100644 --- a/azure-devops/azure/devops/v7_0/gallery/gallery_client.py +++ b/azure-devops/azure/devops/v7_2/gallery/gallery_client.py @@ -38,7 +38,7 @@ def share_extension_by_id(self, extension_id, account_name): route_values['accountName'] = self._serialize.url('account_name', account_name, 'str') self._send(http_method='POST', location_id='1f19631b-a0b4-4a03-89c2-d79785d24360', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) def unshare_extension_by_id(self, extension_id, account_name): @@ -54,7 +54,7 @@ def unshare_extension_by_id(self, extension_id, account_name): route_values['accountName'] = self._serialize.url('account_name', account_name, 'str') self._send(http_method='DELETE', location_id='1f19631b-a0b4-4a03-89c2-d79785d24360', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) def share_extension(self, publisher_name, extension_name, account_name): @@ -73,7 +73,7 @@ def share_extension(self, publisher_name, extension_name, account_name): route_values['accountName'] = self._serialize.url('account_name', account_name, 'str') self._send(http_method='POST', location_id='a1e66d8f-f5de-4d16-8309-91a4e015ee46', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) def unshare_extension(self, publisher_name, extension_name, account_name): @@ -92,7 +92,7 @@ def unshare_extension(self, publisher_name, extension_name, account_name): route_values['accountName'] = self._serialize.url('account_name', account_name, 'str') self._send(http_method='DELETE', location_id='a1e66d8f-f5de-4d16-8309-91a4e015ee46', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) def get_acquisition_options(self, item_id, installation_target, test_commerce=None, is_free_or_trial_install=None): @@ -102,7 +102,7 @@ def get_acquisition_options(self, item_id, installation_target, test_commerce=No :param str installation_target: :param bool test_commerce: :param bool is_free_or_trial_install: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if item_id is not None: @@ -116,7 +116,7 @@ def get_acquisition_options(self, item_id, installation_target, test_commerce=No query_parameters['isFreeOrTrialInstall'] = self._serialize.query('is_free_or_trial_install', is_free_or_trial_install, 'bool') response = self._send(http_method='GET', location_id='9d0a0105-075e-4760-aa15-8bcf54d1bd7d', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('AcquisitionOptions', response) @@ -124,13 +124,13 @@ def get_acquisition_options(self, item_id, installation_target, test_commerce=No def request_acquisition(self, acquisition_request): """RequestAcquisition. [Preview API] - :param :class:` ` acquisition_request: - :rtype: :class:` ` + :param :class:` ` acquisition_request: + :rtype: :class:` ` """ content = self._serialize.body(acquisition_request, 'ExtensionAcquisitionRequest') response = self._send(http_method='POST', location_id='3adb1f2d-e328-446e-be73-9f6d98071c45', - version='7.0-preview.1', + version='7.2-preview.1', content=content) return self._deserialize('ExtensionAcquisitionRequest', response) @@ -165,7 +165,7 @@ def get_asset_by_name(self, publisher_name, extension_name, version, asset_type, additional_headers['X-Market-AccountToken'] = account_token_header response = self._send(http_method='GET', location_id='7529171f-a002-4180-93ba-685f358a0482', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters, additional_headers=additional_headers, @@ -204,7 +204,7 @@ def get_asset(self, extension_id, version, asset_type, account_token=None, accep additional_headers['X-Market-AccountToken'] = account_token_header response = self._send(http_method='GET', location_id='5d545f3d-ef47-488b-8be3-f5ee1517856c', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters, additional_headers=additional_headers, @@ -243,7 +243,7 @@ def get_asset_authenticated(self, publisher_name, extension_name, version, asset additional_headers['X-Market-AccountToken'] = account_token_header response = self._send(http_method='GET', location_id='506aff36-2622-4f70-8063-77cce6366d20', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters, additional_headers=additional_headers, @@ -259,7 +259,7 @@ def associate_azure_publisher(self, publisher_name, azure_publisher_id): [Preview API] :param str publisher_name: :param str azure_publisher_id: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if publisher_name is not None: @@ -269,7 +269,7 @@ def associate_azure_publisher(self, publisher_name, azure_publisher_id): query_parameters['azurePublisherId'] = self._serialize.query('azure_publisher_id', azure_publisher_id, 'str') response = self._send(http_method='PUT', location_id='efd202a6-9d87-4ebc-9229-d2b8ae2fdb6d', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('AzurePublisher', response) @@ -278,14 +278,14 @@ def query_associated_azure_publisher(self, publisher_name): """QueryAssociatedAzurePublisher. [Preview API] :param str publisher_name: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if publisher_name is not None: route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') response = self._send(http_method='GET', location_id='efd202a6-9d87-4ebc-9229-d2b8ae2fdb6d', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) return self._deserialize('AzurePublisher', response) @@ -300,7 +300,7 @@ def get_categories(self, languages=None): query_parameters['languages'] = self._serialize.query('languages', languages, 'str') response = self._send(http_method='GET', location_id='e0a5a71e-3ac3-43a0-ae7d-0bb5c3046a2a', - version='7.0-preview.1', + version='7.2-preview.1', query_parameters=query_parameters) return self._deserialize('[str]', self._unwrap_collection(response)) @@ -310,7 +310,7 @@ def get_category_details(self, category_name, languages=None, product=None): :param str category_name: :param str languages: :param str product: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if category_name is not None: @@ -322,7 +322,7 @@ def get_category_details(self, category_name, languages=None, product=None): query_parameters['product'] = self._serialize.query('product', product, 'str') response = self._send(http_method='GET', location_id='75d3c04d-84d2-4973-acd2-22627587dabc', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('CategoriesResult', response) @@ -338,7 +338,7 @@ def get_category_tree(self, product, category_id, lcid=None, source=None, produc :param str skus: :param str sub_skus: :param str product_architecture: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if product is not None: @@ -360,7 +360,7 @@ def get_category_tree(self, product, category_id, lcid=None, source=None, produc query_parameters['productArchitecture'] = self._serialize.query('product_architecture', product_architecture, 'str') response = self._send(http_method='GET', location_id='1102bb42-82b0-4955-8d8a-435d6b4cedd3', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('ProductCategory', response) @@ -374,7 +374,7 @@ def get_root_categories(self, product, lcid=None, source=None, product_version=N :param str product_version: :param str skus: :param str sub_skus: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if product is not None: @@ -392,7 +392,7 @@ def get_root_categories(self, product, lcid=None, source=None, product_version=N query_parameters['subSkus'] = self._serialize.query('sub_skus', sub_skus, 'str') response = self._send(http_method='GET', location_id='31fba831-35b2-46f6-a641-d05de5a877d8', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('ProductCategoriesResult', response) @@ -414,7 +414,7 @@ def get_certificate(self, publisher_name, extension_name, version=None, **kwargs route_values['version'] = self._serialize.url('version', version, 'str') response = self._send(http_method='GET', location_id='e905ad6a-3f1f-4d08-9f6d-7d357ff8b7d0', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, accept_media_type='application/octet-stream') if "callback" in kwargs: @@ -437,7 +437,7 @@ def get_content_verification_log(self, publisher_name, extension_name, **kwargs) route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') response = self._send(http_method='GET', location_id='c0f1c7c4-3557-4ffb-b774-1e48c4865e99', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, accept_media_type='application/octet-stream') if "callback" in kwargs: @@ -449,12 +449,12 @@ def get_content_verification_log(self, publisher_name, extension_name, **kwargs) def create_support_request(self, customer_support_request): """CreateSupportRequest. [Preview API] - :param :class:` ` customer_support_request: + :param :class:` ` customer_support_request: """ content = self._serialize.body(customer_support_request, 'CustomerSupportRequest') self._send(http_method='POST', location_id='8eded385-026a-4c15-b810-b8eb402771f1', - version='7.0-preview.1', + version='7.2-preview.1', content=content) def create_draft_for_edit_extension(self, publisher_name, extension_name): @@ -462,7 +462,7 @@ def create_draft_for_edit_extension(self, publisher_name, extension_name): [Preview API] :param str publisher_name: :param str extension_name: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if publisher_name is not None: @@ -471,18 +471,18 @@ def create_draft_for_edit_extension(self, publisher_name, extension_name): route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') response = self._send(http_method='POST', location_id='02b33873-4e61-496e-83a2-59d1df46b7d8', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) return self._deserialize('ExtensionDraft', response) def perform_edit_extension_draft_operation(self, draft_patch, publisher_name, extension_name, draft_id): """PerformEditExtensionDraftOperation. [Preview API] - :param :class:` ` draft_patch: + :param :class:` ` draft_patch: :param str publisher_name: :param str extension_name: :param str draft_id: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if publisher_name is not None: @@ -494,7 +494,7 @@ def perform_edit_extension_draft_operation(self, draft_patch, publisher_name, ex content = self._serialize.body(draft_patch, 'ExtensionDraftPatch') response = self._send(http_method='PATCH', location_id='02b33873-4e61-496e-83a2-59d1df46b7d8', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('ExtensionDraft', response) @@ -507,7 +507,7 @@ def update_payload_in_draft_for_edit_extension(self, upload_stream, publisher_na :param str extension_name: :param str draft_id: :param String file_name: Header to pass the filename of the uploaded data - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if publisher_name is not None: @@ -526,7 +526,7 @@ def update_payload_in_draft_for_edit_extension(self, upload_stream, publisher_na content = self._client.stream_upload(upload_stream, callback=callback) response = self._send(http_method='PUT', location_id='02b33873-4e61-496e-83a2-59d1df46b7d8', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, additional_headers=additional_headers, content=content, @@ -541,7 +541,7 @@ def add_asset_for_edit_extension_draft(self, upload_stream, publisher_name, exte :param str extension_name: :param str draft_id: :param str asset_type: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if publisher_name is not None: @@ -559,7 +559,7 @@ def add_asset_for_edit_extension_draft(self, upload_stream, publisher_name, exte content = self._client.stream_upload(upload_stream, callback=callback) response = self._send(http_method='PUT', location_id='f1db9c47-6619-4998-a7e5-d7f9f41a4617', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, content=content, media_type='application/octet-stream') @@ -572,7 +572,7 @@ def create_draft_for_new_extension(self, upload_stream, publisher_name, product, :param str publisher_name: :param String product: Header to pass the product type of the payload file :param String file_name: Header to pass the filename of the uploaded data - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if publisher_name is not None: @@ -589,7 +589,7 @@ def create_draft_for_new_extension(self, upload_stream, publisher_name, product, content = self._client.stream_upload(upload_stream, callback=callback) response = self._send(http_method='POST', location_id='b3ab127d-ebb9-4d22-b611-4e09593c8d79', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, additional_headers=additional_headers, content=content, @@ -599,10 +599,10 @@ def create_draft_for_new_extension(self, upload_stream, publisher_name, product, def perform_new_extension_draft_operation(self, draft_patch, publisher_name, draft_id): """PerformNewExtensionDraftOperation. [Preview API] - :param :class:` ` draft_patch: + :param :class:` ` draft_patch: :param str publisher_name: :param str draft_id: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if publisher_name is not None: @@ -612,7 +612,7 @@ def perform_new_extension_draft_operation(self, draft_patch, publisher_name, dra content = self._serialize.body(draft_patch, 'ExtensionDraftPatch') response = self._send(http_method='PATCH', location_id='b3ab127d-ebb9-4d22-b611-4e09593c8d79', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('ExtensionDraft', response) @@ -624,7 +624,7 @@ def update_payload_in_draft_for_new_extension(self, upload_stream, publisher_nam :param str publisher_name: :param str draft_id: :param String file_name: Header to pass the filename of the uploaded data - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if publisher_name is not None: @@ -641,7 +641,7 @@ def update_payload_in_draft_for_new_extension(self, upload_stream, publisher_nam content = self._client.stream_upload(upload_stream, callback=callback) response = self._send(http_method='PUT', location_id='b3ab127d-ebb9-4d22-b611-4e09593c8d79', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, additional_headers=additional_headers, content=content, @@ -655,7 +655,7 @@ def add_asset_for_new_extension_draft(self, upload_stream, publisher_name, draft :param str publisher_name: :param str draft_id: :param str asset_type: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if publisher_name is not None: @@ -671,7 +671,7 @@ def add_asset_for_new_extension_draft(self, upload_stream, publisher_name, draft content = self._client.stream_upload(upload_stream, callback=callback) response = self._send(http_method='PUT', location_id='88c0b1c8-b4f1-498a-9b2a-8446ef9f32e7', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, content=content, media_type='application/octet-stream') @@ -698,7 +698,7 @@ def get_asset_from_edit_extension_draft(self, publisher_name, draft_id, asset_ty query_parameters['extensionName'] = self._serialize.query('extension_name', extension_name, 'str') response = self._send(http_method='GET', location_id='88c0b1c8-b4f1-498a-9b2a-8446ef9f32e7', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters, accept_media_type='application/octet-stream') @@ -725,7 +725,7 @@ def get_asset_from_new_extension_draft(self, publisher_name, draft_id, asset_typ route_values['assetType'] = self._serialize.url('asset_type', asset_type, 'str') response = self._send(http_method='GET', location_id='88c0b1c8-b4f1-498a-9b2a-8446ef9f32e7', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, accept_media_type='application/octet-stream') if "callback" in kwargs: @@ -743,7 +743,7 @@ def get_extension_events(self, publisher_name, extension_name, count=None, after :param datetime after_date: Fetch events that occurred on or after this date :param str include: Filter options. Supported values: install, uninstall, review, acquisition, sales. Default is to fetch all types of events :param str include_property: Event properties to include. Currently only 'lastContactDetails' is supported for uninstall events - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if publisher_name is not None: @@ -761,7 +761,7 @@ def get_extension_events(self, publisher_name, extension_name, count=None, after query_parameters['includeProperty'] = self._serialize.query('include_property', include_property, 'str') response = self._send(http_method='GET', location_id='3d13c499-2168-4d06-bef4-14aba185dcd5', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('ExtensionEvents', response) @@ -774,16 +774,16 @@ def publish_extension_events(self, extension_events): content = self._serialize.body(extension_events, '[ExtensionEvents]') self._send(http_method='POST', location_id='0bf2bd3a-70e0-4d5d-8bf7-bd4a9c2ab6e7', - version='7.0-preview.1', + version='7.2-preview.1', content=content) def query_extensions(self, extension_query, account_token=None, account_token_header=None): """QueryExtensions. [Preview API] - :param :class:` ` extension_query: + :param :class:` ` extension_query: :param str account_token: :param String account_token_header: Header to pass the account token - :rtype: :class:` ` + :rtype: :class:` ` """ query_parameters = {} if account_token is not None: @@ -794,7 +794,7 @@ def query_extensions(self, extension_query, account_token=None, account_token_he content = self._serialize.body(extension_query, 'ExtensionQuery') response = self._send(http_method='POST', location_id='eb9d5ee1-6d43-456b-b80e-8a96fbc014b6', - version='7.0-preview.1', + version='7.2-preview.1', query_parameters=query_parameters, additional_headers=additional_headers, content=content) @@ -806,7 +806,7 @@ def create_extension(self, upload_stream, extension_type=None, re_captcha_token= :param object upload_stream: Stream to upload :param str extension_type: :param str re_captcha_token: - :rtype: :class:` ` + :rtype: :class:` ` """ query_parameters = {} if extension_type is not None: @@ -820,7 +820,7 @@ def create_extension(self, upload_stream, extension_type=None, re_captcha_token= content = self._client.stream_upload(upload_stream, callback=callback) response = self._send(http_method='POST', location_id='a41192c8-9525-4b58-bc86-179fa549d80d', - version='7.0-preview.2', + version='7.2-preview.2', query_parameters=query_parameters, content=content, media_type='application/octet-stream') @@ -840,7 +840,7 @@ def delete_extension_by_id(self, extension_id, version=None): query_parameters['version'] = self._serialize.query('version', version, 'str') self._send(http_method='DELETE', location_id='a41192c8-9525-4b58-bc86-179fa549d80d', - version='7.0-preview.2', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters) @@ -850,7 +850,7 @@ def get_extension_by_id(self, extension_id, version=None, flags=None): :param str extension_id: :param str version: :param str flags: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if extension_id is not None: @@ -862,7 +862,7 @@ def get_extension_by_id(self, extension_id, version=None, flags=None): query_parameters['flags'] = self._serialize.query('flags', flags, 'str') response = self._send(http_method='GET', location_id='a41192c8-9525-4b58-bc86-179fa549d80d', - version='7.0-preview.2', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters) return self._deserialize('PublishedExtension', response) @@ -872,7 +872,7 @@ def update_extension_by_id(self, extension_id, re_captcha_token=None): [Preview API] :param str extension_id: :param str re_captcha_token: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if extension_id is not None: @@ -882,7 +882,7 @@ def update_extension_by_id(self, extension_id, re_captcha_token=None): query_parameters['reCaptchaToken'] = self._serialize.query('re_captcha_token', re_captcha_token, 'str') response = self._send(http_method='PUT', location_id='a41192c8-9525-4b58-bc86-179fa549d80d', - version='7.0-preview.2', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters) return self._deserialize('PublishedExtension', response) @@ -894,7 +894,7 @@ def create_extension_with_publisher(self, upload_stream, publisher_name, extensi :param str publisher_name: :param str extension_type: :param str re_captcha_token: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if publisher_name is not None: @@ -911,7 +911,7 @@ def create_extension_with_publisher(self, upload_stream, publisher_name, extensi content = self._client.stream_upload(upload_stream, callback=callback) response = self._send(http_method='POST', location_id='e11ea35a-16fe-4b80-ab11-c4cab88a0966', - version='7.0-preview.2', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters, content=content, @@ -935,7 +935,7 @@ def delete_extension(self, publisher_name, extension_name, version=None): query_parameters['version'] = self._serialize.query('version', version, 'str') self._send(http_method='DELETE', location_id='e11ea35a-16fe-4b80-ab11-c4cab88a0966', - version='7.0-preview.2', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters) @@ -948,7 +948,7 @@ def get_extension(self, publisher_name, extension_name, version=None, flags=None :param str flags: :param str account_token: :param String account_token_header: Header to pass the account token - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if publisher_name is not None: @@ -967,7 +967,7 @@ def get_extension(self, publisher_name, extension_name, version=None, flags=None additional_headers['X-Market-AccountToken'] = account_token_header response = self._send(http_method='GET', location_id='e11ea35a-16fe-4b80-ab11-c4cab88a0966', - version='7.0-preview.2', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters, additional_headers=additional_headers) @@ -982,7 +982,7 @@ def update_extension(self, upload_stream, publisher_name, extension_name, extens :param str extension_type: :param str re_captcha_token: :param bool bypass_scope_check: This parameter decides if the scope change check needs to be invoked or not - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if publisher_name is not None: @@ -1003,7 +1003,7 @@ def update_extension(self, upload_stream, publisher_name, extension_name, extens content = self._client.stream_upload(upload_stream, callback=callback) response = self._send(http_method='PUT', location_id='e11ea35a-16fe-4b80-ab11-c4cab88a0966', - version='7.0-preview.2', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters, content=content, @@ -1016,7 +1016,7 @@ def update_extension_properties(self, publisher_name, extension_name, flags): :param str publisher_name: :param str extension_name: :param str flags: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if publisher_name is not None: @@ -1028,7 +1028,7 @@ def update_extension_properties(self, publisher_name, extension_name, flags): query_parameters['flags'] = self._serialize.query('flags', flags, 'str') response = self._send(http_method='PATCH', location_id='e11ea35a-16fe-4b80-ab11-c4cab88a0966', - version='7.0-preview.2', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters) return self._deserialize('PublishedExtension', response) @@ -1052,7 +1052,7 @@ def share_extension_with_host(self, publisher_name, extension_name, host_type, h route_values['hostName'] = self._serialize.url('host_name', host_name, 'str') self._send(http_method='POST', location_id='328a3af8-d124-46e9-9483-01690cd415b9', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) def unshare_extension_with_host(self, publisher_name, extension_name, host_type, host_name): @@ -1074,29 +1074,29 @@ def unshare_extension_with_host(self, publisher_name, extension_name, host_type, route_values['hostName'] = self._serialize.url('host_name', host_name, 'str') self._send(http_method='DELETE', location_id='328a3af8-d124-46e9-9483-01690cd415b9', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) def extension_validator(self, azure_rest_api_request_model): """ExtensionValidator. - [Preview API] - :param :class:` ` azure_rest_api_request_model: + [Preview API] Rest end point to validate if an Azure publisher owns an extension for 3rd party commerce scenario. Azure only supports POST operations and the above signature is not typical of the REST operations. http://sharepoint/sites/AzureUX/_layouts/15/WopiFrame2.aspx?sourcedoc={A793D31E-6DC6-4174-8FA3-DE3F82B51642}&file=Data%20Market%20Partner%20integration%20with%20Marketplace%20service.docx&action=default + :param :class:` ` azure_rest_api_request_model: All the parameters are sent in the request body """ content = self._serialize.body(azure_rest_api_request_model, 'AzureRestApiRequestModel') self._send(http_method='POST', location_id='05e8a5e1-8c59-4c2c-8856-0ff087d1a844', - version='7.0-preview.1', + version='7.2-preview.1', content=content) def send_notifications(self, notification_data): """SendNotifications. [Preview API] Send Notification - :param :class:` ` notification_data: Denoting the data needed to send notification + :param :class:` ` notification_data: Denoting the data needed to send notification """ content = self._serialize.body(notification_data, 'NotificationsData') self._send(http_method='POST', location_id='eab39817-413c-4602-a49f-07ad00844980', - version='7.0-preview.1', + version='7.2-preview.1', content=content) def get_package(self, publisher_name, extension_name, version, account_token=None, accept_default=None, account_token_header=None, **kwargs): @@ -1127,7 +1127,7 @@ def get_package(self, publisher_name, extension_name, version, account_token=Non additional_headers['X-Market-AccountToken'] = account_token_header response = self._send(http_method='GET', location_id='7cb576f8-1cae-4c4b-b7b1-e4af5759e965', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters, additional_headers=additional_headers, @@ -1172,7 +1172,7 @@ def get_asset_with_token(self, publisher_name, extension_name, version, asset_ty additional_headers['X-Market-AccountToken'] = account_token_header response = self._send(http_method='GET', location_id='364415a1-0077-4a41-a7a0-06edd4497492', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters, additional_headers=additional_headers, @@ -1197,7 +1197,7 @@ def delete_publisher_asset(self, publisher_name, asset_type=None): query_parameters['assetType'] = self._serialize.query('asset_type', asset_type, 'str') self._send(http_method='DELETE', location_id='21143299-34f9-4c62-8ca8-53da691192f9', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) @@ -1216,7 +1216,7 @@ def get_publisher_asset(self, publisher_name, asset_type=None, **kwargs): query_parameters['assetType'] = self._serialize.query('asset_type', asset_type, 'str') response = self._send(http_method='GET', location_id='21143299-34f9-4c62-8ca8-53da691192f9', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters, accept_media_type='application/octet-stream') @@ -1251,7 +1251,7 @@ def update_publisher_asset(self, upload_stream, publisher_name, asset_type=None, content = self._client.stream_upload(upload_stream, callback=callback) response = self._send(http_method='PUT', location_id='21143299-34f9-4c62-8ca8-53da691192f9', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters, additional_headers=additional_headers, @@ -1270,7 +1270,7 @@ def fetch_domain_token(self, publisher_name): route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') response = self._send(http_method='GET', location_id='67a609ef-fa74-4b52-8664-78d76f7b3634', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) return self._deserialize('str', response) @@ -1284,32 +1284,32 @@ def verify_domain_token(self, publisher_name): route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') self._send(http_method='PUT', location_id='67a609ef-fa74-4b52-8664-78d76f7b3634', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) def query_publishers(self, publisher_query): """QueryPublishers. [Preview API] - :param :class:` ` publisher_query: - :rtype: :class:` ` + :param :class:` ` publisher_query: + :rtype: :class:` ` """ content = self._serialize.body(publisher_query, 'PublisherQuery') response = self._send(http_method='POST', location_id='2ad6ee0a-b53f-4034-9d1d-d009fda1212e', - version='7.0-preview.1', + version='7.2-preview.1', content=content) return self._deserialize('PublisherQueryResult', response) def create_publisher(self, publisher): """CreatePublisher. [Preview API] - :param :class:` ` publisher: - :rtype: :class:` ` + :param :class:` ` publisher: + :rtype: :class:` ` """ content = self._serialize.body(publisher, 'Publisher') response = self._send(http_method='POST', location_id='4ddec66a-e4f6-4f5d-999e-9e77710d7ff4', - version='7.0-preview.1', + version='7.2-preview.1', content=content) return self._deserialize('Publisher', response) @@ -1323,7 +1323,7 @@ def delete_publisher(self, publisher_name): route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') self._send(http_method='DELETE', location_id='4ddec66a-e4f6-4f5d-999e-9e77710d7ff4', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) def get_publisher(self, publisher_name, flags=None): @@ -1331,7 +1331,7 @@ def get_publisher(self, publisher_name, flags=None): [Preview API] :param str publisher_name: :param int flags: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if publisher_name is not None: @@ -1341,7 +1341,7 @@ def get_publisher(self, publisher_name, flags=None): query_parameters['flags'] = self._serialize.query('flags', flags, 'int') response = self._send(http_method='GET', location_id='4ddec66a-e4f6-4f5d-999e-9e77710d7ff4', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('Publisher', response) @@ -1349,9 +1349,9 @@ def get_publisher(self, publisher_name, flags=None): def update_publisher(self, publisher, publisher_name): """UpdatePublisher. [Preview API] - :param :class:` ` publisher: + :param :class:` ` publisher: :param str publisher_name: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if publisher_name is not None: @@ -1359,7 +1359,7 @@ def update_publisher(self, publisher, publisher_name): content = self._serialize.body(publisher, 'Publisher') response = self._send(http_method='PUT', location_id='4ddec66a-e4f6-4f5d-999e-9e77710d7ff4', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('Publisher', response) @@ -1381,12 +1381,64 @@ def update_publisher_members(self, role_assignments, publisher_name, limit_to_ca content = self._serialize.body(role_assignments, '[PublisherUserRoleAssignmentRef]') response = self._send(http_method='POST', location_id='4ddec66a-e4f6-4f5d-999e-9e77710d7ff4', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters, content=content) return self._deserialize('[PublisherRoleAssignment]', self._unwrap_collection(response)) + def publish_extension_with_publisher_signature(self, upload_stream, publisher_name, extension_name, extension_type=None, re_captcha_token=None, bypass_scope_check=None, **kwargs): + """PublishExtensionWithPublisherSignature. + [Preview API] + :param object upload_stream: Stream to upload + :param str publisher_name: + :param str extension_name: + :param str extension_type: + :param str re_captcha_token: + :param bool bypass_scope_check: + :rtype: :class:` ` + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + query_parameters = {} + if extension_type is not None: + query_parameters['extensionType'] = self._serialize.query('extension_type', extension_type, 'str') + if re_captcha_token is not None: + query_parameters['reCaptchaToken'] = self._serialize.query('re_captcha_token', re_captcha_token, 'str') + if bypass_scope_check is not None: + query_parameters['bypassScopeCheck'] = self._serialize.query('bypass_scope_check', bypass_scope_check, 'bool') + if "callback" in kwargs: + callback = kwargs["callback"] + else: + callback = None + content = self._client.stream_upload(upload_stream, callback=callback) + response = self._send(http_method='PUT', + location_id='e11ea35a-16fe-4b80-ab11-c4cab88a0969', + version='7.2-preview.1', + route_values=route_values, + query_parameters=query_parameters, + content=content, + media_type='multipart/related') + return self._deserialize('PublishedExtension', response) + + def get_publisher_without_token(self, publisher_name): + """GetPublisherWithoutToken. + [Preview API] + :param str publisher_name: + :rtype: :class:` ` + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + response = self._send(http_method='GET', + location_id='215a2ed8-458a-4850-ad5a-45f1dabc3461', + version='7.2-preview.1', + route_values=route_values) + return self._deserialize('Publisher', response) + def get_questions(self, publisher_name, extension_name, count=None, page=None, after_date=None): """GetQuestions. [Preview API] Returns a list of questions with their responses associated with an extension. @@ -1395,7 +1447,7 @@ def get_questions(self, publisher_name, extension_name, count=None, page=None, a :param int count: Number of questions to retrieve (defaults to 10). :param int page: Page number from which set of questions are to be retrieved. :param datetime after_date: If provided, results questions are returned which were posted after this date - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if publisher_name is not None: @@ -1411,7 +1463,7 @@ def get_questions(self, publisher_name, extension_name, count=None, page=None, a query_parameters['afterDate'] = self._serialize.query('after_date', after_date, 'iso-8601') response = self._send(http_method='GET', location_id='c010d03d-812c-4ade-ae07-c1862475eda5', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('QuestionsResult', response) @@ -1419,11 +1471,11 @@ def get_questions(self, publisher_name, extension_name, count=None, page=None, a def report_question(self, concern, pub_name, ext_name, question_id): """ReportQuestion. [Preview API] Flags a concern with an existing question for an extension. - :param :class:` ` concern: User reported concern with a question for the extension. + :param :class:` ` concern: User reported concern with a question for the extension. :param str pub_name: Name of the publisher who published the extension. :param str ext_name: Name of the extension. :param long question_id: Identifier of the question to be updated for the extension. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if pub_name is not None: @@ -1435,7 +1487,7 @@ def report_question(self, concern, pub_name, ext_name, question_id): content = self._serialize.body(concern, 'Concern') response = self._send(http_method='POST', location_id='784910cd-254a-494d-898b-0728549b2f10', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('Concern', response) @@ -1443,10 +1495,10 @@ def report_question(self, concern, pub_name, ext_name, question_id): def create_question(self, question, publisher_name, extension_name): """CreateQuestion. [Preview API] Creates a new question for an extension. - :param :class:` ` question: Question to be created for the extension. + :param :class:` ` question: Question to be created for the extension. :param str publisher_name: Name of the publisher who published the extension. :param str extension_name: Name of the extension. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if publisher_name is not None: @@ -1456,7 +1508,7 @@ def create_question(self, question, publisher_name, extension_name): content = self._serialize.body(question, 'Question') response = self._send(http_method='POST', location_id='6d1d9741-eca8-4701-a3a5-235afc82dfa4', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('Question', response) @@ -1477,17 +1529,17 @@ def delete_question(self, publisher_name, extension_name, question_id): route_values['questionId'] = self._serialize.url('question_id', question_id, 'long') self._send(http_method='DELETE', location_id='6d1d9741-eca8-4701-a3a5-235afc82dfa4', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) def update_question(self, question, publisher_name, extension_name, question_id): """UpdateQuestion. [Preview API] Updates an existing question for an extension. - :param :class:` ` question: Updated question to be set for the extension. + :param :class:` ` question: Updated question to be set for the extension. :param str publisher_name: Name of the publisher who published the extension. :param str extension_name: Name of the extension. :param long question_id: Identifier of the question to be updated for the extension. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if publisher_name is not None: @@ -1499,7 +1551,7 @@ def update_question(self, question, publisher_name, extension_name, question_id) content = self._serialize.body(question, 'Question') response = self._send(http_method='PATCH', location_id='6d1d9741-eca8-4701-a3a5-235afc82dfa4', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('Question', response) @@ -1507,11 +1559,11 @@ def update_question(self, question, publisher_name, extension_name, question_id) def create_response(self, response, publisher_name, extension_name, question_id): """CreateResponse. [Preview API] Creates a new response for a given question for an extension. - :param :class:` ` response: Response to be created for the extension. + :param :class:` ` response: Response to be created for the extension. :param str publisher_name: Name of the publisher who published the extension. :param str extension_name: Name of the extension. :param long question_id: Identifier of the question for which response is to be created for the extension. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if publisher_name is not None: @@ -1523,7 +1575,7 @@ def create_response(self, response, publisher_name, extension_name, question_id) content = self._serialize.body(response, 'Response') response = self._send(http_method='POST', location_id='7f8ae5e0-46b0-438f-b2e8-13e8513517bd', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('Response', response) @@ -1547,18 +1599,18 @@ def delete_response(self, publisher_name, extension_name, question_id, response_ route_values['responseId'] = self._serialize.url('response_id', response_id, 'long') self._send(http_method='DELETE', location_id='7f8ae5e0-46b0-438f-b2e8-13e8513517bd', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) def update_response(self, response, publisher_name, extension_name, question_id, response_id): """UpdateResponse. [Preview API] Updates an existing response for a given question for an extension. - :param :class:` ` response: Updated response to be set for the extension. + :param :class:` ` response: Updated response to be set for the extension. :param str publisher_name: Name of the publisher who published the extension. :param str extension_name: Name of the extension. :param long question_id: Identifier of the question for which response is to be updated for the extension. :param long response_id: Identifier of the response which has to be updated. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if publisher_name is not None: @@ -1572,7 +1624,7 @@ def update_response(self, response, publisher_name, extension_name, question_id, content = self._serialize.body(response, 'Response') response = self._send(http_method='PATCH', location_id='7f8ae5e0-46b0-438f-b2e8-13e8513517bd', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('Response', response) @@ -1601,7 +1653,7 @@ def get_extension_reports(self, publisher_name, extension_name, days=None, count query_parameters['afterDate'] = self._serialize.query('after_date', after_date, 'iso-8601') response = self._send(http_method='GET', location_id='79e0c74f-157f-437e-845f-74fbb4121d4c', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('object', response) @@ -1615,7 +1667,7 @@ def get_reviews(self, publisher_name, extension_name, count=None, filter_options :param str filter_options: FilterOptions to filter out empty reviews etcetera, defaults to none :param datetime before_date: Use if you want to fetch reviews older than the specified date, defaults to null :param datetime after_date: Use if you want to fetch reviews newer than the specified date, defaults to null - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if publisher_name is not None: @@ -1633,7 +1685,7 @@ def get_reviews(self, publisher_name, extension_name, count=None, filter_options query_parameters['afterDate'] = self._serialize.query('after_date', after_date, 'iso-8601') response = self._send(http_method='GET', location_id='5b3f819f-f247-42ad-8c00-dd9ab9ab246d', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('ReviewsResult', response) @@ -1645,7 +1697,7 @@ def get_reviews_summary(self, pub_name, ext_name, before_date=None, after_date=N :param str ext_name: Name of the extension :param datetime before_date: Use if you want to fetch summary of reviews older than the specified date, defaults to null :param datetime after_date: Use if you want to fetch summary of reviews newer than the specified date, defaults to null - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if pub_name is not None: @@ -1659,7 +1711,7 @@ def get_reviews_summary(self, pub_name, ext_name, before_date=None, after_date=N query_parameters['afterDate'] = self._serialize.query('after_date', after_date, 'iso-8601') response = self._send(http_method='GET', location_id='b7b44e21-209e-48f0-ae78-04727fc37d77', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('ReviewSummary', response) @@ -1667,10 +1719,10 @@ def get_reviews_summary(self, pub_name, ext_name, before_date=None, after_date=N def create_review(self, review, pub_name, ext_name): """CreateReview. [Preview API] Creates a new review for an extension - :param :class:` ` review: Review to be created for the extension + :param :class:` ` review: Review to be created for the extension :param str pub_name: Name of the publisher who published the extension :param str ext_name: Name of the extension - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if pub_name is not None: @@ -1680,7 +1732,7 @@ def create_review(self, review, pub_name, ext_name): content = self._serialize.body(review, 'Review') response = self._send(http_method='POST', location_id='e6e85b9d-aa70-40e6-aa28-d0fbf40b91a3', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('Review', response) @@ -1701,17 +1753,17 @@ def delete_review(self, pub_name, ext_name, review_id): route_values['reviewId'] = self._serialize.url('review_id', review_id, 'long') self._send(http_method='DELETE', location_id='e6e85b9d-aa70-40e6-aa28-d0fbf40b91a3', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) def update_review(self, review_patch, pub_name, ext_name, review_id): """UpdateReview. [Preview API] Updates or Flags a review - :param :class:` ` review_patch: ReviewPatch object which contains the changes to be applied to the review + :param :class:` ` review_patch: ReviewPatch object which contains the changes to be applied to the review :param str pub_name: Name of the publisher who published the extension :param str ext_name: Name of the extension :param long review_id: Id of the review which needs to be updated - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if pub_name is not None: @@ -1723,7 +1775,7 @@ def update_review(self, review_patch, pub_name, ext_name, review_id): content = self._serialize.body(review_patch, 'ReviewPatch') response = self._send(http_method='PATCH', location_id='e6e85b9d-aa70-40e6-aa28-d0fbf40b91a3', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('ReviewPatch', response) @@ -1731,13 +1783,13 @@ def update_review(self, review_patch, pub_name, ext_name, review_id): def create_category(self, category): """CreateCategory. [Preview API] - :param :class:` ` category: - :rtype: :class:` ` + :param :class:` ` category: + :rtype: :class:` ` """ content = self._serialize.body(category, 'ExtensionCategory') response = self._send(http_method='POST', location_id='476531a3-7024-4516-a76a-ed64d3008ad6', - version='7.0-preview.1', + version='7.2-preview.1', content=content) return self._deserialize('ExtensionCategory', response) @@ -1755,7 +1807,7 @@ def get_gallery_user_settings(self, user_scope, key=None): route_values['key'] = self._serialize.url('key', key, 'str') response = self._send(http_method='GET', location_id='9b75ece3-7960-401c-848b-148ac01ca350', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) return self._deserialize('{object}', self._unwrap_collection(response)) @@ -1771,7 +1823,7 @@ def set_gallery_user_settings(self, entries, user_scope): content = self._serialize.body(entries, '{object}') self._send(http_method='PATCH', location_id='9b75ece3-7960-401c-848b-148ac01ca350', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, content=content) @@ -1789,7 +1841,7 @@ def generate_key(self, key_type, expire_current_seconds=None): query_parameters['expireCurrentSeconds'] = self._serialize.query('expire_current_seconds', expire_current_seconds, 'int') self._send(http_method='POST', location_id='92ed5cf4-c38b-465a-9059-2f2fb7c624b5', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) @@ -1804,14 +1856,14 @@ def get_signing_key(self, key_type): route_values['keyType'] = self._serialize.url('key_type', key_type, 'str') response = self._send(http_method='GET', location_id='92ed5cf4-c38b-465a-9059-2f2fb7c624b5', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) return self._deserialize('str', response) def update_extension_statistics(self, extension_statistics_update, publisher_name, extension_name): """UpdateExtensionStatistics. [Preview API] - :param :class:` ` extension_statistics_update: + :param :class:` ` extension_statistics_update: :param str publisher_name: :param str extension_name: """ @@ -1823,7 +1875,7 @@ def update_extension_statistics(self, extension_statistics_update, publisher_nam content = self._serialize.body(extension_statistics_update, 'ExtensionStatisticUpdate') self._send(http_method='PATCH', location_id='a0ea3204-11e9-422d-a9ca-45851cc41400', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, content=content) @@ -1835,7 +1887,7 @@ def get_extension_daily_stats(self, publisher_name, extension_name, days=None, a :param int days: :param str aggregate: :param datetime after_date: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if publisher_name is not None: @@ -1851,7 +1903,7 @@ def get_extension_daily_stats(self, publisher_name, extension_name, days=None, a query_parameters['afterDate'] = self._serialize.query('after_date', after_date, 'iso-8601') response = self._send(http_method='GET', location_id='ae06047e-51c5-4fb4-ab65-7be488544416', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('ExtensionDailyStats', response) @@ -1862,7 +1914,7 @@ def get_extension_daily_stats_anonymous(self, publisher_name, extension_name, ve :param str publisher_name: Name of the publisher :param str extension_name: Name of the extension :param str version: Version of the extension - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if publisher_name is not None: @@ -1873,7 +1925,7 @@ def get_extension_daily_stats_anonymous(self, publisher_name, extension_name, ve route_values['version'] = self._serialize.url('version', version, 'str') response = self._send(http_method='GET', location_id='4fa7adb6-ca65-4075-a232-5f28323288ea', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) return self._deserialize('ExtensionDailyStats', response) @@ -1900,7 +1952,7 @@ def increment_extension_daily_stat(self, publisher_name, extension_name, version query_parameters['targetPlatform'] = self._serialize.query('target_platform', target_platform, 'str') self._send(http_method='POST', location_id='4fa7adb6-ca65-4075-a232-5f28323288ea', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) @@ -1925,7 +1977,7 @@ def get_verification_log(self, publisher_name, extension_name, version, target_p query_parameters['targetPlatform'] = self._serialize.query('target_platform', target_platform, 'str') response = self._send(http_method='GET', location_id='c5523abe-b843-437f-875b-5833064efe4d', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters, accept_media_type='application/octet-stream') @@ -1951,6 +2003,6 @@ def update_vSCode_web_extension_statistics(self, item_name, version, stat_type): route_values['statType'] = self._serialize.url('stat_type', stat_type, 'VSCodeWebExtensionStatisicsType') self._send(http_method='POST', location_id='205c91a8-7841-4fd3-ae4f-5a745d5a8df5', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) diff --git a/azure-devops/azure/devops/v7_0/gallery/models.py b/azure-devops/azure/devops/v7_2/gallery/models.py similarity index 95% rename from azure-devops/azure/devops/v7_0/gallery/models.py rename to azure-devops/azure/devops/v7_2/gallery/models.py index 2601e2dc..c0343252 100644 --- a/azure-devops/azure/devops/v7_0/gallery/models.py +++ b/azure-devops/azure/devops/v7_2/gallery/models.py @@ -11,7 +11,7 @@ class AcquisitionOperation(Model): """ - :param operation_state: State of the the AcquisitionOperation for the current user + :param operation_state: State of the AcquisitionOperation for the current user :type operation_state: object :param operation_type: AcquisitionOperationType: install, request, buy, etc... :type operation_type: object @@ -37,11 +37,11 @@ class AcquisitionOptions(Model): Market item acquisition options (install, buy, etc) for an installation target. :param default_operation: Default Operation for the ItemId in this target - :type default_operation: :class:`AcquisitionOperation ` + :type default_operation: :class:`AcquisitionOperation ` :param item_id: The item id that this options refer to :type item_id: str :param operations: Operations allowed for the ItemId in this target - :type operations: list of :class:`AcquisitionOperation ` + :type operations: list of :class:`AcquisitionOperation ` :param target: The target that this options refer to :type target: str """ @@ -83,7 +83,7 @@ def __init__(self, vs_marketplace_extension_name=None, vs_marketplace_publisher_ class AssetDetails(Model): """ :param answers: Gets or sets the Answers, which contains vs marketplace extension name and publisher name - :type answers: :class:`Answers ` + :type answers: :class:`Answers ` :param publisher_natural_identifier: Gets or sets the VS publisher Id :type publisher_natural_identifier: str """ @@ -121,7 +121,7 @@ def __init__(self, azure_publisher_id=None, publisher_name=None): class AzureRestApiRequestModel(Model): """ :param asset_details: Gets or sets the Asset details - :type asset_details: :class:`AssetDetails ` + :type asset_details: :class:`AssetDetails ` :param asset_id: Gets or sets the asset id :type asset_id: str :param asset_version: Gets or sets the asset version @@ -170,7 +170,7 @@ class CategoriesResult(Model): This is the set of categories in response to the get category query :param categories: - :type categories: list of :class:`ExtensionCategory ` + :type categories: list of :class:`ExtensionCategory ` """ _attribute_map = { @@ -225,12 +225,12 @@ class CustomerSupportRequest(Model): :type publisher_name: str :param reason: Reason for support request :type reason: str - :param re_captcha_token: + :param re_captcha_token: ReCaptcha Token :type re_captcha_token: str :param reporter_vSID: VSID of the user making the support request :type reporter_vSID: str :param review: Review under concern - :type review: :class:`Review ` + :type review: :class:`Review ` :param source_link: The UI source through which the request was made :type source_link: str """ @@ -324,7 +324,7 @@ class ExtensionAcquisitionRequest(Model): :param operation_type: The type of operation, such as install, request, purchase :type operation_type: object :param properties: Additional properties which can be added to the request. - :type properties: :class:`object ` + :type properties: :class:`object ` :param quantity: How many licenses should be purchased :type quantity: int :param targets: A list of target guids where the item should be acquired (installed, requested, etc.), such as account id @@ -386,7 +386,7 @@ class ExtensionCategory(Model): :param language: This parameter is obsolete. Refer to LanguageTitles for language specific titles :type language: str :param language_titles: The list of all the titles of this category in various languages - :type language_titles: list of :class:`CategoryLanguageTitle ` + :type language_titles: list of :class:`CategoryLanguageTitle ` :param parent_category_name: This is the internal name of the parent if this is associated with a parent :type parent_category_name: str """ @@ -413,7 +413,7 @@ def __init__(self, associated_products=None, category_id=None, category_name=Non class ExtensionDailyStat(Model): """ :param counts: Stores the event counts - :type counts: :class:`EventCounts ` + :type counts: :class:`EventCounts ` :param extended_stats: Generic key/value pair to store extended statistics. Used for sending paid extension stats like Upgrade, Downgrade, Cancel trend etc. :type extended_stats: dict :param statistic_date: Timestamp of this data point @@ -440,7 +440,7 @@ def __init__(self, counts=None, extended_stats=None, statistic_date=None, versio class ExtensionDailyStats(Model): """ :param daily_stats: List of extension statistics data points - :type daily_stats: list of :class:`ExtensionDailyStat ` + :type daily_stats: list of :class:`ExtensionDailyStat ` :param extension_id: Id of the extension, this will never be sent back to the client. For internal use only. :type extension_id: str :param extension_name: Name of the extension @@ -471,7 +471,7 @@ def __init__(self, daily_stats=None, extension_id=None, extension_name=None, pub class ExtensionDraft(Model): """ :param assets: - :type assets: list of :class:`ExtensionDraftAsset ` + :type assets: list of :class:`ExtensionDraftAsset ` :param created_date: :type created_date: datetime :param draft_state: @@ -483,7 +483,7 @@ class ExtensionDraft(Model): :param last_updated: :type last_updated: datetime :param payload: - :type payload: :class:`ExtensionPayload ` + :type payload: :class:`ExtensionPayload ` :param product: :type product: str :param publisher_name: @@ -526,7 +526,7 @@ def __init__(self, assets=None, created_date=None, draft_state=None, extension_n class ExtensionDraftPatch(Model): """ :param extension_data: - :type extension_data: :class:`UnpackagedExtensionData ` + :type extension_data: :class:`UnpackagedExtensionData ` :param operation: :type operation: object :param re_captcha_token: @@ -552,8 +552,8 @@ class ExtensionEvent(Model): :param id: Id which identifies each data point uniquely :type id: long - :param properties: - :type properties: :class:`object ` + :param properties: Generic properties container which stores the data related to each event. For well known events like uninstall, install etc. We expect the Properties object to be a List, List + :type properties: :class:`object ` :param statistic_date: Timestamp of when the event occurred :type statistic_date: datetime :param version: Version of the extension @@ -632,11 +632,11 @@ class ExtensionFilterResult(Model): The FilterResult is the set of extensions that matched a particular query filter. :param extensions: This is the set of applications that matched the query filter supplied. - :type extensions: list of :class:`PublishedExtension ` + :type extensions: list of :class:`PublishedExtension ` :param paging_token: The PagingToken is returned from a request when more records exist that match the result than were requested or could be returned. A follow-up query with this paging token can be used to retrieve more results. :type paging_token: str :param result_metadata: This is the additional optional metadata for the given result. E.g. Total count of results which is useful in case of paged results - :type result_metadata: list of :class:`ExtensionFilterResultMetadata ` + :type result_metadata: list of :class:`ExtensionFilterResultMetadata ` """ _attribute_map = { @@ -657,7 +657,7 @@ class ExtensionFilterResultMetadata(Model): ExtensionFilterResultMetadata is one set of metadata for the result e.g. Total count. There can be multiple metadata items for one metadata. :param metadata_items: The metadata items for the category - :type metadata_items: list of :class:`MetadataItem ` + :type metadata_items: list of :class:`MetadataItem ` :param metadata_type: Defines the category of metadata items :type metadata_type: str """ @@ -699,7 +699,7 @@ class ExtensionPayload(Model): :param file_name: :type file_name: str :param installation_targets: - :type installation_targets: list of :class:`InstallationTarget ` + :type installation_targets: list of :class:`InstallationTarget ` :param is_preview: :type is_preview: bool :param is_signed_by_microsoft: @@ -744,7 +744,7 @@ class ExtensionQuery(Model): :param asset_types: When retrieving extensions with a query; frequently the caller only needs a small subset of the assets. The caller may specify a list of asset types that should be returned if the extension contains it. All other assets will not be returned. :type asset_types: list of str :param filters: Each filter is a unique query and will have matching set of extensions returned from the request. Each result will have the same index in the resulting array that the filter had in the incoming query. - :type filters: list of :class:`QueryFilter ` + :type filters: list of :class:`QueryFilter ` :param flags: The Flags are used to determine which set of information the caller would like returned for the matched extensions. :type flags: object """ @@ -767,7 +767,7 @@ class ExtensionQueryResult(Model): This is the set of extensions that matched a supplied query through the filters given. :param results: For each filter supplied in the query, a filter result will be returned in the query result. - :type results: list of :class:`ExtensionFilterResult ` + :type results: list of :class:`ExtensionFilterResult ` """ _attribute_map = { @@ -834,7 +834,7 @@ class ExtensionStatisticUpdate(Model): :param publisher_name: :type publisher_name: str :param statistic: - :type statistic: :class:`ExtensionStatistic ` + :type statistic: :class:`ExtensionStatistic ` """ _attribute_map = { @@ -857,11 +857,11 @@ class ExtensionVersion(Model): :param asset_uri: :type asset_uri: str :param badges: - :type badges: list of :class:`ExtensionBadge ` + :type badges: list of :class:`ExtensionBadge ` :param fallback_asset_uri: :type fallback_asset_uri: str :param files: - :type files: list of :class:`ExtensionFile ` + :type files: list of :class:`ExtensionFile ` :param flags: :type flags: object :param last_updated: @@ -911,7 +911,7 @@ class FilterCriteria(Model): """ One condition in a QueryFilter. - :param filter_type: + :param filter_type: The FilterType defines how the filters are to be applied to the extensions. See the documentation on the filter type to understand how the filters are matched. :type filter_type: int :param value: The value used in the match based on the filter type. :type value: str @@ -931,7 +931,7 @@ def __init__(self, filter_type=None, value=None): class GraphSubjectBase(Model): """ :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. :type descriptor: str :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. @@ -958,7 +958,7 @@ def __init__(self, _links=None, descriptor=None, display_name=None, url=None): class IdentityRef(GraphSubjectBase): """ :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. :type descriptor: str :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. @@ -1096,7 +1096,7 @@ class ProductCategoriesResult(Model): This is the set of categories in response to the get category query :param categories: - :type categories: list of :class:`ProductCategory ` + :type categories: list of :class:`ProductCategory ` """ _attribute_map = { @@ -1112,10 +1112,10 @@ class ProductCategory(Model): """ This is the interface object to be used by Root Categories and Category Tree APIs for Visual Studio Ide. + :param children: + :type children: list of :class:`ProductCategory ` :param has_children: Indicator whether this is a leaf or there are children under this category :type has_children: bool - :param children: - :type children: list of :class:`ProductCategory ` :param id: Individual Guid of the Category :type id: str :param title: Category Title in the requested language @@ -1123,16 +1123,16 @@ class ProductCategory(Model): """ _attribute_map = { - 'has_children': {'key': 'hasChildren', 'type': 'bool'}, 'children': {'key': 'children', 'type': '[ProductCategory]'}, + 'has_children': {'key': 'hasChildren', 'type': 'bool'}, 'id': {'key': 'id', 'type': 'str'}, 'title': {'key': 'title', 'type': 'str'} } - def __init__(self, has_children=None, children=None, id=None, title=None): + def __init__(self, children=None, has_children=None, id=None, title=None): super(ProductCategory, self).__init__() - self.has_children = has_children self.children = children + self.has_children = has_children self.id = id self.title = title @@ -1152,7 +1152,7 @@ class PublishedExtension(Model): :param flags: :type flags: object :param installation_targets: - :type installation_targets: list of :class:`InstallationTarget ` + :type installation_targets: list of :class:`InstallationTarget ` :param last_updated: :type last_updated: datetime :param long_description: @@ -1162,19 +1162,19 @@ class PublishedExtension(Model): :param published_date: Date on which the extension was first uploaded. :type published_date: datetime :param publisher: - :type publisher: :class:`PublisherFacts ` + :type publisher: :class:`PublisherFacts ` :param release_date: Date on which the extension first went public. :type release_date: datetime :param shared_with: - :type shared_with: list of :class:`ExtensionShare ` + :type shared_with: list of :class:`ExtensionShare ` :param short_description: :type short_description: str :param statistics: - :type statistics: list of :class:`ExtensionStatistic ` + :type statistics: list of :class:`ExtensionStatistic ` :param tags: :type tags: list of str :param versions: - :type versions: list of :class:`ExtensionVersion ` + :type versions: list of :class:`ExtensionVersion ` """ _attribute_map = { @@ -1229,7 +1229,7 @@ class PublisherBase(Model): :param email_address: :type email_address: list of str :param extensions: - :type extensions: list of :class:`PublishedExtension ` + :type extensions: list of :class:`PublishedExtension ` :param flags: :type flags: object :param last_updated: @@ -1315,7 +1315,7 @@ class PublisherFilterResult(Model): The FilterResult is the set of publishers that matched a particular query filter. :param publishers: This is the set of applications that matched the query filter supplied. - :type publishers: list of :class:`Publisher ` + :type publishers: list of :class:`Publisher ` """ _attribute_map = { @@ -1332,7 +1332,7 @@ class PublisherQuery(Model): An PublisherQuery is used to search the gallery for a set of publishers that match one of many filter values. :param filters: Each filter is a unique query and will have matching set of publishers returned from the request. Each result will have the same index in the resulting array that the filter had in the incoming query. - :type filters: list of :class:`QueryFilter ` + :type filters: list of :class:`QueryFilter ` :param flags: The Flags are used to determine which set of information the caller would like returned for the matched publishers. :type flags: object """ @@ -1353,7 +1353,7 @@ class PublisherQueryResult(Model): This is the set of publishers that matched a supplied query through the filters given. :param results: For each filter supplied in the query, a filter result will be returned in the query result. - :type results: list of :class:`PublisherFilterResult ` + :type results: list of :class:`PublisherFilterResult ` """ _attribute_map = { @@ -1372,9 +1372,9 @@ class PublisherRoleAssignment(Model): :param access_display_name: User friendly description of access assignment. :type access_display_name: str :param identity: The user to whom the role is assigned. - :type identity: :class:`IdentityRef ` + :type identity: :class:`IdentityRef ` :param role: The role assigned to the user. - :type role: :class:`PublisherSecurityRole ` + :type role: :class:`PublisherSecurityRole ` """ _attribute_map = { @@ -1469,7 +1469,7 @@ class QnAItem(Model): :param updated_date: Time when the review was edited/updated :type updated_date: datetime :param user: User details for the item. - :type user: :class:`UserIdentityRef ` + :type user: :class:`UserIdentityRef ` """ _attribute_map = { @@ -1496,7 +1496,7 @@ class QueryFilter(Model): A filter used to define a set of extensions to return during a query. :param criteria: The filter values define the set of values in this query. They are applied based on the QueryFilterType. - :type criteria: list of :class:`FilterCriteria ` + :type criteria: list of :class:`FilterCriteria ` :param direction: The PagingDirection is applied to a paging token if one exists. If not the direction is ignored, and Forward from the start of the resultset is used. Direction should be left out of the request unless a paging token is used to help prevent future issues. :type direction: object :param page_number: The page number requested by the user. If not provided 1 is assumed by default. @@ -1547,11 +1547,11 @@ class Question(QnAItem): :param updated_date: Time when the review was edited/updated :type updated_date: datetime :param user: User details for the item. - :type user: :class:`UserIdentityRef ` + :type user: :class:`UserIdentityRef ` :param re_captcha_token: :type re_captcha_token: str :param responses: List of answers in for the question / thread - :type responses: list of :class:`Response ` + :type responses: list of :class:`Response ` """ _attribute_map = { @@ -1576,7 +1576,7 @@ class QuestionsResult(Model): :param has_more_questions: Flag indicating if there are more QnA threads to be shown (for paging) :type has_more_questions: bool :param questions: List of the QnA threads - :type questions: list of :class:`Question ` + :type questions: list of :class:`Question ` """ _attribute_map = { @@ -1641,7 +1641,7 @@ class Response(QnAItem): :param updated_date: Time when the review was edited/updated :type updated_date: datetime :param user: User details for the item. - :type user: :class:`UserIdentityRef ` + :type user: :class:`UserIdentityRef ` :param re_captcha_token: :type re_captcha_token: str """ @@ -1664,12 +1664,12 @@ def __init__(self, created_date=None, id=None, status=None, text=None, updated_d class Review(Model): """ :param admin_reply: Admin Reply, if any, for this review - :type admin_reply: :class:`ReviewReply ` + :type admin_reply: :class:`ReviewReply ` :param id: Unique identifier of a review item :type id: long :param is_deleted: Flag for soft deletion :type is_deleted: bool - :param is_ignored: + :param is_ignored: Flag for Ignoring Review from average rating calculation :type is_ignored: bool :param product_version: Version of the product for which review was submitted :type product_version: str @@ -1678,7 +1678,7 @@ class Review(Model): :param re_captcha_token: :type re_captcha_token: str :param reply: Reply, if any, for this review - :type reply: :class:`ReviewReply ` + :type reply: :class:`ReviewReply ` :param text: Text description of the review :type text: str :param title: Title of the review @@ -1729,9 +1729,9 @@ class ReviewPatch(Model): :param operation: Denotes the patch operation type :type operation: object :param reported_concern: Use when patch operation is FlagReview - :type reported_concern: :class:`UserReportedConcern ` + :type reported_concern: :class:`UserReportedConcern ` :param review_item: Use when patch operation is EditReview - :type review_item: :class:`Review ` + :type review_item: :class:`Review ` """ _attribute_map = { @@ -1795,7 +1795,7 @@ class ReviewsResult(Model): :param has_more_reviews: Flag indicating if there are more reviews to be shown (for paging) :type has_more_reviews: bool :param reviews: List of reviews - :type reviews: list of :class:`Review ` + :type reviews: list of :class:`Review ` :param total_review_count: Count of total review items :type total_review_count: long """ @@ -1820,7 +1820,7 @@ class ReviewSummary(Model): :param rating_count: Count of total ratings :type rating_count: long :param rating_split: Split of count across rating - :type rating_split: list of :class:`RatingCountPerRating ` + :type rating_split: list of :class:`RatingCountPerRating ` """ _attribute_map = { @@ -1849,7 +1849,7 @@ class UnpackagedExtensionData(Model): :param extension_name: :type extension_name: str :param installation_targets: - :type installation_targets: list of :class:`InstallationTarget ` + :type installation_targets: list of :class:`InstallationTarget ` :param is_converted_to_markdown: :type is_converted_to_markdown: bool :param is_preview: @@ -1982,7 +1982,7 @@ class Concern(QnAItem): :param updated_date: Time when the review was edited/updated :type updated_date: datetime :param user: User details for the item. - :type user: :class:`UserIdentityRef ` + :type user: :class:`UserIdentityRef ` :param category: Category of the concern :type category: object """ @@ -2029,7 +2029,7 @@ class Publisher(PublisherBase): :param email_address: :type email_address: list of str :param extensions: - :type extensions: list of :class:`PublishedExtension ` + :type extensions: list of :class:`PublishedExtension ` :param flags: :type flags: object :param last_updated: @@ -2045,7 +2045,7 @@ class Publisher(PublisherBase): :param state: :type state: object :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param domain: :type domain: str :param is_dns_token_verified: diff --git a/azure-devops/azure/devops/v7_0/git/__init__.py b/azure-devops/azure/devops/v7_2/git/__init__.py similarity index 96% rename from azure-devops/azure/devops/v7_0/git/__init__.py rename to azure-devops/azure/devops/v7_2/git/__init__.py index 23679ab2..a7da7312 100644 --- a/azure-devops/azure/devops/v7_0/git/__init__.py +++ b/azure-devops/azure/devops/v7_2/git/__init__.py @@ -10,7 +10,13 @@ from .git_client import GitClient __all__ = [ + 'AdvSecEnablementStatus', + 'AdvSecEnablementUpdate', 'Attachment', + 'BillableCommitter', + 'BillableCommitterDetail', + 'BillablePusher', + 'Change', 'Comment', 'CommentIterationContext', 'CommentPosition', @@ -29,9 +35,10 @@ 'GitBaseVersionDescriptor', 'GitBlobRef', 'GitBranchStats', + 'GitCherryPick', 'GitCommit', - 'GitCommitDiffs', 'GitCommitChanges', + 'GitCommitDiffs', 'GitCommitRef', 'GitConflict', 'GitConflictUpdateResult', @@ -41,7 +48,6 @@ 'GitForkRef', 'GitForkSyncRequest', 'GitForkSyncRequestParameters', - 'GitCherryPick', 'GitImportGitSource', 'GitImportRequest', 'GitImportRequestParameters', @@ -57,10 +63,10 @@ 'GitObject', 'GitPolicyConfigurationResponse', 'GitPullRequest', + 'GitPullRequestChange', 'GitPullRequestCommentThread', 'GitPullRequestCommentThreadContext', 'GitPullRequestCompletionOptions', - 'GitPullRequestChange', 'GitPullRequestIteration', 'GitPullRequestIterationChanges', 'GitPullRequestMergeOptions', @@ -97,7 +103,6 @@ 'GitVersionDescriptor', 'GlobalGitRepositoryKey', 'GraphSubjectBase', - 'Change', 'IdentityRef', 'IdentityRefWithVote', 'ImportRepositoryValidation', diff --git a/azure-devops/azure/devops/v7_0/git/git_client_base.py b/azure-devops/azure/devops/v7_2/git/git_client_base.py similarity index 87% rename from azure-devops/azure/devops/v7_0/git/git_client_base.py rename to azure-devops/azure/devops/v7_2/git/git_client_base.py index 15211618..9e3fe308 100644 --- a/azure-devops/azure/devops/v7_0/git/git_client_base.py +++ b/azure-devops/azure/devops/v7_2/git/git_client_base.py @@ -27,11 +27,11 @@ def __init__(self, base_url=None, creds=None): def create_annotated_tag(self, tag_object, project, repository_id): """CreateAnnotatedTag. - Create an annotated tag. - :param :class:` ` tag_object: Object containing details of tag to be created. + [Preview API] Create an annotated tag. + :param :class:` ` tag_object: Object containing details of tag to be created. :param str project: Project ID or project name :param str repository_id: ID or name of the repository. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -41,18 +41,18 @@ def create_annotated_tag(self, tag_object, project, repository_id): content = self._serialize.body(tag_object, 'GitAnnotatedTag') response = self._send(http_method='POST', location_id='5e8a8081-3851-4626-b677-9891cc04102e', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('GitAnnotatedTag', response) def get_annotated_tag(self, project, repository_id, object_id): """GetAnnotatedTag. - Get an annotated tag. + [Preview API] Get an annotated tag. :param str project: Project ID or project name :param str repository_id: ID or name of the repository. :param str object_id: ObjectId (Sha1Id) of tag to get. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -63,20 +63,20 @@ def get_annotated_tag(self, project, repository_id, object_id): route_values['objectId'] = self._serialize.url('object_id', object_id, 'str') response = self._send(http_method='GET', location_id='5e8a8081-3851-4626-b677-9891cc04102e', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('GitAnnotatedTag', response) def get_blob(self, repository_id, sha1, project=None, download=None, file_name=None, resolve_lfs=None): """GetBlob. - Get a single blob. + [Preview API] Get a single blob. :param str repository_id: The name or ID of the repository. :param str sha1: SHA1 hash of the file. You can get the SHA1 of a file using the "Git/Items/Get Item" endpoint. :param str project: Project ID or project name :param bool download: If true, prompt for a download rather than rendering in a browser. Note: this value defaults to true if $format is zip :param str file_name: Provide a fileName to use for a download. :param bool resolve_lfs: If true, try to resolve a blob to its LFS contents, if it's an LFS pointer file. Only compatible with octet-stream Accept headers or $format types - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -94,14 +94,14 @@ def get_blob(self, repository_id, sha1, project=None, download=None, file_name=N query_parameters['resolveLfs'] = self._serialize.query('resolve_lfs', resolve_lfs, 'bool') response = self._send(http_method='GET', location_id='7b28e929-2c99-405d-9c5c-6167a06e6816', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('GitBlobRef', response) def get_blob_content(self, repository_id, sha1, project=None, download=None, file_name=None, resolve_lfs=None, **kwargs): """GetBlobContent. - Get a single blob. + [Preview API] Get a single blob. :param str repository_id: The name or ID of the repository. :param str sha1: SHA1 hash of the file. You can get the SHA1 of a file using the "Git/Items/Get Item" endpoint. :param str project: Project ID or project name @@ -126,7 +126,7 @@ def get_blob_content(self, repository_id, sha1, project=None, download=None, fil query_parameters['resolveLfs'] = self._serialize.query('resolve_lfs', resolve_lfs, 'bool') response = self._send(http_method='GET', location_id='7b28e929-2c99-405d-9c5c-6167a06e6816', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters, accept_media_type='application/octet-stream') @@ -138,7 +138,7 @@ def get_blob_content(self, repository_id, sha1, project=None, download=None, fil def get_blobs_zip(self, blob_ids, repository_id, project=None, filename=None, **kwargs): """GetBlobsZip. - Gets one or more blobs in a zip file download. + [Preview API] Gets one or more blobs in a zip file download. :param [str] blob_ids: Blob IDs (SHA1 hashes) to be returned in the zip file. :param str repository_id: The name or ID of the repository. :param str project: Project ID or project name @@ -156,7 +156,7 @@ def get_blobs_zip(self, blob_ids, repository_id, project=None, filename=None, ** content = self._serialize.body(blob_ids, '[str]') response = self._send(http_method='POST', location_id='7b28e929-2c99-405d-9c5c-6167a06e6816', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters, content=content, @@ -169,7 +169,7 @@ def get_blobs_zip(self, blob_ids, repository_id, project=None, filename=None, ** def get_blob_zip(self, repository_id, sha1, project=None, download=None, file_name=None, resolve_lfs=None, **kwargs): """GetBlobZip. - Get a single blob. + [Preview API] Get a single blob. :param str repository_id: The name or ID of the repository. :param str sha1: SHA1 hash of the file. You can get the SHA1 of a file using the "Git/Items/Get Item" endpoint. :param str project: Project ID or project name @@ -194,7 +194,7 @@ def get_blob_zip(self, repository_id, sha1, project=None, download=None, file_na query_parameters['resolveLfs'] = self._serialize.query('resolve_lfs', resolve_lfs, 'bool') response = self._send(http_method='GET', location_id='7b28e929-2c99-405d-9c5c-6167a06e6816', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters, accept_media_type='application/zip') @@ -206,12 +206,12 @@ def get_blob_zip(self, repository_id, sha1, project=None, download=None, file_na def get_branch(self, repository_id, name, project=None, base_version_descriptor=None): """GetBranch. - Retrieve statistics about a single branch. + [Preview API] Retrieve statistics about a single branch. :param str repository_id: The name or ID of the repository. :param str name: Name of the branch. :param str project: Project ID or project name - :param :class:` ` base_version_descriptor: Identifies the commit or branch to use as the base. - :rtype: :class:` ` + :param :class:` ` base_version_descriptor: Identifies the commit or branch to use as the base. + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -230,17 +230,17 @@ def get_branch(self, repository_id, name, project=None, base_version_descriptor= query_parameters['baseVersionDescriptor.versionOptions'] = base_version_descriptor.version_options response = self._send(http_method='GET', location_id='d5b216de-d8d5-4d32-ae76-51df755b16d3', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters) return self._deserialize('GitBranchStats', response) def get_branches(self, repository_id, project=None, base_version_descriptor=None): """GetBranches. - Retrieve statistics about all branches within a repository. + [Preview API] Retrieve statistics about all branches within a repository. :param str repository_id: The name or ID of the repository. :param str project: Project ID or project name - :param :class:` ` base_version_descriptor: Identifies the commit or branch to use as the base. + :param :class:` ` base_version_descriptor: Identifies the commit or branch to use as the base. :rtype: [GitBranchStats] """ route_values = {} @@ -258,22 +258,116 @@ def get_branches(self, repository_id, project=None, base_version_descriptor=None query_parameters['baseVersionDescriptor.versionOptions'] = base_version_descriptor.version_options response = self._send(http_method='GET', location_id='d5b216de-d8d5-4d32-ae76-51df755b16d3', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[GitBranchStats]', self._unwrap_collection(response)) + def get_changes(self, commit_id, repository_id, project=None, top=None, skip=None): + """GetChanges. + [Preview API] Retrieve changes for a particular commit. + :param str commit_id: The id of the commit. + :param str repository_id: The id or friendly name of the repository. To use the friendly name, projectId must also be specified. + :param str project: Project ID or project name + :param int top: The maximum number of changes to return. + :param int skip: The number of changes to skip. + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if commit_id is not None: + route_values['commitId'] = self._serialize.url('commit_id', commit_id, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + query_parameters = {} + if top is not None: + query_parameters['top'] = self._serialize.query('top', top, 'int') + if skip is not None: + query_parameters['skip'] = self._serialize.query('skip', skip, 'int') + response = self._send(http_method='GET', + location_id='5bf884f5-3e07-42e9-afb8-1b872267bf16', + version='7.2-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('GitCommitChanges', response) + + def create_cherry_pick(self, cherry_pick_to_create, project, repository_id): + """CreateCherryPick. + [Preview API] Cherry pick a specific commit or commits that are associated to a pull request into a new branch. + :param :class:` ` cherry_pick_to_create: + :param str project: Project ID or project name + :param str repository_id: ID of the repository. + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + content = self._serialize.body(cherry_pick_to_create, 'GitAsyncRefOperationParameters') + response = self._send(http_method='POST', + location_id='033bad68-9a14-43d1-90e0-59cb8856fef6', + version='7.2-preview.2', + route_values=route_values, + content=content) + return self._deserialize('GitCherryPick', response) + + def get_cherry_pick(self, project, cherry_pick_id, repository_id): + """GetCherryPick. + [Preview API] Retrieve information about a cherry pick operation by cherry pick Id. + :param str project: Project ID or project name + :param int cherry_pick_id: ID of the cherry pick. + :param str repository_id: ID of the repository. + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if cherry_pick_id is not None: + route_values['cherryPickId'] = self._serialize.url('cherry_pick_id', cherry_pick_id, 'int') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + response = self._send(http_method='GET', + location_id='033bad68-9a14-43d1-90e0-59cb8856fef6', + version='7.2-preview.2', + route_values=route_values) + return self._deserialize('GitCherryPick', response) + + def get_cherry_pick_for_ref_name(self, project, repository_id, ref_name): + """GetCherryPickForRefName. + [Preview API] Retrieve information about a cherry pick operation for a specific branch. This operation is expensive due to the underlying object structure, so this API only looks at the 1000 most recent cherry pick operations. + :param str project: Project ID or project name + :param str repository_id: ID of the repository. + :param str ref_name: The GitAsyncRefOperationParameters generatedRefName used for the cherry pick operation. + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + query_parameters = {} + if ref_name is not None: + query_parameters['refName'] = self._serialize.query('ref_name', ref_name, 'str') + response = self._send(http_method='GET', + location_id='033bad68-9a14-43d1-90e0-59cb8856fef6', + version='7.2-preview.2', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('GitCherryPick', response) + def get_commit_diffs(self, repository_id, project=None, diff_common_commit=None, top=None, skip=None, base_version_descriptor=None, target_version_descriptor=None): """GetCommitDiffs. - Find the closest common commit (the merge base) between base and target commits, and get the diff between either the base and target commits or common and target commits. + [Preview API] Find the closest common commit (the merge base) between base and target commits, and get the diff between either the base and target commits or common and target commits. :param str repository_id: The name or ID of the repository. :param str project: Project ID or project name :param bool diff_common_commit: If true, diff between common and target commits. If false, diff between base and target commits. :param int top: Maximum number of changes to return. Defaults to 100. :param int skip: Number of changes to skip - :param :class:` ` base_version_descriptor: Descriptor for base commit. - :param :class:` ` target_version_descriptor: Descriptor for target commit. - :rtype: :class:` ` + :param :class:` ` base_version_descriptor: Descriptor for base commit. + :param :class:` ` target_version_descriptor: Descriptor for target commit. + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -303,19 +397,19 @@ def get_commit_diffs(self, repository_id, project=None, diff_common_commit=None, query_parameters['targetVersionOptions'] = target_version_descriptor.target_version_options response = self._send(http_method='GET', location_id='615588d5-c0c7-4b88-88f8-e625306446e8', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('GitCommitDiffs', response) def get_commit(self, commit_id, repository_id, project=None, change_count=None): """GetCommit. - Retrieve a particular commit. + [Preview API] Retrieve a particular commit. :param str commit_id: The id of the commit. :param str repository_id: The id or friendly name of the repository. To use the friendly name, projectId must also be specified. :param str project: Project ID or project name :param int change_count: The number of changes to include in the result. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -329,16 +423,16 @@ def get_commit(self, commit_id, repository_id, project=None, change_count=None): query_parameters['changeCount'] = self._serialize.query('change_count', change_count, 'int') response = self._send(http_method='GET', location_id='c2570c3b-5b3f-41b8-98bf-5407bfde8d58', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters) return self._deserialize('GitCommit', response) def get_commits(self, repository_id, search_criteria, project=None, skip=None, top=None): """GetCommits. - Retrieve git commits for a project + [Preview API] Retrieve git commits for a project :param str repository_id: The id or friendly name of the repository. To use the friendly name, projectId must also be specified. - :param :class:` ` search_criteria: + :param :class:` ` search_criteria: :param str project: Project ID or project name :param int skip: :param int top: @@ -405,14 +499,14 @@ def get_commits(self, repository_id, search_criteria, project=None, skip=None, t query_parameters['$top'] = self._serialize.query('top', top, 'int') response = self._send(http_method='GET', location_id='c2570c3b-5b3f-41b8-98bf-5407bfde8d58', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[GitCommitRef]', self._unwrap_collection(response)) def get_push_commits(self, repository_id, push_id, project=None, top=None, skip=None, include_links=None): """GetPushCommits. - Retrieve a list of commits associated with a particular push. + [Preview API] Retrieve a list of commits associated with a particular push. :param str repository_id: The id or friendly name of the repository. To use the friendly name, projectId must also be specified. :param int push_id: The id of the push. :param str project: Project ID or project name @@ -437,19 +531,19 @@ def get_push_commits(self, repository_id, push_id, project=None, top=None, skip= query_parameters['includeLinks'] = self._serialize.query('include_links', include_links, 'bool') response = self._send(http_method='GET', location_id='c2570c3b-5b3f-41b8-98bf-5407bfde8d58', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[GitCommitRef]', self._unwrap_collection(response)) def get_commits_batch(self, search_criteria, repository_id, project=None, skip=None, top=None, include_statuses=None): """GetCommitsBatch. - Retrieve git commits for a project matching the search criteria - :param :class:` ` search_criteria: Search options + [Preview API] Retrieve git commits for a project matching the search criteria + :param :class:` ` search_criteria: Search options :param str repository_id: The name or ID of the repository. :param str project: Project ID or project name - :param int skip: Number of commits to skip. - :param int top: Maximum number of commits to return. + :param int skip: Number of commits to skip. The value cannot exceed 3,000,000. + :param int top: Maximum number of commits to return. The value cannot exceed 50,000. :param bool include_statuses: True to include additional commit status information. :rtype: [GitCommitRef] """ @@ -468,7 +562,7 @@ def get_commits_batch(self, search_criteria, repository_id, project=None, skip=N content = self._serialize.body(search_criteria, 'GitQueryCommitsCriteria') response = self._send(http_method='POST', location_id='6400dfb2-0bcb-462b-b992-5a57f8f1416c', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters, content=content) @@ -476,7 +570,7 @@ def get_commits_batch(self, search_criteria, repository_id, project=None, skip=N def get_deleted_repositories(self, project): """GetDeletedRepositories. - Retrieve deleted git repositories. + [Preview API] Retrieve deleted git repositories. :param str project: Project ID or project name :rtype: [GitDeletedRepository] """ @@ -485,13 +579,13 @@ def get_deleted_repositories(self, project): route_values['project'] = self._serialize.url('project', project, 'str') response = self._send(http_method='GET', location_id='2b6869c4-cb25-42b5-b7a3-0d3e6be0a11a', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('[GitDeletedRepository]', self._unwrap_collection(response)) def get_forks(self, repository_name_or_id, collection_id, project=None, include_links=None): """GetForks. - Retrieve all forks of a repository in the collection. + [Preview API] Retrieve all forks of a repository in the collection. :param str repository_name_or_id: The name or ID of the repository. :param str collection_id: Team project collection ID. :param str project: Project ID or project name @@ -510,19 +604,19 @@ def get_forks(self, repository_name_or_id, collection_id, project=None, include_ query_parameters['includeLinks'] = self._serialize.query('include_links', include_links, 'bool') response = self._send(http_method='GET', location_id='158c0340-bf6f-489c-9625-d572a1480d57', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[GitRepositoryRef]', self._unwrap_collection(response)) def create_fork_sync_request(self, sync_params, repository_name_or_id, project=None, include_links=None): """CreateForkSyncRequest. - Request that another repository's refs be fetched into this one. It syncs two existing forks. To create a fork, please see the repositories endpoint - :param :class:` ` sync_params: Source repository and ref mapping. + [Preview API] Request that another repository's refs be fetched into this one. It syncs two existing forks. To create a fork, please see the repositories endpoint + :param :class:` ` sync_params: Source repository and ref mapping. :param str repository_name_or_id: The name or ID of the repository. :param str project: Project ID or project name :param bool include_links: True to include links - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -535,7 +629,7 @@ def create_fork_sync_request(self, sync_params, repository_name_or_id, project=N content = self._serialize.body(sync_params, 'GitForkSyncRequestParameters') response = self._send(http_method='POST', location_id='1703f858-b9d1-46af-ab62-483e9e1055b5', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters, content=content) @@ -543,12 +637,12 @@ def create_fork_sync_request(self, sync_params, repository_name_or_id, project=N def get_fork_sync_request(self, repository_name_or_id, fork_sync_operation_id, project=None, include_links=None): """GetForkSyncRequest. - Get a specific fork sync operation's details. + [Preview API] Get a specific fork sync operation's details. :param str repository_name_or_id: The name or ID of the repository. :param int fork_sync_operation_id: OperationId of the sync request. :param str project: Project ID or project name :param bool include_links: True to include links. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -562,14 +656,14 @@ def get_fork_sync_request(self, repository_name_or_id, fork_sync_operation_id, p query_parameters['includeLinks'] = self._serialize.query('include_links', include_links, 'bool') response = self._send(http_method='GET', location_id='1703f858-b9d1-46af-ab62-483e9e1055b5', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('GitForkSyncRequest', response) def get_fork_sync_requests(self, repository_name_or_id, project=None, include_abandoned=None, include_links=None): """GetForkSyncRequests. - Retrieve all requested fork sync operations on this repository. + [Preview API] Retrieve all requested fork sync operations on this repository. :param str repository_name_or_id: The name or ID of the repository. :param str project: Project ID or project name :param bool include_abandoned: True to include abandoned requests. @@ -588,112 +682,18 @@ def get_fork_sync_requests(self, repository_name_or_id, project=None, include_ab query_parameters['includeLinks'] = self._serialize.query('include_links', include_links, 'bool') response = self._send(http_method='GET', location_id='1703f858-b9d1-46af-ab62-483e9e1055b5', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[GitForkSyncRequest]', self._unwrap_collection(response)) - def get_changes(self, commit_id, repository_id, project=None, top=None, skip=None): - """GetChanges. - Retrieve changes for a particular commit. - :param str commit_id: The id of the commit. - :param str repository_id: The id or friendly name of the repository. To use the friendly name, projectId must also be specified. - :param str project: Project ID or project name - :param int top: The maximum number of changes to return. - :param int skip: The number of changes to skip. - :rtype: :class:` ` - """ - route_values = {} - if project is not None: - route_values['project'] = self._serialize.url('project', project, 'str') - if commit_id is not None: - route_values['commitId'] = self._serialize.url('commit_id', commit_id, 'str') - if repository_id is not None: - route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') - query_parameters = {} - if top is not None: - query_parameters['top'] = self._serialize.query('top', top, 'int') - if skip is not None: - query_parameters['skip'] = self._serialize.query('skip', skip, 'int') - response = self._send(http_method='GET', - location_id='5bf884f5-3e07-42e9-afb8-1b872267bf16', - version='7.0', - route_values=route_values, - query_parameters=query_parameters) - return self._deserialize('GitCommitChanges', response) - - def create_cherry_pick(self, cherry_pick_to_create, project, repository_id): - """CreateCherryPick. - Cherry pick a specific commit or commits that are associated to a pull request into a new branch. - :param :class:` ` cherry_pick_to_create: - :param str project: Project ID or project name - :param str repository_id: ID of the repository. - :rtype: :class:` ` - """ - route_values = {} - if project is not None: - route_values['project'] = self._serialize.url('project', project, 'str') - if repository_id is not None: - route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') - content = self._serialize.body(cherry_pick_to_create, 'GitAsyncRefOperationParameters') - response = self._send(http_method='POST', - location_id='033bad68-9a14-43d1-90e0-59cb8856fef6', - version='7.0', - route_values=route_values, - content=content) - return self._deserialize('GitCherryPick', response) - - def get_cherry_pick(self, project, cherry_pick_id, repository_id): - """GetCherryPick. - Retrieve information about a cherry pick operation by cherry pick Id. - :param str project: Project ID or project name - :param int cherry_pick_id: ID of the cherry pick. - :param str repository_id: ID of the repository. - :rtype: :class:` ` - """ - route_values = {} - if project is not None: - route_values['project'] = self._serialize.url('project', project, 'str') - if cherry_pick_id is not None: - route_values['cherryPickId'] = self._serialize.url('cherry_pick_id', cherry_pick_id, 'int') - if repository_id is not None: - route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') - response = self._send(http_method='GET', - location_id='033bad68-9a14-43d1-90e0-59cb8856fef6', - version='7.0', - route_values=route_values) - return self._deserialize('GitCherryPick', response) - - def get_cherry_pick_for_ref_name(self, project, repository_id, ref_name): - """GetCherryPickForRefName. - Retrieve information about a cherry pick operation for a specific branch. This operation is expensive due to the underlying object structure, so this API only looks at the 1000 most recent cherry pick operations. - :param str project: Project ID or project name - :param str repository_id: ID of the repository. - :param str ref_name: The GitAsyncRefOperationParameters generatedRefName used for the cherry pick operation. - :rtype: :class:` ` - """ - route_values = {} - if project is not None: - route_values['project'] = self._serialize.url('project', project, 'str') - if repository_id is not None: - route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') - query_parameters = {} - if ref_name is not None: - query_parameters['refName'] = self._serialize.query('ref_name', ref_name, 'str') - response = self._send(http_method='GET', - location_id='033bad68-9a14-43d1-90e0-59cb8856fef6', - version='7.0', - route_values=route_values, - query_parameters=query_parameters) - return self._deserialize('GitCherryPick', response) - def create_import_request(self, import_request, project, repository_id): """CreateImportRequest. - Create an import request. - :param :class:` ` import_request: The import request to create. + [Preview API] Create an import request. + :param :class:` ` import_request: The import request to create. :param str project: Project ID or project name :param str repository_id: The name or ID of the repository. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -703,18 +703,18 @@ def create_import_request(self, import_request, project, repository_id): content = self._serialize.body(import_request, 'GitImportRequest') response = self._send(http_method='POST', location_id='01828ddc-3600-4a41-8633-99b3a73a0eb3', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('GitImportRequest', response) def get_import_request(self, project, repository_id, import_request_id): """GetImportRequest. - Retrieve a particular import request. + [Preview API] Retrieve a particular import request. :param str project: Project ID or project name :param str repository_id: The name or ID of the repository. :param int import_request_id: The unique identifier for the import request. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -725,13 +725,13 @@ def get_import_request(self, project, repository_id, import_request_id): route_values['importRequestId'] = self._serialize.url('import_request_id', import_request_id, 'int') response = self._send(http_method='GET', location_id='01828ddc-3600-4a41-8633-99b3a73a0eb3', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('GitImportRequest', response) def query_import_requests(self, project, repository_id, include_abandoned=None): """QueryImportRequests. - Retrieve import requests for a repository. + [Preview API] Retrieve import requests for a repository. :param str project: Project ID or project name :param str repository_id: The name or ID of the repository. :param bool include_abandoned: True to include abandoned import requests in the results. @@ -747,19 +747,19 @@ def query_import_requests(self, project, repository_id, include_abandoned=None): query_parameters['includeAbandoned'] = self._serialize.query('include_abandoned', include_abandoned, 'bool') response = self._send(http_method='GET', location_id='01828ddc-3600-4a41-8633-99b3a73a0eb3', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[GitImportRequest]', self._unwrap_collection(response)) def update_import_request(self, import_request_to_update, project, repository_id, import_request_id): """UpdateImportRequest. - Retry or abandon a failed import request. - :param :class:` ` import_request_to_update: The updated version of the import request. Currently, the only change allowed is setting the Status to Queued or Abandoned. + [Preview API] Retry or abandon a failed import request. + :param :class:` ` import_request_to_update: The updated version of the import request. Currently, the only change allowed is setting the Status to Queued or Abandoned. :param str project: Project ID or project name :param str repository_id: The name or ID of the repository. :param int import_request_id: The unique identifier for the import request to update. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -771,14 +771,14 @@ def update_import_request(self, import_request_to_update, project, repository_id content = self._serialize.body(import_request_to_update, 'GitImportRequest') response = self._send(http_method='PATCH', location_id='01828ddc-3600-4a41-8633-99b3a73a0eb3', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('GitImportRequest', response) def get_item(self, repository_id, path, project=None, scope_path=None, recursion_level=None, include_content_metadata=None, latest_processed_change=None, download=None, version_descriptor=None, include_content=None, resolve_lfs=None, sanitize=None): """GetItem. - Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content, which is always returned as a download. + [Preview API] Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content, which is always returned as a download. :param str repository_id: The name or ID of the repository. :param str path: The item path. :param str project: Project ID or project name @@ -787,11 +787,11 @@ def get_item(self, repository_id, path, project=None, scope_path=None, recursion :param bool include_content_metadata: Set to true to include content metadata. Default is false. :param bool latest_processed_change: Set to true to include the latest changes. Default is false. :param bool download: Set to true to download the response as a file. Default is false. - :param :class:` ` version_descriptor: Version descriptor. Default is the default branch for the repository. + :param :class:` ` version_descriptor: Version descriptor. Default is the default branch for the repository. :param bool include_content: Set to true to include item content when requesting json. Default is false. :param bool resolve_lfs: Set to true to resolve Git LFS pointer files to return actual content from Git LFS. Default is false. :param bool sanitize: Set to true to sanitize an svg file and return it as image. Useful only if requested for svg file. Default is false. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -826,14 +826,14 @@ def get_item(self, repository_id, path, project=None, scope_path=None, recursion query_parameters['sanitize'] = self._serialize.query('sanitize', sanitize, 'bool') response = self._send(http_method='GET', location_id='fb93c0db-47ed-4a31-8c20-47552878fb44', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('GitItem', response) def get_item_content(self, repository_id, path, project=None, scope_path=None, recursion_level=None, include_content_metadata=None, latest_processed_change=None, download=None, version_descriptor=None, include_content=None, resolve_lfs=None, sanitize=None, **kwargs): """GetItemContent. - Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content, which is always returned as a download. + [Preview API] Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content, which is always returned as a download. :param str repository_id: The name or ID of the repository. :param str path: The item path. :param str project: Project ID or project name @@ -842,7 +842,7 @@ def get_item_content(self, repository_id, path, project=None, scope_path=None, r :param bool include_content_metadata: Set to true to include content metadata. Default is false. :param bool latest_processed_change: Set to true to include the latest changes. Default is false. :param bool download: Set to true to download the response as a file. Default is false. - :param :class:` ` version_descriptor: Version descriptor. Default is the default branch for the repository. + :param :class:` ` version_descriptor: Version descriptor. Default is the default branch for the repository. :param bool include_content: Set to true to include item content when requesting json. Default is false. :param bool resolve_lfs: Set to true to resolve Git LFS pointer files to return actual content from Git LFS. Default is false. :param bool sanitize: Set to true to sanitize an svg file and return it as image. Useful only if requested for svg file. Default is false. @@ -881,7 +881,7 @@ def get_item_content(self, repository_id, path, project=None, scope_path=None, r query_parameters['sanitize'] = self._serialize.query('sanitize', sanitize, 'bool') response = self._send(http_method='GET', location_id='fb93c0db-47ed-4a31-8c20-47552878fb44', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters, accept_media_type='application/octet-stream') @@ -891,9 +891,9 @@ def get_item_content(self, repository_id, path, project=None, scope_path=None, r callback = None return self._client.stream_download(response, callback=callback) - def get_items(self, repository_id, project=None, scope_path=None, recursion_level=None, include_content_metadata=None, latest_processed_change=None, download=None, include_links=None, version_descriptor=None): + def get_items(self, repository_id, project=None, scope_path=None, recursion_level=None, include_content_metadata=None, latest_processed_change=None, download=None, include_links=None, version_descriptor=None, zip_for_unix=None): """GetItems. - Get Item Metadata and/or Content for a collection of items. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. + [Preview API] Get Item Metadata and/or Content for a collection of items. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. :param str repository_id: The name or ID of the repository. :param str project: Project ID or project name :param str scope_path: The path scope. The default is null. @@ -902,7 +902,8 @@ def get_items(self, repository_id, project=None, scope_path=None, recursion_leve :param bool latest_processed_change: Set to true to include the latest changes. Default is false. :param bool download: Set to true to download the response as a file. Default is false. :param bool include_links: Set to true to include links to items. Default is false. - :param :class:` ` version_descriptor: Version descriptor. Default is the default branch for the repository. + :param :class:` ` version_descriptor: Version descriptor. Default is the default branch for the repository. + :param bool zip_for_unix: Set to true to keep the file permissions for unix (and POSIX) systems like executables and symlinks :rtype: [GitItem] """ route_values = {} @@ -930,16 +931,18 @@ def get_items(self, repository_id, project=None, scope_path=None, recursion_leve query_parameters['versionDescriptor.version'] = version_descriptor.version if version_descriptor.version_options is not None: query_parameters['versionDescriptor.versionOptions'] = version_descriptor.version_options + if zip_for_unix is not None: + query_parameters['zipForUnix'] = self._serialize.query('zip_for_unix', zip_for_unix, 'bool') response = self._send(http_method='GET', location_id='fb93c0db-47ed-4a31-8c20-47552878fb44', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[GitItem]', self._unwrap_collection(response)) def get_item_text(self, repository_id, path, project=None, scope_path=None, recursion_level=None, include_content_metadata=None, latest_processed_change=None, download=None, version_descriptor=None, include_content=None, resolve_lfs=None, sanitize=None, **kwargs): """GetItemText. - Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content, which is always returned as a download. + [Preview API] Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content, which is always returned as a download. :param str repository_id: The name or ID of the repository. :param str path: The item path. :param str project: Project ID or project name @@ -948,7 +951,7 @@ def get_item_text(self, repository_id, path, project=None, scope_path=None, recu :param bool include_content_metadata: Set to true to include content metadata. Default is false. :param bool latest_processed_change: Set to true to include the latest changes. Default is false. :param bool download: Set to true to download the response as a file. Default is false. - :param :class:` ` version_descriptor: Version descriptor. Default is the default branch for the repository. + :param :class:` ` version_descriptor: Version descriptor. Default is the default branch for the repository. :param bool include_content: Set to true to include item content when requesting json. Default is false. :param bool resolve_lfs: Set to true to resolve Git LFS pointer files to return actual content from Git LFS. Default is false. :param bool sanitize: Set to true to sanitize an svg file and return it as image. Useful only if requested for svg file. Default is false. @@ -987,7 +990,7 @@ def get_item_text(self, repository_id, path, project=None, scope_path=None, recu query_parameters['sanitize'] = self._serialize.query('sanitize', sanitize, 'bool') response = self._send(http_method='GET', location_id='fb93c0db-47ed-4a31-8c20-47552878fb44', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters, accept_media_type='text/plain') @@ -999,7 +1002,7 @@ def get_item_text(self, repository_id, path, project=None, scope_path=None, recu def get_item_zip(self, repository_id, path, project=None, scope_path=None, recursion_level=None, include_content_metadata=None, latest_processed_change=None, download=None, version_descriptor=None, include_content=None, resolve_lfs=None, sanitize=None, **kwargs): """GetItemZip. - Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content, which is always returned as a download. + [Preview API] Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content, which is always returned as a download. :param str repository_id: The name or ID of the repository. :param str path: The item path. :param str project: Project ID or project name @@ -1008,7 +1011,7 @@ def get_item_zip(self, repository_id, path, project=None, scope_path=None, recur :param bool include_content_metadata: Set to true to include content metadata. Default is false. :param bool latest_processed_change: Set to true to include the latest changes. Default is false. :param bool download: Set to true to download the response as a file. Default is false. - :param :class:` ` version_descriptor: Version descriptor. Default is the default branch for the repository. + :param :class:` ` version_descriptor: Version descriptor. Default is the default branch for the repository. :param bool include_content: Set to true to include item content when requesting json. Default is false. :param bool resolve_lfs: Set to true to resolve Git LFS pointer files to return actual content from Git LFS. Default is false. :param bool sanitize: Set to true to sanitize an svg file and return it as image. Useful only if requested for svg file. Default is false. @@ -1047,7 +1050,7 @@ def get_item_zip(self, repository_id, path, project=None, scope_path=None, recur query_parameters['sanitize'] = self._serialize.query('sanitize', sanitize, 'bool') response = self._send(http_method='GET', location_id='fb93c0db-47ed-4a31-8c20-47552878fb44', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters, accept_media_type='application/zip') @@ -1059,8 +1062,8 @@ def get_item_zip(self, repository_id, path, project=None, scope_path=None, recur def get_items_batch(self, request_data, repository_id, project=None): """GetItemsBatch. - Post for retrieving a creating a batch out of a set of items in a repo / project given a list of paths or a long path - :param :class:` ` request_data: Request data attributes: ItemDescriptors, IncludeContentMetadata, LatestProcessedChange, IncludeLinks. ItemDescriptors: Collection of items to fetch, including path, version, and recursion level. IncludeContentMetadata: Whether to include metadata for all items LatestProcessedChange: Whether to include shallow ref to commit that last changed each item. IncludeLinks: Whether to include the _links field on the shallow references. + [Preview API] Post for retrieving a creating a batch out of a set of items in a repo / project given a list of paths or a long path + :param :class:` ` request_data: Request data attributes: ItemDescriptors, IncludeContentMetadata, LatestProcessedChange, IncludeLinks. ItemDescriptors: Collection of items to fetch, including path, version, and recursion level. IncludeContentMetadata: Whether to include metadata for all items LatestProcessedChange: Whether to include shallow ref to commit that last changed each item. IncludeLinks: Whether to include the _links field on the shallow references. :param str repository_id: The name or ID of the repository :param str project: Project ID or project name :rtype: [[GitItem]] @@ -1073,14 +1076,14 @@ def get_items_batch(self, request_data, repository_id, project=None): content = self._serialize.body(request_data, 'GitItemRequestData') response = self._send(http_method='POST', location_id='630fd2e4-fb88-4f85-ad21-13f3fd1fbca9', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('[[GitItem]]', self._unwrap_collection(response)) def get_merge_bases(self, repository_name_or_id, commit_id, other_commit_id, project=None, other_collection_id=None, other_repository_id=None): """GetMergeBases. - Find the merge bases of two commits, optionally across forks. If otherRepositoryId is not specified, the merge bases will only be calculated within the context of the local repositoryNameOrId. + [Preview API] Find the merge bases of two commits, optionally across forks. If otherRepositoryId is not specified, the merge bases will only be calculated within the context of the local repositoryNameOrId. :param str repository_name_or_id: ID or name of the local repository. :param str commit_id: First commit, usually the tip of the target branch of the potential merge. :param str other_commit_id: Other commit, usually the tip of the source branch of the potential merge. @@ -1105,19 +1108,19 @@ def get_merge_bases(self, repository_name_or_id, commit_id, other_commit_id, pro query_parameters['otherRepositoryId'] = self._serialize.query('other_repository_id', other_repository_id, 'str') response = self._send(http_method='GET', location_id='7cf2abb6-c964-4f7e-9872-f78c66e72e9c', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[GitCommitRef]', self._unwrap_collection(response)) def create_merge_request(self, merge_parameters, project, repository_name_or_id, include_links=None): """CreateMergeRequest. - Request a git merge operation. Currently we support merging only 2 commits. - :param :class:` ` merge_parameters: Parents commitIds and merge commit messsage. + [Preview API] Request a git merge operation. Currently we support merging only 2 commits. + :param :class:` ` merge_parameters: Parents commitIds and merge commit messsage. :param str project: Project ID or project name :param str repository_name_or_id: The name or ID of the repository. :param bool include_links: True to include links - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -1130,7 +1133,7 @@ def create_merge_request(self, merge_parameters, project, repository_name_or_id, content = self._serialize.body(merge_parameters, 'GitMergeParameters') response = self._send(http_method='POST', location_id='985f7ae9-844f-4906-9897-7ef41516c0e2', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters, content=content) @@ -1138,12 +1141,12 @@ def create_merge_request(self, merge_parameters, project, repository_name_or_id, def get_merge_request(self, project, repository_name_or_id, merge_operation_id, include_links=None): """GetMergeRequest. - Get a specific merge operation's details. + [Preview API] Get a specific merge operation's details. :param str project: Project ID or project name :param str repository_name_or_id: The name or ID of the repository. :param int merge_operation_id: OperationId of the merge request. :param bool include_links: True to include links - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -1157,21 +1160,21 @@ def get_merge_request(self, project, repository_name_or_id, merge_operation_id, query_parameters['includeLinks'] = self._serialize.query('include_links', include_links, 'bool') response = self._send(http_method='GET', location_id='985f7ae9-844f-4906-9897-7ef41516c0e2', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('GitMerge', response) def get_policy_configurations(self, project, repository_id=None, ref_name=None, policy_type=None, top=None, continuation_token=None): """GetPolicyConfigurations. - Retrieve a list of policy configurations by a given set of scope/filtering criteria. + [Preview API] Retrieve a list of policy configurations by a given set of scope/filtering criteria. :param str project: Project ID or project name :param str repository_id: The repository id. :param str ref_name: The fully-qualified Git ref name (e.g. refs/heads/master). :param str policy_type: The policy type filter. :param int top: Maximum number of policies to return. :param str continuation_token: Pass a policy configuration ID to fetch the next page of results, up to top number of results, for this endpoint. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -1189,7 +1192,7 @@ def get_policy_configurations(self, project, repository_id=None, ref_name=None, query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'str') response = self._send(http_method='GET', location_id='2c420070-a0a2-49cc-9639-c9f271c5ff07', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) response_object = models.GitPolicyConfigurationResponse() @@ -1199,13 +1202,13 @@ def get_policy_configurations(self, project, repository_id=None, ref_name=None, def create_attachment(self, upload_stream, file_name, repository_id, pull_request_id, project=None, **kwargs): """CreateAttachment. - Attach a new file to a pull request. + [Preview API] Attach a new file to a pull request. :param object upload_stream: Stream to upload :param str file_name: The name of the file. :param str repository_id: The repository ID of the pull request’s target branch. :param int pull_request_id: ID of the pull request. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -1223,7 +1226,7 @@ def create_attachment(self, upload_stream, file_name, repository_id, pull_reques content = self._client.stream_upload(upload_stream, callback=callback) response = self._send(http_method='POST', location_id='965d9361-878b-413b-a494-45d5b5fd8ab7', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content, media_type='application/octet-stream') @@ -1231,7 +1234,7 @@ def create_attachment(self, upload_stream, file_name, repository_id, pull_reques def delete_attachment(self, file_name, repository_id, pull_request_id, project=None): """DeleteAttachment. - Delete a pull request attachment. + [Preview API] Delete a pull request attachment. :param str file_name: The name of the attachment to delete. :param str repository_id: The repository ID of the pull request’s target branch. :param int pull_request_id: ID of the pull request. @@ -1248,12 +1251,12 @@ def delete_attachment(self, file_name, repository_id, pull_request_id, project=N route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') self._send(http_method='DELETE', location_id='965d9361-878b-413b-a494-45d5b5fd8ab7', - version='7.0', + version='7.2-preview.1', route_values=route_values) def get_attachment_content(self, file_name, repository_id, pull_request_id, project=None, **kwargs): """GetAttachmentContent. - Get the file content of a pull request attachment. + [Preview API] Get the file content of a pull request attachment. :param str file_name: The name of the attachment. :param str repository_id: The repository ID of the pull request’s target branch. :param int pull_request_id: ID of the pull request. @@ -1271,7 +1274,7 @@ def get_attachment_content(self, file_name, repository_id, pull_request_id, proj route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') response = self._send(http_method='GET', location_id='965d9361-878b-413b-a494-45d5b5fd8ab7', - version='7.0', + version='7.2-preview.1', route_values=route_values, accept_media_type='application/octet-stream') if "callback" in kwargs: @@ -1282,7 +1285,7 @@ def get_attachment_content(self, file_name, repository_id, pull_request_id, proj def get_attachments(self, repository_id, pull_request_id, project=None): """GetAttachments. - Get a list of files attached to a given pull request. + [Preview API] Get a list of files attached to a given pull request. :param str repository_id: The repository ID of the pull request’s target branch. :param int pull_request_id: ID of the pull request. :param str project: Project ID or project name @@ -1297,13 +1300,13 @@ def get_attachments(self, repository_id, pull_request_id, project=None): route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') response = self._send(http_method='GET', location_id='965d9361-878b-413b-a494-45d5b5fd8ab7', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('[Attachment]', self._unwrap_collection(response)) def get_attachment_zip(self, file_name, repository_id, pull_request_id, project=None, **kwargs): """GetAttachmentZip. - Get the file content of a pull request attachment. + [Preview API] Get the file content of a pull request attachment. :param str file_name: The name of the attachment. :param str repository_id: The repository ID of the pull request’s target branch. :param int pull_request_id: ID of the pull request. @@ -1321,7 +1324,7 @@ def get_attachment_zip(self, file_name, repository_id, pull_request_id, project= route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') response = self._send(http_method='GET', location_id='965d9361-878b-413b-a494-45d5b5fd8ab7', - version='7.0', + version='7.2-preview.1', route_values=route_values, accept_media_type='application/zip') if "callback" in kwargs: @@ -1332,7 +1335,7 @@ def get_attachment_zip(self, file_name, repository_id, pull_request_id, project= def create_like(self, repository_id, pull_request_id, thread_id, comment_id, project=None): """CreateLike. - Add a like on a comment. + [Preview API] Add a like on a comment. :param str repository_id: The repository ID of the pull request's target branch. :param int pull_request_id: ID of the pull request. :param int thread_id: The ID of the thread that contains the comment. @@ -1352,12 +1355,12 @@ def create_like(self, repository_id, pull_request_id, thread_id, comment_id, pro route_values['commentId'] = self._serialize.url('comment_id', comment_id, 'int') self._send(http_method='POST', location_id='5f2e2851-1389-425b-a00b-fb2adb3ef31b', - version='7.0', + version='7.2-preview.1', route_values=route_values) def delete_like(self, repository_id, pull_request_id, thread_id, comment_id, project=None): """DeleteLike. - Delete a like on a comment. + [Preview API] Delete a like on a comment. :param str repository_id: The repository ID of the pull request's target branch. :param int pull_request_id: ID of the pull request. :param int thread_id: The ID of the thread that contains the comment. @@ -1377,12 +1380,12 @@ def delete_like(self, repository_id, pull_request_id, thread_id, comment_id, pro route_values['commentId'] = self._serialize.url('comment_id', comment_id, 'int') self._send(http_method='DELETE', location_id='5f2e2851-1389-425b-a00b-fb2adb3ef31b', - version='7.0', + version='7.2-preview.1', route_values=route_values) def get_likes(self, repository_id, pull_request_id, thread_id, comment_id, project=None): """GetLikes. - Get likes for a comment. + [Preview API] Get likes for a comment. :param str repository_id: The repository ID of the pull request's target branch. :param int pull_request_id: ID of the pull request. :param int thread_id: The ID of the thread that contains the comment. @@ -1403,13 +1406,13 @@ def get_likes(self, repository_id, pull_request_id, thread_id, comment_id, proje route_values['commentId'] = self._serialize.url('comment_id', comment_id, 'int') response = self._send(http_method='GET', location_id='5f2e2851-1389-425b-a00b-fb2adb3ef31b', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('[IdentityRef]', self._unwrap_collection(response)) def get_pull_request_iteration_commits(self, repository_id, pull_request_id, iteration_id, project=None, top=None, skip=None): """GetPullRequestIterationCommits. - Get the commits for the specified iteration of a pull request. + [Preview API] Get the commits for the specified iteration of a pull request. :param str repository_id: ID or name of the repository. :param int pull_request_id: ID of the pull request. :param int iteration_id: ID of the iteration from which to get the commits. @@ -1434,20 +1437,20 @@ def get_pull_request_iteration_commits(self, repository_id, pull_request_id, ite query_parameters['skip'] = self._serialize.query('skip', skip, 'int') response = self._send(http_method='GET', location_id='e7ea0883-095f-4926-b5fb-f24691c26fb9', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[GitCommitRef]', self._unwrap_collection(response)) def get_pull_request_commits(self, repository_id, pull_request_id, project=None, top=None, continuation_token=None): """GetPullRequestCommits. - Get the commits for the specified pull request. + [Preview API] Get the commits for the specified pull request. :param str repository_id: ID or name of the repository. :param int pull_request_id: ID of the pull request. :param str project: Project ID or project name :param int top: Maximum number of commits to return. :param str continuation_token: The continuation token used for pagination. - :rtype: :class:`<[GitCommitRef]> ` + :rtype: :class:`<[GitCommitRef]> ` """ route_values = {} if project is not None: @@ -1463,14 +1466,14 @@ def get_pull_request_commits(self, repository_id, pull_request_id, project=None, query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'str') response = self._send(http_method='GET', location_id='52823034-34a8-4576-922c-8d8b77e9e4c4', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[GitCommitRef]', self._unwrap_collection(response)) def get_pull_request_iteration_changes(self, repository_id, pull_request_id, iteration_id, project=None, top=None, skip=None, compare_to=None): """GetPullRequestIterationChanges. - Retrieve the changes made in a pull request between two iterations. + [Preview API] Retrieve the changes made in a pull request between two iterations. :param str repository_id: The repository ID of the pull request's target branch. :param int pull_request_id: ID of the pull request. :param int iteration_id: ID of the pull request iteration.
Iteration one is the head of the source branch at the time the pull request is created and subsequent iterations are created when there are pushes to the source branch. Allowed values are between 1 and the maximum iteration on this pull request. @@ -1478,7 +1481,7 @@ def get_pull_request_iteration_changes(self, repository_id, pull_request_id, ite :param int top: Optional. The number of changes to retrieve. The default value is 100 and the maximum value is 2000. :param int skip: Optional. The number of changes to ignore. For example, to retrieve changes 101-150, set top 50 and skip to 100. :param int compare_to: ID of the pull request iteration to compare against. The default value is zero which indicates the comparison is made against the common commit between the source and target branches - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -1498,19 +1501,19 @@ def get_pull_request_iteration_changes(self, repository_id, pull_request_id, ite query_parameters['$compareTo'] = self._serialize.query('compare_to', compare_to, 'int') response = self._send(http_method='GET', location_id='4216bdcf-b6b1-4d59-8b82-c34cc183fc8b', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('GitPullRequestIterationChanges', response) def get_pull_request_iteration(self, repository_id, pull_request_id, iteration_id, project=None): """GetPullRequestIteration. - Get the specified iteration for a pull request. + [Preview API] Get the specified iteration for a pull request. :param str repository_id: ID or name of the repository. :param int pull_request_id: ID of the pull request. :param int iteration_id: ID of the pull request iteration to return. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -1523,13 +1526,13 @@ def get_pull_request_iteration(self, repository_id, pull_request_id, iteration_i route_values['iterationId'] = self._serialize.url('iteration_id', iteration_id, 'int') response = self._send(http_method='GET', location_id='d43911ee-6958-46b0-a42b-8445b8a0d004', - version='7.0', + version='7.2-preview.2', route_values=route_values) return self._deserialize('GitPullRequestIteration', response) def get_pull_request_iterations(self, repository_id, pull_request_id, project=None, include_commits=None): """GetPullRequestIterations. - Get the list of iterations for the specified pull request. + [Preview API] Get the list of iterations for the specified pull request. :param str repository_id: ID or name of the repository. :param int pull_request_id: ID of the pull request. :param str project: Project ID or project name @@ -1548,20 +1551,20 @@ def get_pull_request_iterations(self, repository_id, pull_request_id, project=No query_parameters['includeCommits'] = self._serialize.query('include_commits', include_commits, 'bool') response = self._send(http_method='GET', location_id='d43911ee-6958-46b0-a42b-8445b8a0d004', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[GitPullRequestIteration]', self._unwrap_collection(response)) def create_pull_request_iteration_status(self, status, repository_id, pull_request_id, iteration_id, project=None): """CreatePullRequestIterationStatus. - Create a pull request status on the iteration. This operation will have the same result as Create status on pull request with specified iteration ID in the request body. - :param :class:` ` status: Pull request status to create. + [Preview API] Create a pull request status on the iteration. This operation will have the same result as Create status on pull request with specified iteration ID in the request body. + :param :class:` ` status: Pull request status to create. :param str repository_id: The repository ID of the pull request’s target branch. :param int pull_request_id: ID of the pull request. :param int iteration_id: ID of the pull request iteration. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -1575,14 +1578,14 @@ def create_pull_request_iteration_status(self, status, repository_id, pull_reque content = self._serialize.body(status, 'GitPullRequestStatus') response = self._send(http_method='POST', location_id='75cf11c5-979f-4038-a76e-058a06adf2bf', - version='7.0', + version='7.2-preview.2', route_values=route_values, content=content) return self._deserialize('GitPullRequestStatus', response) def delete_pull_request_iteration_status(self, repository_id, pull_request_id, iteration_id, status_id, project=None): """DeletePullRequestIterationStatus. - Delete pull request iteration status. + [Preview API] Delete pull request iteration status. :param str repository_id: The repository ID of the pull request’s target branch. :param int pull_request_id: ID of the pull request. :param int iteration_id: ID of the pull request iteration. @@ -1602,18 +1605,18 @@ def delete_pull_request_iteration_status(self, repository_id, pull_request_id, i route_values['statusId'] = self._serialize.url('status_id', status_id, 'int') self._send(http_method='DELETE', location_id='75cf11c5-979f-4038-a76e-058a06adf2bf', - version='7.0', + version='7.2-preview.2', route_values=route_values) def get_pull_request_iteration_status(self, repository_id, pull_request_id, iteration_id, status_id, project=None): """GetPullRequestIterationStatus. - Get the specific pull request iteration status by ID. The status ID is unique within the pull request across all iterations. + [Preview API] Get the specific pull request iteration status by ID. The status ID is unique within the pull request across all iterations. :param str repository_id: The repository ID of the pull request’s target branch. :param int pull_request_id: ID of the pull request. :param int iteration_id: ID of the pull request iteration. :param int status_id: ID of the pull request status. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -1628,13 +1631,13 @@ def get_pull_request_iteration_status(self, repository_id, pull_request_id, iter route_values['statusId'] = self._serialize.url('status_id', status_id, 'int') response = self._send(http_method='GET', location_id='75cf11c5-979f-4038-a76e-058a06adf2bf', - version='7.0', + version='7.2-preview.2', route_values=route_values) return self._deserialize('GitPullRequestStatus', response) def get_pull_request_iteration_statuses(self, repository_id, pull_request_id, iteration_id, project=None): """GetPullRequestIterationStatuses. - Get all the statuses associated with a pull request iteration. + [Preview API] Get all the statuses associated with a pull request iteration. :param str repository_id: The repository ID of the pull request’s target branch. :param int pull_request_id: ID of the pull request. :param int iteration_id: ID of the pull request iteration. @@ -1652,14 +1655,14 @@ def get_pull_request_iteration_statuses(self, repository_id, pull_request_id, it route_values['iterationId'] = self._serialize.url('iteration_id', iteration_id, 'int') response = self._send(http_method='GET', location_id='75cf11c5-979f-4038-a76e-058a06adf2bf', - version='7.0', + version='7.2-preview.2', route_values=route_values) return self._deserialize('[GitPullRequestStatus]', self._unwrap_collection(response)) def update_pull_request_iteration_statuses(self, patch_document, repository_id, pull_request_id, iteration_id, project=None): """UpdatePullRequestIterationStatuses. - Update pull request iteration statuses collection. The only supported operation type is `remove`. - :param :class:`<[JsonPatchOperation]> ` patch_document: Operations to apply to the pull request statuses in JSON Patch format. + [Preview API] Update pull request iteration statuses collection. The only supported operation type is `remove`. + :param :class:`<[JsonPatchOperation]> ` patch_document: Operations to apply to the pull request statuses in JSON Patch format. :param str repository_id: The repository ID of the pull request’s target branch. :param int pull_request_id: ID of the pull request. :param int iteration_id: ID of the pull request iteration. @@ -1677,20 +1680,20 @@ def update_pull_request_iteration_statuses(self, patch_document, repository_id, content = self._serialize.body(patch_document, '[JsonPatchOperation]') self._send(http_method='PATCH', location_id='75cf11c5-979f-4038-a76e-058a06adf2bf', - version='7.0', + version='7.2-preview.2', route_values=route_values, content=content, media_type='application/json-patch+json') def create_pull_request_label(self, label, repository_id, pull_request_id, project=None, project_id=None): """CreatePullRequestLabel. - Create a label for a specified pull request. The only required field is the name of the new label. - :param :class:` ` label: Label to assign to the pull request. + [Preview API] Create a tag (if that does not exists yet) and add that as a label (tag) for a specified pull request. The only required field is the name of the new label (tag). + :param :class:` ` label: Label to assign to the pull request. :param str repository_id: The repository ID of the pull request’s target branch. :param int pull_request_id: ID of the pull request. :param str project: Project ID or project name :param str project_id: Project ID or project name. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -1705,7 +1708,7 @@ def create_pull_request_label(self, label, repository_id, pull_request_id, proje content = self._serialize.body(label, 'WebApiCreateTagRequestData') response = self._send(http_method='POST', location_id='f22387e3-984e-4c52-9c6d-fbb8f14c812d', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters, content=content) @@ -1713,7 +1716,7 @@ def create_pull_request_label(self, label, repository_id, pull_request_id, proje def delete_pull_request_labels(self, repository_id, pull_request_id, label_id_or_name, project=None, project_id=None): """DeletePullRequestLabels. - Removes a label from the set of those assigned to the pull request. + [Preview API] Removes a label (tag) from the set of those assigned to the pull request. The tag itself will not be deleted. :param str repository_id: The repository ID of the pull request’s target branch. :param int pull_request_id: ID of the pull request. :param str label_id_or_name: The name or ID of the label requested. @@ -1734,19 +1737,19 @@ def delete_pull_request_labels(self, repository_id, pull_request_id, label_id_or query_parameters['projectId'] = self._serialize.query('project_id', project_id, 'str') self._send(http_method='DELETE', location_id='f22387e3-984e-4c52-9c6d-fbb8f14c812d', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) def get_pull_request_label(self, repository_id, pull_request_id, label_id_or_name, project=None, project_id=None): """GetPullRequestLabel. - Retrieves a single label that has been assigned to a pull request. + [Preview API] Retrieves a single label (tag) that has been assigned to a pull request. :param str repository_id: The repository ID of the pull request’s target branch. :param int pull_request_id: ID of the pull request. :param str label_id_or_name: The name or ID of the label requested. :param str project: Project ID or project name :param str project_id: Project ID or project name. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -1762,14 +1765,14 @@ def get_pull_request_label(self, repository_id, pull_request_id, label_id_or_nam query_parameters['projectId'] = self._serialize.query('project_id', project_id, 'str') response = self._send(http_method='GET', location_id='f22387e3-984e-4c52-9c6d-fbb8f14c812d', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('WebApiTagDefinition', response) def get_pull_request_labels(self, repository_id, pull_request_id, project=None, project_id=None): """GetPullRequestLabels. - Get all the labels assigned to a pull request. + [Preview API] Get all the labels (tags) assigned to a pull request. :param str repository_id: The repository ID of the pull request’s target branch. :param int pull_request_id: ID of the pull request. :param str project: Project ID or project name @@ -1788,18 +1791,18 @@ def get_pull_request_labels(self, repository_id, pull_request_id, project=None, query_parameters['projectId'] = self._serialize.query('project_id', project_id, 'str') response = self._send(http_method='GET', location_id='f22387e3-984e-4c52-9c6d-fbb8f14c812d', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[WebApiTagDefinition]', self._unwrap_collection(response)) def get_pull_request_properties(self, repository_id, pull_request_id, project=None): """GetPullRequestProperties. - Get external properties of the pull request. + [Preview API] Get external properties of the pull request. :param str repository_id: The repository ID of the pull request’s target branch. :param int pull_request_id: ID of the pull request. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -1810,18 +1813,18 @@ def get_pull_request_properties(self, repository_id, pull_request_id, project=No route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') response = self._send(http_method='GET', location_id='48a52185-5b9e-4736-9dc1-bb1e2feac80b', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('object', response) def update_pull_request_properties(self, patch_document, repository_id, pull_request_id, project=None): """UpdatePullRequestProperties. - Create or update pull request external properties. The patch operation can be `add`, `replace` or `remove`. For `add` operation, the path can be empty. If the path is empty, the value must be a list of key value pairs. For `replace` operation, the path cannot be empty. If the path does not exist, the property will be added to the collection. For `remove` operation, the path cannot be empty. If the path does not exist, no action will be performed. - :param :class:`<[JsonPatchOperation]> ` patch_document: Properties to add, replace or remove in JSON Patch format. + [Preview API] Create or update pull request external properties. The patch operation can be `add`, `replace` or `remove`. For `add` operation, the path can be empty. If the path is empty, the value must be a list of key value pairs. For `replace` operation, the path cannot be empty. If the path does not exist, the property will be added to the collection. For `remove` operation, the path cannot be empty. If the path does not exist, no action will be performed. + :param :class:`<[JsonPatchOperation]> ` patch_document: Properties to add, replace or remove in JSON Patch format. :param str repository_id: The repository ID of the pull request’s target branch. :param int pull_request_id: ID of the pull request. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -1833,7 +1836,7 @@ def update_pull_request_properties(self, patch_document, repository_id, pull_req content = self._serialize.body(patch_document, '[JsonPatchOperation]') response = self._send(http_method='PATCH', location_id='48a52185-5b9e-4736-9dc1-bb1e2feac80b', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content, media_type='application/json-patch+json') @@ -1841,11 +1844,11 @@ def update_pull_request_properties(self, patch_document, repository_id, pull_req def get_pull_request_query(self, queries, repository_id, project=None): """GetPullRequestQuery. - This API is used to find what pull requests are related to a given commit. It can be used to either find the pull request that created a particular merge commit or it can be used to find all pull requests that have ever merged a particular commit. The input is a list of queries which each contain a list of commits. For each commit that you search against, you will get back a dictionary of commit -> pull requests. - :param :class:` ` queries: The list of queries to perform. + [Preview API] This API is used to find what pull requests are related to a given commit. It can be used to either find the pull request that created a particular merge commit or it can be used to find all pull requests that have ever merged a particular commit. The input is a list of queries which each contain a list of commits. For each commit that you search against, you will get back a dictionary of commit -> pull requests. + :param :class:` ` queries: The list of queries to perform. :param str repository_id: ID of the repository. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -1855,20 +1858,20 @@ def get_pull_request_query(self, queries, repository_id, project=None): content = self._serialize.body(queries, 'GitPullRequestQuery') response = self._send(http_method='POST', location_id='b3a6eebe-9cf0-49ea-b6cb-1a4c5f5007b0', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('GitPullRequestQuery', response) def create_pull_request_reviewer(self, reviewer, repository_id, pull_request_id, reviewer_id, project=None): """CreatePullRequestReviewer. - Add a reviewer to a pull request or cast a vote. - :param :class:` ` reviewer: Reviewer's vote.
If the reviewer's ID is included here, it must match the reviewerID parameter.
Reviewers can set their own vote with this method. When adding other reviewers, vote must be set to zero. + [Preview API] Add a reviewer to a pull request or cast a vote. + :param :class:` ` reviewer: Reviewer's vote.
If the reviewer's ID is included here, it must match the reviewerID parameter.
Reviewers can set their own vote with this method. When adding other reviewers, vote must be set to zero. :param str repository_id: The repository ID of the pull request's target branch. :param int pull_request_id: ID of the pull request. :param str reviewer_id: ID of the reviewer. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -1882,14 +1885,14 @@ def create_pull_request_reviewer(self, reviewer, repository_id, pull_request_id, content = self._serialize.body(reviewer, 'IdentityRefWithVote') response = self._send(http_method='PUT', location_id='4b6702c7-aa35-4b89-9c96-b9abf6d3e540', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('IdentityRefWithVote', response) def create_pull_request_reviewers(self, reviewers, repository_id, pull_request_id, project=None): """CreatePullRequestReviewers. - Add reviewers to a pull request. + [Preview API] Add reviewers to a pull request. :param [IdentityRef] reviewers: Reviewers to add to the pull request. :param str repository_id: The repository ID of the pull request's target branch. :param int pull_request_id: ID of the pull request. @@ -1906,19 +1909,19 @@ def create_pull_request_reviewers(self, reviewers, repository_id, pull_request_i content = self._serialize.body(reviewers, '[IdentityRef]') response = self._send(http_method='POST', location_id='4b6702c7-aa35-4b89-9c96-b9abf6d3e540', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('[IdentityRefWithVote]', self._unwrap_collection(response)) def create_unmaterialized_pull_request_reviewer(self, reviewer, repository_id, pull_request_id, project=None): """CreateUnmaterializedPullRequestReviewer. - Add an unmaterialized identity to the reviewers of a pull request. - :param :class:` ` reviewer: Reviewer to add to the pull request. + [Preview API] Add an unmaterialized identity to the reviewers of a pull request. + :param :class:` ` reviewer: Reviewer to add to the pull request. :param str repository_id: The repository ID of the pull request's target branch. :param int pull_request_id: ID of the pull request. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -1930,14 +1933,14 @@ def create_unmaterialized_pull_request_reviewer(self, reviewer, repository_id, p content = self._serialize.body(reviewer, 'IdentityRefWithVote') response = self._send(http_method='PUT', location_id='4b6702c7-aa35-4b89-9c96-b9abf6d3e540', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('IdentityRefWithVote', response) def delete_pull_request_reviewer(self, repository_id, pull_request_id, reviewer_id, project=None): """DeletePullRequestReviewer. - Remove a reviewer from a pull request. + [Preview API] Remove a reviewer from a pull request. :param str repository_id: The repository ID of the pull request's target branch. :param int pull_request_id: ID of the pull request. :param str reviewer_id: ID of the reviewer to remove. @@ -1954,17 +1957,17 @@ def delete_pull_request_reviewer(self, repository_id, pull_request_id, reviewer_ route_values['reviewerId'] = self._serialize.url('reviewer_id', reviewer_id, 'str') self._send(http_method='DELETE', location_id='4b6702c7-aa35-4b89-9c96-b9abf6d3e540', - version='7.0', + version='7.2-preview.1', route_values=route_values) def get_pull_request_reviewer(self, repository_id, pull_request_id, reviewer_id, project=None): """GetPullRequestReviewer. - Retrieve information about a particular reviewer on a pull request + [Preview API] Retrieve information about a particular reviewer on a pull request :param str repository_id: The repository ID of the pull request's target branch. :param int pull_request_id: ID of the pull request. :param str reviewer_id: ID of the reviewer. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -1977,13 +1980,13 @@ def get_pull_request_reviewer(self, repository_id, pull_request_id, reviewer_id, route_values['reviewerId'] = self._serialize.url('reviewer_id', reviewer_id, 'str') response = self._send(http_method='GET', location_id='4b6702c7-aa35-4b89-9c96-b9abf6d3e540', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('IdentityRefWithVote', response) def get_pull_request_reviewers(self, repository_id, pull_request_id, project=None): """GetPullRequestReviewers. - Retrieve the reviewers for a pull request + [Preview API] Retrieve the reviewers for a pull request :param str repository_id: The repository ID of the pull request's target branch. :param int pull_request_id: ID of the pull request. :param str project: Project ID or project name @@ -1998,19 +2001,19 @@ def get_pull_request_reviewers(self, repository_id, pull_request_id, project=Non route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') response = self._send(http_method='GET', location_id='4b6702c7-aa35-4b89-9c96-b9abf6d3e540', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('[IdentityRefWithVote]', self._unwrap_collection(response)) def update_pull_request_reviewer(self, reviewer, repository_id, pull_request_id, reviewer_id, project=None): """UpdatePullRequestReviewer. - Edit a reviewer entry. These fields are patchable: isFlagged, hasDeclined - :param :class:` ` reviewer: Reviewer data.
If the reviewer's ID is included here, it must match the reviewerID parameter. + [Preview API] Edit a reviewer entry. These fields are patchable: isFlagged, hasDeclined + :param :class:` ` reviewer: Reviewer data.
If the reviewer's ID is included here, it must match the reviewerID parameter. :param str repository_id: The repository ID of the pull request's target branch. :param int pull_request_id: ID of the pull request. :param str reviewer_id: ID of the reviewer. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -2024,14 +2027,14 @@ def update_pull_request_reviewer(self, reviewer, repository_id, pull_request_id, content = self._serialize.body(reviewer, 'IdentityRefWithVote') response = self._send(http_method='PATCH', location_id='4b6702c7-aa35-4b89-9c96-b9abf6d3e540', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('IdentityRefWithVote', response) def update_pull_request_reviewers(self, patch_votes, repository_id, pull_request_id, project=None): """UpdatePullRequestReviewers. - Reset the votes of multiple reviewers on a pull request. NOTE: This endpoint only supports updating votes, but does not support updating required reviewers (use policy) or display names. + [Preview API] Reset the votes of multiple reviewers on a pull request. NOTE: This endpoint only supports updating votes, but does not support updating required reviewers (use policy) or display names. :param [IdentityRefWithVote] patch_votes: IDs of the reviewers whose votes will be reset to zero :param str repository_id: The repository ID of the pull request's target branch. :param int pull_request_id: ID of the pull request @@ -2047,16 +2050,16 @@ def update_pull_request_reviewers(self, patch_votes, repository_id, pull_request content = self._serialize.body(patch_votes, '[IdentityRefWithVote]') self._send(http_method='PATCH', location_id='4b6702c7-aa35-4b89-9c96-b9abf6d3e540', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) def get_pull_request_by_id(self, pull_request_id, project=None): """GetPullRequestById. - Retrieve a pull request. + [Preview API] Retrieve a pull request. :param int pull_request_id: The ID of the pull request to retrieve. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -2065,15 +2068,15 @@ def get_pull_request_by_id(self, pull_request_id, project=None): route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') response = self._send(http_method='GET', location_id='01a46dea-7d46-4d40-bc84-319e7c260d99', - version='7.0', + version='7.2-preview.2', route_values=route_values) return self._deserialize('GitPullRequest', response) def get_pull_requests_by_project(self, project, search_criteria, max_comment_length=None, skip=None, top=None): """GetPullRequestsByProject. - Retrieve all pull requests matching a specified criteria. + [Preview API] Retrieve all pull requests matching a specified criteria. :param str project: Project ID or project name - :param :class:` ` search_criteria: Pull requests will be returned that match this search criteria. + :param :class:` ` search_criteria: Pull requests will be returned that match this search criteria. :param int max_comment_length: Not used. :param int skip: The number of pull requests to ignore. For example, to retrieve results 101-150, set top to 50 and skip to 100. :param int top: The number of pull requests to retrieve. @@ -2100,6 +2103,12 @@ def get_pull_requests_by_project(self, project, search_criteria, max_comment_len query_parameters['searchCriteria.sourceRefName'] = search_criteria.source_ref_name if search_criteria.include_links is not None: query_parameters['searchCriteria.includeLinks'] = search_criteria.include_links + if search_criteria.min_time is not None: + query_parameters['searchCriteria.minTime'] = search_criteria.min_time + if search_criteria.max_time is not None: + query_parameters['searchCriteria.maxTime'] = search_criteria.max_time + if search_criteria.query_time_range_type is not None: + query_parameters['searchCriteria.queryTimeRangeType'] = search_criteria.query_time_range_type if max_comment_length is not None: query_parameters['maxCommentLength'] = self._serialize.query('max_comment_length', max_comment_length, 'int') if skip is not None: @@ -2108,19 +2117,19 @@ def get_pull_requests_by_project(self, project, search_criteria, max_comment_len query_parameters['$top'] = self._serialize.query('top', top, 'int') response = self._send(http_method='GET', location_id='a5d28130-9cd2-40fa-9f08-902e7daa9efb', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[GitPullRequest]', self._unwrap_collection(response)) def create_pull_request(self, git_pull_request_to_create, repository_id, project=None, supports_iterations=None): """CreatePullRequest. - Create a pull request. - :param :class:` ` git_pull_request_to_create: The pull request to create. + [Preview API] Create a pull request. + :param :class:` ` git_pull_request_to_create: The pull request to create. :param str repository_id: The repository ID of the pull request's target branch. :param str project: Project ID or project name :param bool supports_iterations: If true, subsequent pushes to the pull request will be individually reviewable. Set this to false for large pull requests for performance reasons if this functionality is not needed. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -2133,7 +2142,7 @@ def create_pull_request(self, git_pull_request_to_create, repository_id, project content = self._serialize.body(git_pull_request_to_create, 'GitPullRequest') response = self._send(http_method='POST', location_id='9946fd70-0d40-406e-b686-b4744cbbcc37', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters, content=content) @@ -2141,7 +2150,7 @@ def create_pull_request(self, git_pull_request_to_create, repository_id, project def get_pull_request(self, repository_id, pull_request_id, project=None, max_comment_length=None, skip=None, top=None, include_commits=None, include_work_item_refs=None): """GetPullRequest. - Retrieve a pull request. + [Preview API] Retrieve a pull request. :param str repository_id: The repository ID of the pull request's target branch. :param int pull_request_id: The ID of the pull request to retrieve. :param str project: Project ID or project name @@ -2150,7 +2159,7 @@ def get_pull_request(self, repository_id, pull_request_id, project=None, max_com :param int top: Not used. :param bool include_commits: If true, the pull request will be returned with the associated commits. :param bool include_work_item_refs: If true, the pull request will be returned with the associated work item references. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -2172,16 +2181,16 @@ def get_pull_request(self, repository_id, pull_request_id, project=None, max_com query_parameters['includeWorkItemRefs'] = self._serialize.query('include_work_item_refs', include_work_item_refs, 'bool') response = self._send(http_method='GET', location_id='9946fd70-0d40-406e-b686-b4744cbbcc37', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters) return self._deserialize('GitPullRequest', response) def get_pull_requests(self, repository_id, search_criteria, project=None, max_comment_length=None, skip=None, top=None): """GetPullRequests. - Retrieve all pull requests matching a specified criteria. + [Preview API] Retrieve all pull requests matching a specified criteria. :param str repository_id: The repository ID of the pull request's target branch. - :param :class:` ` search_criteria: Pull requests will be returned that match this search criteria. + :param :class:` ` search_criteria: Pull requests will be returned that match this search criteria. :param str project: Project ID or project name :param int max_comment_length: Not used. :param int skip: The number of pull requests to ignore. For example, to retrieve results 101-150, set top to 50 and skip to 100. @@ -2211,6 +2220,12 @@ def get_pull_requests(self, repository_id, search_criteria, project=None, max_co query_parameters['searchCriteria.sourceRefName'] = search_criteria.source_ref_name if search_criteria.include_links is not None: query_parameters['searchCriteria.includeLinks'] = search_criteria.include_links + if search_criteria.min_time is not None: + query_parameters['searchCriteria.minTime'] = search_criteria.min_time + if search_criteria.max_time is not None: + query_parameters['searchCriteria.maxTime'] = search_criteria.max_time + if search_criteria.query_time_range_type is not None: + query_parameters['searchCriteria.queryTimeRangeType'] = search_criteria.query_time_range_type if max_comment_length is not None: query_parameters['maxCommentLength'] = self._serialize.query('max_comment_length', max_comment_length, 'int') if skip is not None: @@ -2219,19 +2234,19 @@ def get_pull_requests(self, repository_id, search_criteria, project=None, max_co query_parameters['$top'] = self._serialize.query('top', top, 'int') response = self._send(http_method='GET', location_id='9946fd70-0d40-406e-b686-b4744cbbcc37', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[GitPullRequest]', self._unwrap_collection(response)) def update_pull_request(self, git_pull_request_to_update, repository_id, pull_request_id, project=None): """UpdatePullRequest. - Update a pull request - :param :class:` ` git_pull_request_to_update: The pull request content that should be updated. + [Preview API] Update a pull request + :param :class:` ` git_pull_request_to_update: The pull request content that should be updated. :param str repository_id: The repository ID of the pull request's target branch. :param int pull_request_id: ID of the pull request to update. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -2243,15 +2258,15 @@ def update_pull_request(self, git_pull_request_to_update, repository_id, pull_re content = self._serialize.body(git_pull_request_to_update, 'GitPullRequest') response = self._send(http_method='PATCH', location_id='9946fd70-0d40-406e-b686-b4744cbbcc37', - version='7.0', + version='7.2-preview.2', route_values=route_values, content=content) return self._deserialize('GitPullRequest', response) def share_pull_request(self, user_message, repository_id, pull_request_id, project=None): """SharePullRequest. - Sends an e-mail notification about a specific pull request to a set of recipients - :param :class:` ` user_message: + [Preview API] Sends an e-mail notification about a specific pull request to a set of recipients + :param :class:` ` user_message: :param str repository_id: ID of the git repository. :param int pull_request_id: ID of the pull request. :param str project: Project ID or project name @@ -2266,18 +2281,18 @@ def share_pull_request(self, user_message, repository_id, pull_request_id, proje content = self._serialize.body(user_message, 'ShareNotificationContext') self._send(http_method='POST', location_id='696f3a82-47c9-487f-9117-b9d00972ca84', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) def create_pull_request_status(self, status, repository_id, pull_request_id, project=None): """CreatePullRequestStatus. - Create a pull request status. - :param :class:` ` status: Pull request status to create. + [Preview API] Create a pull request status. + :param :class:` ` status: Pull request status to create. :param str repository_id: The repository ID of the pull request’s target branch. :param int pull_request_id: ID of the pull request. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -2289,14 +2304,14 @@ def create_pull_request_status(self, status, repository_id, pull_request_id, pro content = self._serialize.body(status, 'GitPullRequestStatus') response = self._send(http_method='POST', location_id='b5f6bb4f-8d1e-4d79-8d11-4c9172c99c35', - version='7.0', + version='7.2-preview.2', route_values=route_values, content=content) return self._deserialize('GitPullRequestStatus', response) def delete_pull_request_status(self, repository_id, pull_request_id, status_id, project=None): """DeletePullRequestStatus. - Delete pull request status. + [Preview API] Delete pull request status. :param str repository_id: The repository ID of the pull request’s target branch. :param int pull_request_id: ID of the pull request. :param int status_id: ID of the pull request status. @@ -2313,17 +2328,17 @@ def delete_pull_request_status(self, repository_id, pull_request_id, status_id, route_values['statusId'] = self._serialize.url('status_id', status_id, 'int') self._send(http_method='DELETE', location_id='b5f6bb4f-8d1e-4d79-8d11-4c9172c99c35', - version='7.0', + version='7.2-preview.2', route_values=route_values) def get_pull_request_status(self, repository_id, pull_request_id, status_id, project=None): """GetPullRequestStatus. - Get the specific pull request status by ID. The status ID is unique within the pull request across all iterations. + [Preview API] Get the specific pull request status by ID. The status ID is unique within the pull request across all iterations. :param str repository_id: The repository ID of the pull request’s target branch. :param int pull_request_id: ID of the pull request. :param int status_id: ID of the pull request status. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -2336,13 +2351,13 @@ def get_pull_request_status(self, repository_id, pull_request_id, status_id, pro route_values['statusId'] = self._serialize.url('status_id', status_id, 'int') response = self._send(http_method='GET', location_id='b5f6bb4f-8d1e-4d79-8d11-4c9172c99c35', - version='7.0', + version='7.2-preview.2', route_values=route_values) return self._deserialize('GitPullRequestStatus', response) def get_pull_request_statuses(self, repository_id, pull_request_id, project=None): """GetPullRequestStatuses. - Get all the statuses associated with a pull request. + [Preview API] Get all the statuses associated with a pull request. :param str repository_id: The repository ID of the pull request’s target branch. :param int pull_request_id: ID of the pull request. :param str project: Project ID or project name @@ -2357,14 +2372,14 @@ def get_pull_request_statuses(self, repository_id, pull_request_id, project=None route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') response = self._send(http_method='GET', location_id='b5f6bb4f-8d1e-4d79-8d11-4c9172c99c35', - version='7.0', + version='7.2-preview.2', route_values=route_values) return self._deserialize('[GitPullRequestStatus]', self._unwrap_collection(response)) def update_pull_request_statuses(self, patch_document, repository_id, pull_request_id, project=None): """UpdatePullRequestStatuses. - Update pull request statuses collection. The only supported operation type is `remove`. - :param :class:`<[JsonPatchOperation]> ` patch_document: Operations to apply to the pull request statuses in JSON Patch format. + [Preview API] Update pull request statuses collection. The only supported operation type is `remove`. + :param :class:`<[JsonPatchOperation]> ` patch_document: Operations to apply to the pull request statuses in JSON Patch format. :param str repository_id: The repository ID of the pull request’s target branch. :param int pull_request_id: ID of the pull request. :param str project: Project ID or project name @@ -2379,20 +2394,20 @@ def update_pull_request_statuses(self, patch_document, repository_id, pull_reque content = self._serialize.body(patch_document, '[JsonPatchOperation]') self._send(http_method='PATCH', location_id='b5f6bb4f-8d1e-4d79-8d11-4c9172c99c35', - version='7.0', + version='7.2-preview.2', route_values=route_values, content=content, media_type='application/json-patch+json') def create_comment(self, comment, repository_id, pull_request_id, thread_id, project=None): """CreateComment. - Create a comment on a specific thread in a pull request (up to 500 comments can be created per thread). - :param :class:` ` comment: The comment to create. Comments can be up to 150,000 characters. + [Preview API] Create a comment on a specific thread in a pull request (up to 500 comments can be created per thread). + :param :class:` ` comment: The comment to create. Comments can be up to 150,000 characters. :param str repository_id: The repository ID of the pull request's target branch. :param int pull_request_id: ID of the pull request. :param int thread_id: ID of the thread that the desired comment is in. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -2406,14 +2421,14 @@ def create_comment(self, comment, repository_id, pull_request_id, thread_id, pro content = self._serialize.body(comment, 'Comment') response = self._send(http_method='POST', location_id='965a3ec7-5ed8-455a-bdcb-835a5ea7fe7b', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('Comment', response) def delete_comment(self, repository_id, pull_request_id, thread_id, comment_id, project=None): """DeleteComment. - Delete a comment associated with a specific thread in a pull request. + [Preview API] Delete a comment associated with a specific thread in a pull request. :param str repository_id: The repository ID of the pull request's target branch. :param int pull_request_id: ID of the pull request. :param int thread_id: ID of the thread that the desired comment is in. @@ -2433,18 +2448,18 @@ def delete_comment(self, repository_id, pull_request_id, thread_id, comment_id, route_values['commentId'] = self._serialize.url('comment_id', comment_id, 'int') self._send(http_method='DELETE', location_id='965a3ec7-5ed8-455a-bdcb-835a5ea7fe7b', - version='7.0', + version='7.2-preview.1', route_values=route_values) def get_comment(self, repository_id, pull_request_id, thread_id, comment_id, project=None): """GetComment. - Retrieve a comment associated with a specific thread in a pull request. + [Preview API] Retrieve a comment associated with a specific thread in a pull request. :param str repository_id: The repository ID of the pull request's target branch. :param int pull_request_id: ID of the pull request. :param int thread_id: ID of the thread that the desired comment is in. :param int comment_id: ID of the comment. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -2459,13 +2474,13 @@ def get_comment(self, repository_id, pull_request_id, thread_id, comment_id, pro route_values['commentId'] = self._serialize.url('comment_id', comment_id, 'int') response = self._send(http_method='GET', location_id='965a3ec7-5ed8-455a-bdcb-835a5ea7fe7b', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('Comment', response) def get_comments(self, repository_id, pull_request_id, thread_id, project=None): """GetComments. - Retrieve all comments associated with a specific thread in a pull request. + [Preview API] Retrieve all comments associated with a specific thread in a pull request. :param str repository_id: The repository ID of the pull request's target branch. :param int pull_request_id: ID of the pull request. :param int thread_id: ID of the thread. @@ -2483,20 +2498,20 @@ def get_comments(self, repository_id, pull_request_id, thread_id, project=None): route_values['threadId'] = self._serialize.url('thread_id', thread_id, 'int') response = self._send(http_method='GET', location_id='965a3ec7-5ed8-455a-bdcb-835a5ea7fe7b', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('[Comment]', self._unwrap_collection(response)) def update_comment(self, comment, repository_id, pull_request_id, thread_id, comment_id, project=None): """UpdateComment. - Update a comment associated with a specific thread in a pull request. - :param :class:` ` comment: The comment content that should be updated. Comments can be up to 150,000 characters. + [Preview API] Update a comment associated with a specific thread in a pull request. + :param :class:` ` comment: The comment content that should be updated. Comments can be up to 150,000 characters. :param str repository_id: The repository ID of the pull request's target branch. :param int pull_request_id: ID of the pull request. :param int thread_id: ID of the thread that the desired comment is in. :param int comment_id: ID of the comment to update. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -2512,19 +2527,19 @@ def update_comment(self, comment, repository_id, pull_request_id, thread_id, com content = self._serialize.body(comment, 'Comment') response = self._send(http_method='PATCH', location_id='965a3ec7-5ed8-455a-bdcb-835a5ea7fe7b', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('Comment', response) def create_thread(self, comment_thread, repository_id, pull_request_id, project=None): """CreateThread. - Create a thread in a pull request. - :param :class:` ` comment_thread: The thread to create. Thread must contain at least one comment. + [Preview API] Create a thread in a pull request. + :param :class:` ` comment_thread: The thread to create. Thread must contain at least one comment. :param str repository_id: Repository ID of the pull request's target branch. :param int pull_request_id: ID of the pull request. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -2536,21 +2551,21 @@ def create_thread(self, comment_thread, repository_id, pull_request_id, project= content = self._serialize.body(comment_thread, 'GitPullRequestCommentThread') response = self._send(http_method='POST', location_id='ab6e2e5d-a0b7-4153-b64a-a4efe0d49449', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('GitPullRequestCommentThread', response) def get_pull_request_thread(self, repository_id, pull_request_id, thread_id, project=None, iteration=None, base_iteration=None): """GetPullRequestThread. - Retrieve a thread in a pull request. + [Preview API] Retrieve a thread in a pull request. :param str repository_id: The repository ID of the pull request's target branch. :param int pull_request_id: ID of the pull request. :param int thread_id: ID of the thread. :param str project: Project ID or project name :param int iteration: If specified, thread position will be tracked using this iteration as the right side of the diff. :param int base_iteration: If specified, thread position will be tracked using this iteration as the left side of the diff. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -2568,14 +2583,14 @@ def get_pull_request_thread(self, repository_id, pull_request_id, thread_id, pro query_parameters['$baseIteration'] = self._serialize.query('base_iteration', base_iteration, 'int') response = self._send(http_method='GET', location_id='ab6e2e5d-a0b7-4153-b64a-a4efe0d49449', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('GitPullRequestCommentThread', response) def get_threads(self, repository_id, pull_request_id, project=None, iteration=None, base_iteration=None): """GetThreads. - Retrieve all threads in a pull request. + [Preview API] Retrieve all threads in a pull request. :param str repository_id: The repository ID of the pull request's target branch. :param int pull_request_id: ID of the pull request. :param str project: Project ID or project name @@ -2597,20 +2612,20 @@ def get_threads(self, repository_id, pull_request_id, project=None, iteration=No query_parameters['$baseIteration'] = self._serialize.query('base_iteration', base_iteration, 'int') response = self._send(http_method='GET', location_id='ab6e2e5d-a0b7-4153-b64a-a4efe0d49449', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[GitPullRequestCommentThread]', self._unwrap_collection(response)) def update_thread(self, comment_thread, repository_id, pull_request_id, thread_id, project=None): """UpdateThread. - Update a thread in a pull request. - :param :class:` ` comment_thread: The thread content that should be updated. + [Preview API] Update a thread in a pull request. + :param :class:` ` comment_thread: The thread content that should be updated. :param str repository_id: The repository ID of the pull request's target branch. :param int pull_request_id: ID of the pull request. :param int thread_id: ID of the thread to update. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -2624,14 +2639,14 @@ def update_thread(self, comment_thread, repository_id, pull_request_id, thread_i content = self._serialize.body(comment_thread, 'GitPullRequestCommentThread') response = self._send(http_method='PATCH', location_id='ab6e2e5d-a0b7-4153-b64a-a4efe0d49449', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('GitPullRequestCommentThread', response) def get_pull_request_work_item_refs(self, repository_id, pull_request_id, project=None): """GetPullRequestWorkItemRefs. - Retrieve a list of work items associated with a pull request. + [Preview API] Retrieve a list of work items associated with a pull request. :param str repository_id: ID or name of the repository. :param int pull_request_id: ID of the pull request. :param str project: Project ID or project name @@ -2646,17 +2661,17 @@ def get_pull_request_work_item_refs(self, repository_id, pull_request_id, projec route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') response = self._send(http_method='GET', location_id='0a637fcc-5370-4ce8-b0e8-98091f5f9482', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('[ResourceRef]', self._unwrap_collection(response)) def create_push(self, push, repository_id, project=None): """CreatePush. - Push changes to the repository. - :param :class:` ` push: + [Preview API] Push changes to the repository. + :param :class:` ` push: :param str repository_id: The name or ID of the repository. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -2666,20 +2681,20 @@ def create_push(self, push, repository_id, project=None): content = self._serialize.body(push, 'GitPush') response = self._send(http_method='POST', location_id='ea98d07b-3c87-4971-8ede-a613694ffb55', - version='7.0', + version='7.2-preview.3', route_values=route_values, content=content) return self._deserialize('GitPush', response) def get_push(self, repository_id, push_id, project=None, include_commits=None, include_ref_updates=None): """GetPush. - Retrieves a particular push. + [Preview API] Retrieves a particular push. :param str repository_id: The name or ID of the repository. :param int push_id: ID of the push. :param str project: Project ID or project name :param int include_commits: The number of commits to include in the result. :param bool include_ref_updates: If true, include the list of refs that were updated by the push. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -2695,19 +2710,19 @@ def get_push(self, repository_id, push_id, project=None, include_commits=None, i query_parameters['includeRefUpdates'] = self._serialize.query('include_ref_updates', include_ref_updates, 'bool') response = self._send(http_method='GET', location_id='ea98d07b-3c87-4971-8ede-a613694ffb55', - version='7.0', + version='7.2-preview.3', route_values=route_values, query_parameters=query_parameters) return self._deserialize('GitPush', response) def get_pushes(self, repository_id, project=None, skip=None, top=None, search_criteria=None): """GetPushes. - Retrieves pushes associated with the specified repository. + [Preview API] Retrieves pushes associated with the specified repository. :param str repository_id: The name or ID of the repository. :param str project: Project ID or project name :param int skip: Number of pushes to skip. :param int top: Number of pushes to return. - :param :class:` ` search_criteria: Search criteria attributes: fromDate, toDate, pusherId, refName, includeRefUpdates or includeLinks. fromDate: Start date to search from. toDate: End date to search to. pusherId: Identity of the person who submitted the push. refName: Branch name to consider. includeRefUpdates: If true, include the list of refs that were updated by the push. includeLinks: Whether to include the _links field on the shallow references. + :param :class:` ` search_criteria: Search criteria attributes: fromDate, toDate, pusherId, refName, includeRefUpdates or includeLinks. fromDate: Start date to search from. toDate: End date to search to. pusherId: Identity of the person who submitted the push. refName: Branch name to consider. includeRefUpdates: If true, include the list of refs that were updated by the push. includeLinks: Whether to include the _links field on the shallow references. :rtype: [GitPush] """ route_values = {} @@ -2735,14 +2750,14 @@ def get_pushes(self, repository_id, project=None, skip=None, top=None, search_cr query_parameters['searchCriteria.includeLinks'] = search_criteria.include_links response = self._send(http_method='GET', location_id='ea98d07b-3c87-4971-8ede-a613694ffb55', - version='7.0', + version='7.2-preview.3', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[GitPush]', self._unwrap_collection(response)) def delete_repository_from_recycle_bin(self, project, repository_id): """DeleteRepositoryFromRecycleBin. - Destroy (hard delete) a soft-deleted Git repository. + [Preview API] Destroy (hard delete) a soft-deleted Git repository. :param str project: Project ID or project name :param str repository_id: The ID of the repository. """ @@ -2753,12 +2768,12 @@ def delete_repository_from_recycle_bin(self, project, repository_id): route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') self._send(http_method='DELETE', location_id='a663da97-81db-4eb3-8b83-287670f63073', - version='7.0', + version='7.2-preview.1', route_values=route_values) def get_recycle_bin_repositories(self, project): """GetRecycleBinRepositories. - Retrieve soft-deleted git repositories from the recycle bin. + [Preview API] Retrieve soft-deleted git repositories from the recycle bin. :param str project: Project ID or project name :rtype: [GitDeletedRepository] """ @@ -2767,17 +2782,17 @@ def get_recycle_bin_repositories(self, project): route_values['project'] = self._serialize.url('project', project, 'str') response = self._send(http_method='GET', location_id='a663da97-81db-4eb3-8b83-287670f63073', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('[GitDeletedRepository]', self._unwrap_collection(response)) def restore_repository_from_recycle_bin(self, repository_details, project, repository_id): """RestoreRepositoryFromRecycleBin. - Recover a soft-deleted Git repository. Recently deleted repositories go into a soft-delete state for a period of time before they are hard deleted and become unrecoverable. - :param :class:` ` repository_details: + [Preview API] Recover a soft-deleted Git repository. Recently deleted repositories go into a soft-delete state for a period of time before they are hard deleted and become unrecoverable. + :param :class:` ` repository_details: :param str project: Project ID or project name :param str repository_id: The ID of the repository. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -2787,14 +2802,14 @@ def restore_repository_from_recycle_bin(self, repository_details, project, repos content = self._serialize.body(repository_details, 'GitRecycleBinRepositoryDetails') response = self._send(http_method='PATCH', location_id='a663da97-81db-4eb3-8b83-287670f63073', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('GitRepository', response) def get_refs(self, repository_id, project=None, filter=None, include_links=None, include_statuses=None, include_my_branches=None, latest_statuses_only=None, peel_tags=None, filter_contains=None, top=None, continuation_token=None): """GetRefs. - Queries the provided repository for its refs and returns them. + [Preview API] Queries the provided repository for its refs and returns them. :param str repository_id: The name or ID of the repository. :param str project: Project ID or project name :param str filter: [optional] A filter to apply to the refs (starts with). @@ -2806,7 +2821,7 @@ def get_refs(self, repository_id, project=None, filter=None, include_links=None, :param str filter_contains: [optional] A filter to apply to the refs (contains). :param int top: [optional] Maximum number of refs to return. It cannot be bigger than 1000. If it is not provided but continuationToken is, top will default to 100. :param str continuation_token: The continuation token used for pagination. - :rtype: :class:`<[GitRef]> ` + :rtype: :class:`<[GitRef]> ` """ route_values = {} if project is not None: @@ -2834,20 +2849,20 @@ def get_refs(self, repository_id, project=None, filter=None, include_links=None, query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'str') response = self._send(http_method='GET', location_id='2d874a60-a811-4f62-9c9f-963a6ea0a55b', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[GitRef]', self._unwrap_collection(response)) def update_ref(self, new_ref_info, repository_id, filter, project=None, project_id=None): """UpdateRef. - Lock or Unlock a branch. - :param :class:` ` new_ref_info: The ref update action (lock/unlock) to perform + [Preview API] Lock or Unlock a branch. + :param :class:` ` new_ref_info: The ref update action (lock/unlock) to perform :param str repository_id: The name or ID of the repository. :param str filter: The name of the branch to lock/unlock :param str project: Project ID or project name :param str project_id: ID or name of the team project. Optional if specifying an ID for repository. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -2862,7 +2877,7 @@ def update_ref(self, new_ref_info, repository_id, filter, project=None, project_ content = self._serialize.body(new_ref_info, 'GitRefUpdate') response = self._send(http_method='PATCH', location_id='2d874a60-a811-4f62-9c9f-963a6ea0a55b', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters, content=content) @@ -2870,7 +2885,7 @@ def update_ref(self, new_ref_info, repository_id, filter, project=None, project_ def update_refs(self, ref_updates, repository_id, project=None, project_id=None): """UpdateRefs. - Creating, updating, or deleting refs(branches). + [Preview API] Creating, updating, or deleting refs(branches). :param [GitRefUpdate] ref_updates: List of ref updates to attempt to perform :param str repository_id: The name or ID of the repository. :param str project: Project ID or project name @@ -2888,7 +2903,7 @@ def update_refs(self, ref_updates, repository_id, project=None, project_id=None) content = self._serialize.body(ref_updates, '[GitRefUpdate]') response = self._send(http_method='POST', location_id='2d874a60-a811-4f62-9c9f-963a6ea0a55b', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters, content=content) @@ -2896,10 +2911,10 @@ def update_refs(self, ref_updates, repository_id, project=None, project_id=None) def create_favorite(self, favorite, project): """CreateFavorite. - Creates a ref favorite - :param :class:` ` favorite: The ref favorite to create. + [Preview API] Creates a ref favorite + :param :class:` ` favorite: The ref favorite to create. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -2907,14 +2922,14 @@ def create_favorite(self, favorite, project): content = self._serialize.body(favorite, 'GitRefFavorite') response = self._send(http_method='POST', location_id='876f70af-5792-485a-a1c7-d0a7b2f42bbb', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('GitRefFavorite', response) def delete_ref_favorite(self, project, favorite_id): """DeleteRefFavorite. - Deletes the refs favorite specified + [Preview API] Deletes the refs favorite specified :param str project: Project ID or project name :param int favorite_id: The Id of the ref favorite to delete. """ @@ -2925,15 +2940,15 @@ def delete_ref_favorite(self, project, favorite_id): route_values['favoriteId'] = self._serialize.url('favorite_id', favorite_id, 'int') self._send(http_method='DELETE', location_id='876f70af-5792-485a-a1c7-d0a7b2f42bbb', - version='7.0', + version='7.2-preview.1', route_values=route_values) def get_ref_favorite(self, project, favorite_id): """GetRefFavorite. - Gets the refs favorite for a favorite Id. + [Preview API] Gets the refs favorite for a favorite Id. :param str project: Project ID or project name :param int favorite_id: The Id of the requested ref favorite. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -2942,13 +2957,13 @@ def get_ref_favorite(self, project, favorite_id): route_values['favoriteId'] = self._serialize.url('favorite_id', favorite_id, 'int') response = self._send(http_method='GET', location_id='876f70af-5792-485a-a1c7-d0a7b2f42bbb', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('GitRefFavorite', response) def get_ref_favorites(self, project, repository_id=None, identity_id=None): """GetRefFavorites. - Gets the refs favorites for a repo and an identity. + [Preview API] Gets the refs favorites for a repo and an identity. :param str project: Project ID or project name :param str repository_id: The id of the repository. :param str identity_id: The id of the identity whose favorites are to be retrieved. If null, the requesting identity is used. @@ -2964,18 +2979,38 @@ def get_ref_favorites(self, project, repository_id=None, identity_id=None): query_parameters['identityId'] = self._serialize.query('identity_id', identity_id, 'str') response = self._send(http_method='GET', location_id='876f70af-5792-485a-a1c7-d0a7b2f42bbb', - version='7.0', + version='7.2-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('[GitRefFavorite]', self._unwrap_collection(response)) + + def get_ref_favorites_for_project(self, project, identity_id=None): + """GetRefFavoritesForProject. + [Preview API] + :param str project: Project ID or project name + :param str identity_id: + :rtype: [GitRefFavorite] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if identity_id is not None: + query_parameters['identityId'] = self._serialize.query('identity_id', identity_id, 'str') + response = self._send(http_method='GET', + location_id='4720896c-594c-4a6d-b94c-12eddd80b34a', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[GitRefFavorite]', self._unwrap_collection(response)) def create_repository(self, git_repository_to_create, project=None, source_ref=None): """CreateRepository. - Create a git repository in a team project. - :param :class:` ` git_repository_to_create: Specify the repo name, team project and/or parent repository. Team project information can be omitted from gitRepositoryToCreate if the request is project-scoped (i.e., includes project Id). + [Preview API] Create a git repository in a team project. + :param :class:` ` git_repository_to_create: Specify the repo name, team project and/or parent repository. Team project information can be omitted from gitRepositoryToCreate if the request is project-scoped (i.e., includes project Id). :param str project: Project ID or project name :param str source_ref: [optional] Specify the source refs to use while creating a fork repo - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -2986,7 +3021,7 @@ def create_repository(self, git_repository_to_create, project=None, source_ref=N content = self._serialize.body(git_repository_to_create, 'GitRepositoryCreateOptions') response = self._send(http_method='POST', location_id='225f7195-f9c7-4d14-ab28-a83f7ff77e1f', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters, content=content) @@ -2994,7 +3029,7 @@ def create_repository(self, git_repository_to_create, project=None, source_ref=N def delete_repository(self, repository_id, project=None): """DeleteRepository. - Delete a git repository + [Preview API] Delete a git repository :param str repository_id: The ID of the repository. :param str project: Project ID or project name """ @@ -3005,12 +3040,12 @@ def delete_repository(self, repository_id, project=None): route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') self._send(http_method='DELETE', location_id='225f7195-f9c7-4d14-ab28-a83f7ff77e1f', - version='7.0', + version='7.2-preview.1', route_values=route_values) def get_repositories(self, project=None, include_links=None, include_all_urls=None, include_hidden=None): """GetRepositories. - Retrieve git repositories. + [Preview API] Retrieve git repositories. :param str project: Project ID or project name :param bool include_links: [optional] True to include reference links. The default value is false. :param bool include_all_urls: [optional] True to include all remote URLs. The default value is false. @@ -3029,17 +3064,17 @@ def get_repositories(self, project=None, include_links=None, include_all_urls=No query_parameters['includeHidden'] = self._serialize.query('include_hidden', include_hidden, 'bool') response = self._send(http_method='GET', location_id='225f7195-f9c7-4d14-ab28-a83f7ff77e1f', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[GitRepository]', self._unwrap_collection(response)) def get_repository(self, repository_id, project=None): """GetRepository. - Retrieve a git repository. + [Preview API] Retrieve a git repository. :param str repository_id: The name or ID of the repository. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -3048,17 +3083,17 @@ def get_repository(self, repository_id, project=None): route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') response = self._send(http_method='GET', location_id='225f7195-f9c7-4d14-ab28-a83f7ff77e1f', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('GitRepository', response) def get_repository_with_parent(self, repository_id, include_parent, project=None): """GetRepositoryWithParent. - Retrieve a git repository. + [Preview API] Retrieve a git repository. :param str repository_id: The name or ID of the repository. :param bool include_parent: True to include parent repository. Only available in authenticated calls. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -3070,18 +3105,18 @@ def get_repository_with_parent(self, repository_id, include_parent, project=None query_parameters['includeParent'] = self._serialize.query('include_parent', include_parent, 'bool') response = self._send(http_method='GET', location_id='225f7195-f9c7-4d14-ab28-a83f7ff77e1f', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('GitRepository', response) def update_repository(self, new_repository_info, repository_id, project=None): """UpdateRepository. - Updates the Git repository with either a new repo name or a new default branch. - :param :class:` ` new_repository_info: Specify a new repo name or a new default branch of the repository + [Preview API] Updates the Git repository with either a new repo name or a new default branch. + :param :class:` ` new_repository_info: Specify a new repo name or a new default branch of the repository :param str repository_id: The ID of the repository. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -3091,17 +3126,17 @@ def update_repository(self, new_repository_info, repository_id, project=None): content = self._serialize.body(new_repository_info, 'GitRepository') response = self._send(http_method='PATCH', location_id='225f7195-f9c7-4d14-ab28-a83f7ff77e1f', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('GitRepository', response) def get_stats(self, project, repository_id): """GetStats. - Retrieves statistics of a repository. + [Preview API] Retrieves statistics of a repository. :param str project: Project ID or project name :param str repository_id: Friendly name or guid of repository. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -3110,17 +3145,17 @@ def get_stats(self, project, repository_id): route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') response = self._send(http_method='GET', location_id='616a5255-74b3-40f5-ae1d-bbae2eec8db5', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('GitRepositoryStats', response) def create_revert(self, revert_to_create, project, repository_id): """CreateRevert. - Starts the operation to create a new branch which reverts changes introduced by either a specific commit or commits that are associated to a pull request. - :param :class:` ` revert_to_create: + [Preview API] Starts the operation to create a new branch which reverts changes introduced by either a specific commit or commits that are associated to a pull request. + :param :class:` ` revert_to_create: :param str project: Project ID or project name :param str repository_id: ID of the repository. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -3130,18 +3165,18 @@ def create_revert(self, revert_to_create, project, repository_id): content = self._serialize.body(revert_to_create, 'GitAsyncRefOperationParameters') response = self._send(http_method='POST', location_id='bc866058-5449-4715-9cf1-a510b6ff193c', - version='7.0', + version='7.2-preview.2', route_values=route_values, content=content) return self._deserialize('GitRevert', response) def get_revert(self, project, revert_id, repository_id): """GetRevert. - Retrieve information about a revert operation by revert Id. + [Preview API] Retrieve information about a revert operation by revert Id. :param str project: Project ID or project name :param int revert_id: ID of the revert operation. :param str repository_id: ID of the repository. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -3152,17 +3187,17 @@ def get_revert(self, project, revert_id, repository_id): route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') response = self._send(http_method='GET', location_id='bc866058-5449-4715-9cf1-a510b6ff193c', - version='7.0', + version='7.2-preview.2', route_values=route_values) return self._deserialize('GitRevert', response) def get_revert_for_ref_name(self, project, repository_id, ref_name): """GetRevertForRefName. - Retrieve information about a revert operation for a specific branch. + [Preview API] Retrieve information about a revert operation for a specific branch. :param str project: Project ID or project name :param str repository_id: ID of the repository. :param str ref_name: The GitAsyncRefOperationParameters generatedRefName used for the revert operation. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -3174,19 +3209,19 @@ def get_revert_for_ref_name(self, project, repository_id, ref_name): query_parameters['refName'] = self._serialize.query('ref_name', ref_name, 'str') response = self._send(http_method='GET', location_id='bc866058-5449-4715-9cf1-a510b6ff193c', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters) return self._deserialize('GitRevert', response) def create_commit_status(self, git_commit_status_to_create, commit_id, repository_id, project=None): """CreateCommitStatus. - Create Git commit status. - :param :class:` ` git_commit_status_to_create: Git commit status object to create. + [Preview API] Create Git commit status. + :param :class:` ` git_commit_status_to_create: Git commit status object to create. :param str commit_id: ID of the Git commit. :param str repository_id: ID of the repository. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -3198,14 +3233,14 @@ def create_commit_status(self, git_commit_status_to_create, commit_id, repositor content = self._serialize.body(git_commit_status_to_create, 'GitStatus') response = self._send(http_method='POST', location_id='428dd4fb-fda5-4722-af02-9313b80305da', - version='7.0', + version='7.2-preview.2', route_values=route_values, content=content) return self._deserialize('GitStatus', response) def get_statuses(self, commit_id, repository_id, project=None, top=None, skip=None, latest_only=None): """GetStatuses. - Get statuses associated with the Git commit. + [Preview API] Get statuses associated with the Git commit. :param str commit_id: ID of the Git commit. :param str repository_id: ID of the repository. :param str project: Project ID or project name @@ -3230,14 +3265,14 @@ def get_statuses(self, commit_id, repository_id, project=None, top=None, skip=No query_parameters['latestOnly'] = self._serialize.query('latest_only', latest_only, 'bool') response = self._send(http_method='GET', location_id='428dd4fb-fda5-4722-af02-9313b80305da', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[GitStatus]', self._unwrap_collection(response)) def get_suggestions(self, repository_id, project=None): """GetSuggestions. - Retrieve a pull request suggestion for a particular repository or team project. + [Preview API] Retrieve a pull request suggestion for a particular repository or team project. :param str repository_id: ID of the git repository. :param str project: Project ID or project name :rtype: [GitSuggestion] @@ -3249,20 +3284,20 @@ def get_suggestions(self, repository_id, project=None): route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') response = self._send(http_method='GET', location_id='9393b4fb-4445-4919-972b-9ad16f442d83', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('[GitSuggestion]', self._unwrap_collection(response)) def get_tree(self, repository_id, sha1, project=None, project_id=None, recursive=None, file_name=None): """GetTree. - The Tree endpoint returns the collection of objects underneath the specified tree. Trees are folders in a Git repository. + [Preview API] The Tree endpoint returns the collection of objects underneath the specified tree. Trees are folders in a Git repository. :param str repository_id: Repository Id. :param str sha1: SHA1 hash of the tree object. :param str project: Project ID or project name :param str project_id: Project Id. :param bool recursive: Search recursively. Include trees underneath this tree. Default is false. :param str file_name: Name to use if a .zip file is returned. Default is the object ID. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -3280,14 +3315,14 @@ def get_tree(self, repository_id, sha1, project=None, project_id=None, recursive query_parameters['fileName'] = self._serialize.query('file_name', file_name, 'str') response = self._send(http_method='GET', location_id='729f6437-6f92-44ec-8bee-273a7111063c', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('GitTreeRef', response) def get_tree_zip(self, repository_id, sha1, project=None, project_id=None, recursive=None, file_name=None, **kwargs): """GetTreeZip. - The Tree endpoint returns the collection of objects underneath the specified tree. Trees are folders in a Git repository. + [Preview API] The Tree endpoint returns the collection of objects underneath the specified tree. Trees are folders in a Git repository. :param str repository_id: Repository Id. :param str sha1: SHA1 hash of the tree object. :param str project: Project ID or project name @@ -3312,7 +3347,7 @@ def get_tree_zip(self, repository_id, sha1, project=None, project_id=None, recur query_parameters['fileName'] = self._serialize.query('file_name', file_name, 'str') response = self._send(http_method='GET', location_id='729f6437-6f92-44ec-8bee-273a7111063c', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters, accept_media_type='application/zip') diff --git a/azure-devops/azure/devops/v7_0/git/models.py b/azure-devops/azure/devops/v7_2/git/models.py similarity index 88% rename from azure-devops/azure/devops/v7_0/git/models.py rename to azure-devops/azure/devops/v7_2/git/models.py index 4aca8973..6c7a68bb 100644 --- a/azure-devops/azure/devops/v7_0/git/models.py +++ b/azure-devops/azure/devops/v7_2/git/models.py @@ -9,14 +9,72 @@ from msrest.serialization import Model +class AdvSecEnablementStatus(Model): + """ + :param changed_by_id: Enabled by VSID + :type changed_by_id: str + :param changed_on_date: Enabled changed on datetime + :type changed_on_date: datetime + :param enabled: Enabled status 0 disabled, 1 enabled, Null never explicitly set, always whatever project is, ya this should probably be an enum somewhere + :type enabled: bool + :param enabled_changed_on_date: Enabled changed on datetime To Be Removed M223 + + :type enabled_changed_on_date: datetime + :param project_id: ProjectId + :type project_id: str + :param repository_id: RepositoryId + :type repository_id: str + """ + + _attribute_map = { + 'changed_by_id': {'key': 'changedById', 'type': 'str'}, + 'changed_on_date': {'key': 'changedOnDate', 'type': 'iso-8601'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'enabled_changed_on_date': {'key': 'enabledChangedOnDate', 'type': 'iso-8601'}, + 'project_id': {'key': 'projectId', 'type': 'str'}, + 'repository_id': {'key': 'repositoryId', 'type': 'str'} + } + + def __init__(self, changed_by_id=None, changed_on_date=None, enabled=None, enabled_changed_on_date=None, project_id=None, repository_id=None): + super(AdvSecEnablementStatus, self).__init__() + self.changed_by_id = changed_by_id + self.changed_on_date = changed_on_date + self.enabled = enabled + self.enabled_changed_on_date = enabled_changed_on_date + self.project_id = project_id + self.repository_id = repository_id + + +class AdvSecEnablementUpdate(Model): + """ + :param new_status: New status + :type new_status: bool + :param project_id: ProjectId + :type project_id: str + :param repository_id: RepositoryId Actual RepositoryId to Modify or Magic Repository Id "FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF" for ALL Repositories for that project + :type repository_id: str + """ + + _attribute_map = { + 'new_status': {'key': 'newStatus', 'type': 'bool'}, + 'project_id': {'key': 'projectId', 'type': 'str'}, + 'repository_id': {'key': 'repositoryId', 'type': 'str'} + } + + def __init__(self, new_status=None, project_id=None, repository_id=None): + super(AdvSecEnablementUpdate, self).__init__() + self.new_status = new_status + self.project_id = project_id + self.repository_id = repository_id + + class Attachment(Model): """ Meta data for a file attached to an artifact. :param _links: Links to other related objects. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param author: The person that uploaded this attachment. - :type author: :class:`IdentityRef ` + :type author: :class:`IdentityRef ` :param content_hash: Content hash of on-disk representation of file content. Its calculated by the server by using SHA1 hash function. :type content_hash: str :param created_date: The time the attachment was uploaded. @@ -28,7 +86,7 @@ class Attachment(Model): :param id: Id of the attachment. :type id: int :param properties: Extended properties. - :type properties: :class:`object ` + :type properties: :class:`object ` :param url: The url to download the content of the attachment. :type url: str """ @@ -58,14 +116,156 @@ def __init__(self, _links=None, author=None, content_hash=None, created_date=Non self.url = url +class BillableCommitter(Model): + """ + Used by AdvSec to return billable committers. + + :param repo_id: RepositoryId commit was pushed to. + :type repo_id: str + :param vsid: Visual Studio ID /Team Foundation ID + :type vsid: str + """ + + _attribute_map = { + 'repo_id': {'key': 'repoId', 'type': 'str'}, + 'vsid': {'key': 'vsid', 'type': 'str'} + } + + def __init__(self, repo_id=None, vsid=None): + super(BillableCommitter, self).__init__() + self.repo_id = repo_id + self.vsid = vsid + + +class BillableCommitterDetail(BillableCommitter): + """ + :param repo_id: RepositoryId commit was pushed to. + :type repo_id: str + :param vsid: Visual Studio ID /Team Foundation ID + :type vsid: str + :param commit_id: ID (SHA-1) of the commit. + :type commit_id: str + :param committer_email: Committer email address after parsing. + :type committer_email: str + :param commit_time: Time reported by the commit. + :type commit_time: datetime + :param display_name: DisplayName of the Pusher. + :type display_name: str + :param mail_nick_name: MailNickName of the Pusher. + :type mail_nick_name: str + :param project_id: Project Id commit was pushed to. + :type project_id: str + :param project_name: Project name commit was pushed to. + :type project_name: str + :param pushed_time: Time of the push that contained the commit. + :type pushed_time: datetime + :param pusher_id: Pusher Id for the push. + :type pusher_id: str + :param push_id: Push Id that contained the commit. + :type push_id: int + :param repo_name: Repository name commit was pushed to. + :type repo_name: str + :param sam_account_name: SamAccountName of the Pusher. + :type sam_account_name: str + """ + + _attribute_map = { + 'repo_id': {'key': 'repoId', 'type': 'str'}, + 'vsid': {'key': 'vsid', 'type': 'str'}, + 'commit_id': {'key': 'commitId', 'type': 'str'}, + 'committer_email': {'key': 'committerEmail', 'type': 'str'}, + 'commit_time': {'key': 'commitTime', 'type': 'iso-8601'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'mail_nick_name': {'key': 'mailNickName', 'type': 'str'}, + 'project_id': {'key': 'projectId', 'type': 'str'}, + 'project_name': {'key': 'projectName', 'type': 'str'}, + 'pushed_time': {'key': 'pushedTime', 'type': 'iso-8601'}, + 'pusher_id': {'key': 'pusherId', 'type': 'str'}, + 'push_id': {'key': 'pushId', 'type': 'int'}, + 'repo_name': {'key': 'repoName', 'type': 'str'}, + 'sam_account_name': {'key': 'samAccountName', 'type': 'str'} + } + + def __init__(self, repo_id=None, vsid=None, commit_id=None, committer_email=None, commit_time=None, display_name=None, mail_nick_name=None, project_id=None, project_name=None, pushed_time=None, pusher_id=None, push_id=None, repo_name=None, sam_account_name=None): + super(BillableCommitterDetail, self).__init__(repo_id=repo_id, vsid=vsid) + self.commit_id = commit_id + self.committer_email = committer_email + self.commit_time = commit_time + self.display_name = display_name + self.mail_nick_name = mail_nick_name + self.project_id = project_id + self.project_name = project_name + self.pushed_time = pushed_time + self.pusher_id = pusher_id + self.push_id = push_id + self.repo_name = repo_name + self.sam_account_name = sam_account_name + + +class BillablePusher(Model): + """ + Used by AdvSec to estimate billable pushers for a Host or Project. + + :param project_id: ProjectId that was pushed to. + :type project_id: str + :param repo_id: RepositoryId that was pushed to. + :type repo_id: str + :param vsid: Visual Studio ID /Team Foundation ID + :type vsid: str + """ + + _attribute_map = { + 'project_id': {'key': 'projectId', 'type': 'str'}, + 'repo_id': {'key': 'repoId', 'type': 'str'}, + 'vsid': {'key': 'vsid', 'type': 'str'} + } + + def __init__(self, project_id=None, repo_id=None, vsid=None): + super(BillablePusher, self).__init__() + self.project_id = project_id + self.repo_id = repo_id + self.vsid = vsid + + +class Change(Model): + """ + :param change_type: The type of change that was made to the item. + :type change_type: object + :param item: Current version. + :type item: object + :param new_content: Content of the item after the change. + :type new_content: :class:`ItemContent ` + :param source_server_item: Path of the item on the server. + :type source_server_item: str + :param url: URL to retrieve the item. + :type url: str + """ + + _attribute_map = { + 'change_type': {'key': 'changeType', 'type': 'object'}, + 'item': {'key': 'item', 'type': 'object'}, + 'new_content': {'key': 'newContent', 'type': 'ItemContent'}, + 'source_server_item': {'key': 'sourceServerItem', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, change_type=None, item=None, new_content=None, source_server_item=None, url=None): + super(Change, self).__init__() + self.change_type = change_type + self.item = item + self.new_content = new_content + self.source_server_item = source_server_item + self.url = url + + class Comment(Model): """ Represents a comment which is one of potentially many in a comment thread. :param _links: Links to other related objects. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param author: The author of the comment. - :type author: :class:`IdentityRef ` + :type author: :class:`IdentityRef ` :param comment_type: The comment type at the time of creation. :type comment_type: object :param content: The comment content. @@ -83,7 +283,7 @@ class Comment(Model): :param published_date: The date the comment was first published. :type published_date: datetime :param users_liked: A list of the users who have liked this comment. - :type users_liked: list of :class:`IdentityRef ` + :type users_liked: list of :class:`IdentityRef ` """ _attribute_map = { @@ -140,7 +340,7 @@ class CommentPosition(Model): """ :param line: The line number of a thread's position. Starts at 1. :type line: int - :param offset: The character offset of a thread's position inside of a line. Starts at 0. + :param offset: The character offset of a thread's position inside of a line. Starts at 1. :type offset: int """ @@ -160,9 +360,9 @@ class CommentThread(Model): Represents a comment thread of a pull request. A thread contains meta data about the file it was left on along with one or more comments (an initial comment and the subsequent replies). :param _links: Links to other related objects. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param comments: A list of the comments. - :type comments: list of :class:`Comment ` + :type comments: list of :class:`Comment ` :param id: The comment thread id. :type id: int :param identities: Set of identities related to this thread @@ -172,13 +372,13 @@ class CommentThread(Model): :param last_updated_date: The time this thread was last updated. :type last_updated_date: datetime :param properties: Optional properties associated with the thread as a collection of key-value pairs. - :type properties: :class:`object ` + :type properties: :class:`object ` :param published_date: The time this thread was published. :type published_date: datetime :param status: The status of the comment thread. :type status: object :param thread_context: Specify thread context such as position in left/right file. - :type thread_context: :class:`CommentThreadContext ` + :type thread_context: :class:`CommentThreadContext ` """ _attribute_map = { @@ -213,13 +413,13 @@ class CommentThreadContext(Model): :param file_path: File path relative to the root of the repository. It's up to the client to use any path format. :type file_path: str :param left_file_end: Position of last character of the thread's span in left file. - :type left_file_end: :class:`CommentPosition ` + :type left_file_end: :class:`CommentPosition ` :param left_file_start: Position of first character of the thread's span in left file. - :type left_file_start: :class:`CommentPosition ` + :type left_file_start: :class:`CommentPosition ` :param right_file_end: Position of last character of the thread's span in right file. - :type right_file_end: :class:`CommentPosition ` + :type right_file_end: :class:`CommentPosition ` :param right_file_start: Position of first character of the thread's span in right file. - :type right_file_start: :class:`CommentPosition ` + :type right_file_start: :class:`CommentPosition ` """ _attribute_map = { @@ -248,13 +448,13 @@ class CommentTrackingCriteria(Model): :param orig_file_path: Original filepath the thread was created on before tracking. This will be different than the current thread filepath if the file in question was renamed in a later iteration. :type orig_file_path: str :param orig_left_file_end: Original position of last character of the thread's span in left file. - :type orig_left_file_end: :class:`CommentPosition ` + :type orig_left_file_end: :class:`CommentPosition ` :param orig_left_file_start: Original position of first character of the thread's span in left file. - :type orig_left_file_start: :class:`CommentPosition ` + :type orig_left_file_start: :class:`CommentPosition ` :param orig_right_file_end: Original position of last character of the thread's span in right file. - :type orig_right_file_end: :class:`CommentPosition ` + :type orig_right_file_end: :class:`CommentPosition ` :param orig_right_file_start: Original position of first character of the thread's span in right file. - :type orig_right_file_start: :class:`CommentPosition ` + :type orig_right_file_start: :class:`CommentPosition ` :param second_comparing_iteration: The iteration of the file on the right side of the diff that the thread will be tracked to. Threads were tracked if this is greater than 0. :type second_comparing_iteration: int """ @@ -324,7 +524,7 @@ class FileDiff(Model): Provides properties that describe file differences :param line_diff_blocks: The collection of line diff blocks - :type line_diff_blocks: list of :class:`LineDiffBlock ` + :type line_diff_blocks: list of :class:`LineDiffBlock ` :param original_path: Original path of item if different from current path. :type original_path: str :param path: Current path of item @@ -372,7 +572,7 @@ class FileDiffsCriteria(Model): :param base_version_commit: Commit ID of the base version :type base_version_commit: str :param file_diff_params: List of parameters for each of the files for which we need to get the file diff - :type file_diff_params: list of :class:`FileDiffParams ` + :type file_diff_params: list of :class:`FileDiffParams ` :param target_version_commit: Commit ID of the target version :type target_version_commit: str """ @@ -401,9 +601,9 @@ class GitAnnotatedTag(Model): :param object_id: The objectId (Sha1Id) of the tag. :type object_id: str :param tagged_by: User info and date of tagging. - :type tagged_by: :class:`GitUserDate ` + :type tagged_by: :class:`GitUserDate ` :param tagged_object: Tagged git object. - :type tagged_object: :class:`GitObject ` + :type tagged_object: :class:`GitObject ` :param url: :type url: str """ @@ -430,11 +630,11 @@ def __init__(self, message=None, name=None, object_id=None, tagged_by=None, tagg class GitAsyncRefOperation(Model): """ :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param detailed_status: - :type detailed_status: :class:`GitAsyncRefOperationDetail ` + :type detailed_status: :class:`GitAsyncRefOperationDetail ` :param parameters: - :type parameters: :class:`GitAsyncRefOperationParameters ` + :type parameters: :class:`GitAsyncRefOperationParameters ` :param status: :type status: object :param url: A URL that can be used to make further requests for status about the operation @@ -504,9 +704,9 @@ class GitAsyncRefOperationParameters(Model): :param onto_ref_name: The target branch for the cherry pick or revert operation. :type onto_ref_name: str :param repository: The git repository for the cherry pick or revert operation. - :type repository: :class:`GitRepository ` + :type repository: :class:`GitRepository ` :param source: Details about the source of the cherry pick or revert operation (e.g. A pull request or a specific commit). - :type source: :class:`GitAsyncRefOperationSource ` + :type source: :class:`GitAsyncRefOperationSource ` """ _attribute_map = { @@ -529,7 +729,7 @@ class GitAsyncRefOperationSource(Model): GitAsyncRefOperationSource specifies the pull request or list of commits to use when making a cherry pick and revert operation request. Only one should be provided. :param commit_list: A list of commits to cherry pick or revert - :type commit_list: list of :class:`GitCommitRef ` + :type commit_list: list of :class:`GitCommitRef ` :param pull_request_id: Id of the pull request to cherry pick or revert :type pull_request_id: int """ @@ -548,7 +748,7 @@ def __init__(self, commit_list=None, pull_request_id=None): class GitBlobRef(Model): """ :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param object_id: SHA1 hash of git object :type object_id: str :param size: Size of blob content (in bytes) @@ -581,7 +781,7 @@ class GitBranchStats(Model): :param behind_count: Number of commits behind. :type behind_count: int :param commit: Current commit. - :type commit: :class:`GitCommitRef ` + :type commit: :class:`GitCommitRef ` :param is_base_version: True if this is the result for the base version. :type is_base_version: bool :param name: Name of the ref. @@ -605,6 +805,57 @@ def __init__(self, ahead_count=None, behind_count=None, commit=None, is_base_ver self.name = name +class GitCherryPick(GitAsyncRefOperation): + """ + This object is returned from Cherry Pick operations and provides the id and status of the operation + + :param _links: + :type _links: :class:`ReferenceLinks ` + :param detailed_status: + :type detailed_status: :class:`GitAsyncRefOperationDetail ` + :param parameters: + :type parameters: :class:`GitAsyncRefOperationParameters ` + :param status: + :type status: object + :param url: A URL that can be used to make further requests for status about the operation + :type url: str + :param cherry_pick_id: + :type cherry_pick_id: int + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'detailed_status': {'key': 'detailedStatus', 'type': 'GitAsyncRefOperationDetail'}, + 'parameters': {'key': 'parameters', 'type': 'GitAsyncRefOperationParameters'}, + 'status': {'key': 'status', 'type': 'object'}, + 'url': {'key': 'url', 'type': 'str'}, + 'cherry_pick_id': {'key': 'cherryPickId', 'type': 'int'} + } + + def __init__(self, _links=None, detailed_status=None, parameters=None, status=None, url=None, cherry_pick_id=None): + super(GitCherryPick, self).__init__(_links=_links, detailed_status=detailed_status, parameters=parameters, status=status, url=url) + self.cherry_pick_id = cherry_pick_id + + +class GitCommitChanges(Model): + """ + :param change_counts: + :type change_counts: dict + :param changes: + :type changes: list of :class:`object ` + """ + + _attribute_map = { + 'change_counts': {'key': 'changeCounts', 'type': '{int}'}, + 'changes': {'key': 'changes', 'type': '[object]'} + } + + def __init__(self, change_counts=None, changes=None): + super(GitCommitChanges, self).__init__() + self.change_counts = change_counts + self.changes = changes + + class GitCommitDiffs(Model): """ :param ahead_count: @@ -615,12 +866,12 @@ class GitCommitDiffs(Model): :type base_commit: str :param behind_count: :type behind_count: int - :param common_commit: - :type common_commit: str :param change_counts: :type change_counts: dict :param changes: - :type changes: list of :class:`object ` + :type changes: list of :class:`object ` + :param common_commit: + :type common_commit: str :param target_commit: :type target_commit: str """ @@ -630,51 +881,36 @@ class GitCommitDiffs(Model): 'all_changes_included': {'key': 'allChangesIncluded', 'type': 'bool'}, 'base_commit': {'key': 'baseCommit', 'type': 'str'}, 'behind_count': {'key': 'behindCount', 'type': 'int'}, - 'common_commit': {'key': 'commonCommit', 'type': 'str'}, 'change_counts': {'key': 'changeCounts', 'type': '{int}'}, 'changes': {'key': 'changes', 'type': '[object]'}, + 'common_commit': {'key': 'commonCommit', 'type': 'str'}, 'target_commit': {'key': 'targetCommit', 'type': 'str'} } - def __init__(self, ahead_count=None, all_changes_included=None, base_commit=None, behind_count=None, common_commit=None, change_counts=None, changes=None, target_commit=None): + def __init__(self, ahead_count=None, all_changes_included=None, base_commit=None, behind_count=None, change_counts=None, changes=None, common_commit=None, target_commit=None): super(GitCommitDiffs, self).__init__() self.ahead_count = ahead_count self.all_changes_included = all_changes_included self.base_commit = base_commit self.behind_count = behind_count - self.common_commit = common_commit self.change_counts = change_counts self.changes = changes + self.common_commit = common_commit self.target_commit = target_commit -class GitCommitChanges(Model): - """ - :param change_counts: - :type change_counts: dict - :param changes: - :type changes: list of :class:`object ` - """ - - _attribute_map = { - 'change_counts': {'key': 'changeCounts', 'type': '{int}'}, - 'changes': {'key': 'changes', 'type': '[object]'} - } - - def __init__(self, change_counts=None, changes=None): - super(GitCommitChanges, self).__init__() - self.change_counts = change_counts - self.changes = changes - - class GitCommitRef(Model): """ Provides properties that describe a Git commit and associated metadata. :param _links: A collection of related REST reference links. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param author: Author of the commit. - :type author: :class:`GitUserDate ` + :type author: :class:`GitUserDate ` + :param change_counts: Counts of the types of changes (edits, deletes, etc.) included with the commit. + :type change_counts: dict + :param changes: An enumeration of the changes included with the commit. + :type changes: list of :class:`object ` :param comment: Comment or message of the commit. :type comment: str :param comment_truncated: Indicates if the comment is truncated from the full Git commit comment message. @@ -682,34 +918,33 @@ class GitCommitRef(Model): :param commit_id: ID (SHA-1) of the commit. :type commit_id: str :param committer: Committer of the commit. - :type committer: :class:`GitUserDate ` - :param change_counts: Counts of the types of changes (edits, deletes, etc.) included with the commit. - :type change_counts: dict - :param changes: An enumeration of the changes included with the commit. - :type changes: list of :class:`object ` + :type committer: :class:`GitUserDate ` + :param commit_too_many_changes: Indicates that commit contains too many changes to be displayed + :type commit_too_many_changes: bool :param parents: An enumeration of the parent commit IDs for this commit. :type parents: list of str :param push: The push associated with this commit. - :type push: :class:`GitPushRef ` + :type push: :class:`GitPushRef ` :param remote_url: Remote URL path to the commit. :type remote_url: str :param statuses: A list of status metadata from services and extensions that may associate additional information to the commit. - :type statuses: list of :class:`GitStatus ` + :type statuses: list of :class:`GitStatus ` :param url: REST URL for this resource. :type url: str :param work_items: A list of workitems associated with this commit. - :type work_items: list of :class:`ResourceRef ` + :type work_items: list of :class:`ResourceRef ` """ _attribute_map = { '_links': {'key': '_links', 'type': 'ReferenceLinks'}, 'author': {'key': 'author', 'type': 'GitUserDate'}, + 'change_counts': {'key': 'changeCounts', 'type': '{int}'}, + 'changes': {'key': 'changes', 'type': '[object]'}, 'comment': {'key': 'comment', 'type': 'str'}, 'comment_truncated': {'key': 'commentTruncated', 'type': 'bool'}, 'commit_id': {'key': 'commitId', 'type': 'str'}, 'committer': {'key': 'committer', 'type': 'GitUserDate'}, - 'change_counts': {'key': 'changeCounts', 'type': '{int}'}, - 'changes': {'key': 'changes', 'type': '[object]'}, + 'commit_too_many_changes': {'key': 'commitTooManyChanges', 'type': 'bool'}, 'parents': {'key': 'parents', 'type': '[str]'}, 'push': {'key': 'push', 'type': 'GitPushRef'}, 'remote_url': {'key': 'remoteUrl', 'type': 'str'}, @@ -718,16 +953,17 @@ class GitCommitRef(Model): 'work_items': {'key': 'workItems', 'type': '[ResourceRef]'} } - def __init__(self, _links=None, author=None, comment=None, comment_truncated=None, commit_id=None, committer=None, change_counts=None, changes=None, parents=None, push=None, remote_url=None, statuses=None, url=None, work_items=None): + def __init__(self, _links=None, author=None, change_counts=None, changes=None, comment=None, comment_truncated=None, commit_id=None, committer=None, commit_too_many_changes=None, parents=None, push=None, remote_url=None, statuses=None, url=None, work_items=None): super(GitCommitRef, self).__init__() self._links = _links self.author = author + self.change_counts = change_counts + self.changes = changes self.comment = comment self.comment_truncated = comment_truncated self.commit_id = commit_id self.committer = committer - self.change_counts = change_counts - self.changes = changes + self.commit_too_many_changes = commit_too_many_changes self.parents = parents self.push = push self.remote_url = remote_url @@ -739,7 +975,7 @@ def __init__(self, _links=None, author=None, comment=None, comment_truncated=Non class GitConflict(Model): """ :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param conflict_id: :type conflict_id: int :param conflict_path: @@ -747,19 +983,19 @@ class GitConflict(Model): :param conflict_type: :type conflict_type: object :param merge_base_commit: - :type merge_base_commit: :class:`GitCommitRef ` + :type merge_base_commit: :class:`GitCommitRef ` :param merge_origin: - :type merge_origin: :class:`GitMergeOriginRef ` + :type merge_origin: :class:`GitMergeOriginRef ` :param merge_source_commit: - :type merge_source_commit: :class:`GitCommitRef ` + :type merge_source_commit: :class:`GitCommitRef ` :param merge_target_commit: - :type merge_target_commit: :class:`GitCommitRef ` + :type merge_target_commit: :class:`GitCommitRef ` :param resolution_error: :type resolution_error: object :param resolution_status: :type resolution_status: object :param resolved_by: - :type resolved_by: :class:`IdentityRef ` + :type resolved_by: :class:`IdentityRef ` :param resolved_date: :type resolved_date: datetime :param url: @@ -806,7 +1042,7 @@ class GitConflictUpdateResult(Model): :param custom_message: Reason for failing :type custom_message: str :param updated_conflict: New state of the conflict after updating - :type updated_conflict: :class:`GitConflict ` + :type updated_conflict: :class:`GitConflict ` :param update_status: Status of the update on the server :type update_status: object """ @@ -831,7 +1067,7 @@ class GitDeletedRepository(Model): :param created_date: :type created_date: datetime :param deleted_by: - :type deleted_by: :class:`IdentityRef ` + :type deleted_by: :class:`IdentityRef ` :param deleted_date: :type deleted_date: datetime :param id: @@ -839,7 +1075,7 @@ class GitDeletedRepository(Model): :param name: :type name: str :param project: - :type project: :class:`TeamProjectReference ` + :type project: :class:`TeamProjectReference ` """ _attribute_map = { @@ -914,15 +1150,15 @@ class GitForkSyncRequest(Model): Request to sync data between two forks. :param _links: Collection of related links - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param detailed_status: - :type detailed_status: :class:`GitForkOperationStatusDetail ` + :type detailed_status: :class:`GitForkOperationStatusDetail ` :param operation_id: Unique identifier for the operation. :type operation_id: int :param source: Fully-qualified identifier for the source repository. - :type source: :class:`GlobalGitRepositoryKey ` + :type source: :class:`GlobalGitRepositoryKey ` :param source_to_target_refs: If supplied, the set of ref mappings to use when performing a "sync" or create. If missing, all refs will be synchronized. - :type source_to_target_refs: list of :class:`SourceToTargetRef ` + :type source_to_target_refs: list of :class:`SourceToTargetRef ` :param status: :type status: object """ @@ -951,9 +1187,9 @@ class GitForkSyncRequestParameters(Model): Parameters for creating a fork request :param source: Fully-qualified identifier for the source repository. - :type source: :class:`GlobalGitRepositoryKey ` + :type source: :class:`GlobalGitRepositoryKey ` :param source_to_target_refs: If supplied, the set of ref mappings to use when performing a "sync" or create. If missing, all refs will be synchronized. - :type source_to_target_refs: list of :class:`SourceToTargetRef ` + :type source_to_target_refs: list of :class:`SourceToTargetRef ` """ _attribute_map = { @@ -967,38 +1203,6 @@ def __init__(self, source=None, source_to_target_refs=None): self.source_to_target_refs = source_to_target_refs -class GitCherryPick(GitAsyncRefOperation): - """ - This object is returned from Cherry Pick operations and provides the id and status of the operation - - :param _links: - :type _links: :class:`ReferenceLinks ` - :param detailed_status: - :type detailed_status: :class:`GitAsyncRefOperationDetail ` - :param parameters: - :type parameters: :class:`GitAsyncRefOperationParameters ` - :param status: - :type status: object - :param url: A URL that can be used to make further requests for status about the operation - :type url: str - :param cherry_pick_id: - :type cherry_pick_id: int - """ - - _attribute_map = { - '_links': {'key': '_links', 'type': 'ReferenceLinks'}, - 'detailed_status': {'key': 'detailedStatus', 'type': 'GitAsyncRefOperationDetail'}, - 'parameters': {'key': 'parameters', 'type': 'GitAsyncRefOperationParameters'}, - 'status': {'key': 'status', 'type': 'object'}, - 'url': {'key': 'url', 'type': 'str'}, - 'cherry_pick_id': {'key': 'cherryPickId', 'type': 'int'} - } - - def __init__(self, _links=None, detailed_status=None, parameters=None, status=None, url=None, cherry_pick_id=None): - super(GitCherryPick, self).__init__(_links=_links, detailed_status=detailed_status, parameters=parameters, status=status, url=url) - self.cherry_pick_id = cherry_pick_id - - class GitImportGitSource(Model): """ Parameter for creating a git import request when source is Git version control @@ -1025,15 +1229,15 @@ class GitImportRequest(Model): A request to import data from a remote source control system. :param _links: Links to related resources. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param detailed_status: Detailed status of the import, including the current step and an error message, if applicable. - :type detailed_status: :class:`GitImportStatusDetail ` + :type detailed_status: :class:`GitImportStatusDetail ` :param import_request_id: The unique identifier for this import request. :type import_request_id: int :param parameters: Parameters for creating the import request. - :type parameters: :class:`GitImportRequestParameters ` + :type parameters: :class:`GitImportRequestParameters ` :param repository: The target repository for this import. - :type repository: :class:`GitRepository ` + :type repository: :class:`GitRepository ` :param status: Current status of the import. :type status: object :param url: A link back to this import request resource. @@ -1068,11 +1272,11 @@ class GitImportRequestParameters(Model): :param delete_service_endpoint_after_import_is_done: Option to delete service endpoint when import is done :type delete_service_endpoint_after_import_is_done: bool :param git_source: Source for importing git repository - :type git_source: :class:`GitImportGitSource ` + :type git_source: :class:`GitImportGitSource ` :param service_endpoint_id: Service Endpoint for connection to external endpoint :type service_endpoint_id: str :param tfvc_source: Source for importing tfvc repository - :type tfvc_source: :class:`GitImportTfvcSource ` + :type tfvc_source: :class:`GitImportTfvcSource ` """ _attribute_map = { @@ -1178,7 +1382,7 @@ class GitItemRequestData(Model): :param include_links: Whether to include the _links field on the shallow references :type include_links: bool :param item_descriptors: Collection of items to fetch, including path, version, and recursion level - :type item_descriptors: list of :class:`GitItemDescriptor ` + :type item_descriptors: list of :class:`GitItemDescriptor ` :param latest_processed_change: Whether to include shallow ref to commit that last changed each item :type latest_processed_change: bool """ @@ -1289,7 +1493,7 @@ class GitPolicyConfigurationResponse(Model): :param continuation_token: The HTTP client methods find the continuation token header in the response and populate this field. :type continuation_token: str :param policy_configurations: - :type policy_configurations: list of :class:`PolicyConfiguration ` + :type policy_configurations: list of :class:`PolicyConfiguration ` """ _attribute_map = { @@ -1308,43 +1512,43 @@ class GitPullRequest(Model): Represents all the data associated with a pull request. :param _links: Links to other related objects. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param artifact_id: A string which uniquely identifies this pull request. To generate an artifact ID for a pull request, use this template: ```vstfs:///Git/PullRequestId/{projectId}/{repositoryId}/{pullRequestId}``` :type artifact_id: str :param auto_complete_set_by: If set, auto-complete is enabled for this pull request and this is the identity that enabled it. - :type auto_complete_set_by: :class:`IdentityRef ` + :type auto_complete_set_by: :class:`IdentityRef ` :param closed_by: The user who closed the pull request. - :type closed_by: :class:`IdentityRef ` + :type closed_by: :class:`IdentityRef ` :param closed_date: The date when the pull request was closed (completed, abandoned, or merged externally). :type closed_date: datetime :param code_review_id: The code review ID of the pull request. Used internally. :type code_review_id: int :param commits: The commits contained in the pull request. - :type commits: list of :class:`GitCommitRef ` + :type commits: list of :class:`GitCommitRef ` :param completion_options: Options which affect how the pull request will be merged when it is completed. - :type completion_options: :class:`GitPullRequestCompletionOptions ` + :type completion_options: :class:`GitPullRequestCompletionOptions ` :param completion_queue_time: The most recent date at which the pull request entered the queue to be completed. Used internally. :type completion_queue_time: datetime :param created_by: The identity of the user who created the pull request. - :type created_by: :class:`IdentityRef ` + :type created_by: :class:`IdentityRef ` :param creation_date: The date when the pull request was created. :type creation_date: datetime :param description: The description of the pull request. :type description: str :param fork_source: If this is a PR from a fork this will contain information about its source. - :type fork_source: :class:`GitForkRef ` + :type fork_source: :class:`GitForkRef ` :param has_multiple_merge_bases: Multiple mergebases warning :type has_multiple_merge_bases: bool :param is_draft: Draft / WIP pull request. :type is_draft: bool :param labels: The labels associated with the pull request. - :type labels: list of :class:`WebApiTagDefinition ` + :type labels: list of :class:`WebApiTagDefinition ` :param last_merge_commit: The commit of the most recent pull request merge. If empty, the most recent merge is in progress or was unsuccessful. - :type last_merge_commit: :class:`GitCommitRef ` + :type last_merge_commit: :class:`GitCommitRef ` :param last_merge_source_commit: The commit at the head of the source branch at the time of the last pull request merge. - :type last_merge_source_commit: :class:`GitCommitRef ` + :type last_merge_source_commit: :class:`GitCommitRef ` :param last_merge_target_commit: The commit at the head of the target branch at the time of the last pull request merge. - :type last_merge_target_commit: :class:`GitCommitRef ` + :type last_merge_target_commit: :class:`GitCommitRef ` :param merge_failure_message: If set, pull request merge failed for this reason. :type merge_failure_message: str :param merge_failure_type: The type of failure (if any) of the pull request merge. @@ -1352,7 +1556,7 @@ class GitPullRequest(Model): :param merge_id: The ID of the job used to run the pull request merge. Used internally. :type merge_id: str :param merge_options: Options used when the pull request merge runs. These are separate from completion options since completion happens only once and a new merge will run every time the source branch of the pull request changes. - :type merge_options: :class:`GitPullRequestMergeOptions ` + :type merge_options: :class:`GitPullRequestMergeOptions ` :param merge_status: The current status of the pull request merge. :type merge_status: object :param pull_request_id: The ID of the pull request. @@ -1360,9 +1564,9 @@ class GitPullRequest(Model): :param remote_url: Used internally. :type remote_url: str :param repository: The repository containing the target branch of the pull request. - :type repository: :class:`GitRepository ` + :type repository: :class:`GitRepository ` :param reviewers: A list of reviewers on the pull request along with the state of their votes. - :type reviewers: list of :class:`IdentityRefWithVote ` + :type reviewers: list of :class:`IdentityRefWithVote ` :param source_ref_name: The name of the source branch of the pull request. :type source_ref_name: str :param status: The status of the pull request. @@ -1376,7 +1580,7 @@ class GitPullRequest(Model): :param url: Used internally. :type url: str :param work_item_refs: Any work item references associated with this pull request. - :type work_item_refs: list of :class:`ResourceRef ` + :type work_item_refs: list of :class:`ResourceRef ` """ _attribute_map = { @@ -1456,14 +1660,31 @@ def __init__(self, _links=None, artifact_id=None, auto_complete_set_by=None, clo self.work_item_refs = work_item_refs +class GitPullRequestChange(Model): + """ + Change made in a pull request. + + :param change_tracking_id: ID used to track files through multiple changes. + :type change_tracking_id: int + """ + + _attribute_map = { + 'change_tracking_id': {'key': 'changeTrackingId', 'type': 'int'} + } + + def __init__(self, change_tracking_id=None): + super(GitPullRequestChange, self).__init__() + self.change_tracking_id = change_tracking_id + + class GitPullRequestCommentThread(CommentThread): """ Represents a comment thread of a pull request. A thread contains meta data about the file it was left on (if any) along with one or more comments (an initial comment and the subsequent replies). :param _links: Links to other related objects. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param comments: A list of the comments. - :type comments: list of :class:`Comment ` + :type comments: list of :class:`Comment ` :param id: The comment thread id. :type id: int :param identities: Set of identities related to this thread @@ -1473,15 +1694,15 @@ class GitPullRequestCommentThread(CommentThread): :param last_updated_date: The time this thread was last updated. :type last_updated_date: datetime :param properties: Optional properties associated with the thread as a collection of key-value pairs. - :type properties: :class:`object ` + :type properties: :class:`object ` :param published_date: The time this thread was published. :type published_date: datetime :param status: The status of the comment thread. :type status: object :param thread_context: Specify thread context such as position in left/right file. - :type thread_context: :class:`CommentThreadContext ` + :type thread_context: :class:`CommentThreadContext ` :param pull_request_thread_context: Extended context information unique to pull requests - :type pull_request_thread_context: :class:`GitPullRequestCommentThreadContext ` + :type pull_request_thread_context: :class:`GitPullRequestCommentThreadContext ` """ _attribute_map = { @@ -1510,9 +1731,9 @@ class GitPullRequestCommentThreadContext(Model): :param change_tracking_id: Used to track a comment across iterations. This value can be found by looking at the iteration's changes list. Must be set for pull requests with iteration support. Otherwise, it's not required for 'legacy' pull requests. :type change_tracking_id: int :param iteration_context: The iteration context being viewed when the thread was created. - :type iteration_context: :class:`CommentIterationContext ` + :type iteration_context: :class:`CommentIterationContext ` :param tracking_criteria: The criteria used to track this thread. If this property is filled out when the thread is returned, then the thread has been tracked from its original location using the given criteria. - :type tracking_criteria: :class:`CommentTrackingCriteria ` + :type tracking_criteria: :class:`CommentTrackingCriteria ` """ _attribute_map = { @@ -1577,43 +1798,26 @@ def __init__(self, auto_complete_ignore_config_ids=None, bypass_policy=None, byp self.triggered_by_auto_complete = triggered_by_auto_complete -class GitPullRequestChange(Model): - """ - Change made in a pull request. - - :param change_tracking_id: ID used to track files through multiple changes. - :type change_tracking_id: int - """ - - _attribute_map = { - 'change_tracking_id': {'key': 'changeTrackingId', 'type': 'int'} - } - - def __init__(self, change_tracking_id=None): - super(GitPullRequestChange, self).__init__() - self.change_tracking_id = change_tracking_id - - class GitPullRequestIteration(Model): """ Provides properties that describe a Git pull request iteration. Iterations are created as a result of creating and pushing updates to a pull request. :param _links: A collection of related REST reference links. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param author: Author of the pull request iteration. - :type author: :class:`IdentityRef ` + :type author: :class:`IdentityRef ` + :param change_list: Changes included with the pull request iteration. + :type change_list: list of :class:`GitPullRequestChange ` :param commits: The commits included with the pull request iteration. - :type commits: list of :class:`GitCommitRef ` + :type commits: list of :class:`GitCommitRef ` :param common_ref_commit: The first common Git commit of the source and target refs. - :type common_ref_commit: :class:`GitCommitRef ` + :type common_ref_commit: :class:`GitCommitRef ` :param created_date: The creation date of the pull request iteration. :type created_date: datetime :param description: Description of the pull request iteration. :type description: str :param has_more_commits: Indicates if the Commits property contains a truncated list of commits in this pull request iteration. :type has_more_commits: bool - :param change_list: Changes included with the pull request iteration. - :type change_list: list of :class:`GitPullRequestChange ` :param id: ID of the pull request iteration. Iterations are created as a result of creating and pushing updates to a pull request. :type id: int :param new_target_ref_name: If the iteration reason is Retarget, this is the refName of the new target @@ -1621,13 +1825,13 @@ class GitPullRequestIteration(Model): :param old_target_ref_name: If the iteration reason is Retarget, this is the original target refName :type old_target_ref_name: str :param push: The Git push information associated with this pull request iteration. - :type push: :class:`GitPushRef ` + :type push: :class:`GitPushRef ` :param reason: The reason for which the pull request iteration was created. :type reason: object :param source_ref_commit: The source Git commit of this iteration. - :type source_ref_commit: :class:`GitCommitRef ` + :type source_ref_commit: :class:`GitCommitRef ` :param target_ref_commit: The target Git commit of this iteration. - :type target_ref_commit: :class:`GitCommitRef ` + :type target_ref_commit: :class:`GitCommitRef ` :param updated_date: The updated date of the pull request iteration. :type updated_date: datetime """ @@ -1635,12 +1839,12 @@ class GitPullRequestIteration(Model): _attribute_map = { '_links': {'key': '_links', 'type': 'ReferenceLinks'}, 'author': {'key': 'author', 'type': 'IdentityRef'}, + 'change_list': {'key': 'changeList', 'type': '[GitPullRequestChange]'}, 'commits': {'key': 'commits', 'type': '[GitCommitRef]'}, 'common_ref_commit': {'key': 'commonRefCommit', 'type': 'GitCommitRef'}, 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, 'description': {'key': 'description', 'type': 'str'}, 'has_more_commits': {'key': 'hasMoreCommits', 'type': 'bool'}, - 'change_list': {'key': 'changeList', 'type': '[GitPullRequestChange]'}, 'id': {'key': 'id', 'type': 'int'}, 'new_target_ref_name': {'key': 'newTargetRefName', 'type': 'str'}, 'old_target_ref_name': {'key': 'oldTargetRefName', 'type': 'str'}, @@ -1651,16 +1855,16 @@ class GitPullRequestIteration(Model): 'updated_date': {'key': 'updatedDate', 'type': 'iso-8601'} } - def __init__(self, _links=None, author=None, commits=None, common_ref_commit=None, created_date=None, description=None, has_more_commits=None, change_list=None, id=None, new_target_ref_name=None, old_target_ref_name=None, push=None, reason=None, source_ref_commit=None, target_ref_commit=None, updated_date=None): + def __init__(self, _links=None, author=None, change_list=None, commits=None, common_ref_commit=None, created_date=None, description=None, has_more_commits=None, id=None, new_target_ref_name=None, old_target_ref_name=None, push=None, reason=None, source_ref_commit=None, target_ref_commit=None, updated_date=None): super(GitPullRequestIteration, self).__init__() self._links = _links self.author = author + self.change_list = change_list self.commits = commits self.common_ref_commit = common_ref_commit self.created_date = created_date self.description = description self.has_more_commits = has_more_commits - self.change_list = change_list self.id = id self.new_target_ref_name = new_target_ref_name self.old_target_ref_name = old_target_ref_name @@ -1676,7 +1880,7 @@ class GitPullRequestIterationChanges(Model): Collection of changes made in a pull request. :param change_entries: Changes made in the iteration. - :type change_entries: list of :class:`GitPullRequestChange ` + :type change_entries: list of :class:`GitPullRequestChange ` :param next_skip: Value to specify as skip to get the next page of changes. This will be zero if there are no more changes. :type next_skip: int :param next_top: Value to specify as top to get the next page of changes. This will be zero if there are no more changes. @@ -1702,7 +1906,7 @@ class GitPullRequestMergeOptions(Model): :param conflict_authorship_commits: If true, conflict resolutions applied during the merge will be put in separate commits to preserve authorship info for git blame, etc. :type conflict_authorship_commits: bool - :param detect_rename_false_positives: + :param detect_rename_false_positives: If true, renames where there is more than one valid way to map the original file locations to renamed file locations will be treated as false positives and ignored. :type detect_rename_false_positives: bool :param disable_renames: If true, rename detection will not be performed during the merge. :type disable_renames: bool @@ -1726,7 +1930,7 @@ class GitPullRequestQuery(Model): A set of pull request queries and their results. :param queries: The queries to perform. - :type queries: list of :class:`GitPullRequestQueryInput ` + :type queries: list of :class:`GitPullRequestQueryInput ` :param results: The results of the queries. This matches the QueryInputs list so Results[n] are the results of QueryInputs[n]. Each entry in the list is a dictionary of commit->pull requests. :type results: list of {[GitPullRequest]} """ @@ -1771,6 +1975,12 @@ class GitPullRequestSearchCriteria(Model): :type creator_id: str :param include_links: Whether to include the _links field on the shallow references :type include_links: bool + :param max_time: If specified, filters pull requests that created/closed before this date based on the queryTimeRangeType specified. + :type max_time: datetime + :param min_time: If specified, filters pull requests that created/closed after this date based on the queryTimeRangeType specified. + :type min_time: datetime + :param query_time_range_type: The type of time range which should be used for minTime and maxTime. Defaults to Created if unset. + :type query_time_range_type: object :param repository_id: If set, search for pull requests whose target branch is in this repository. :type repository_id: str :param reviewer_id: If set, search for pull requests that have this identity as a reviewer. @@ -1788,6 +1998,9 @@ class GitPullRequestSearchCriteria(Model): _attribute_map = { 'creator_id': {'key': 'creatorId', 'type': 'str'}, 'include_links': {'key': 'includeLinks', 'type': 'bool'}, + 'max_time': {'key': 'maxTime', 'type': 'iso-8601'}, + 'min_time': {'key': 'minTime', 'type': 'iso-8601'}, + 'query_time_range_type': {'key': 'queryTimeRangeType', 'type': 'object'}, 'repository_id': {'key': 'repositoryId', 'type': 'str'}, 'reviewer_id': {'key': 'reviewerId', 'type': 'str'}, 'source_ref_name': {'key': 'sourceRefName', 'type': 'str'}, @@ -1796,10 +2009,13 @@ class GitPullRequestSearchCriteria(Model): 'target_ref_name': {'key': 'targetRefName', 'type': 'str'} } - def __init__(self, creator_id=None, include_links=None, repository_id=None, reviewer_id=None, source_ref_name=None, source_repository_id=None, status=None, target_ref_name=None): + def __init__(self, creator_id=None, include_links=None, max_time=None, min_time=None, query_time_range_type=None, repository_id=None, reviewer_id=None, source_ref_name=None, source_repository_id=None, status=None, target_ref_name=None): super(GitPullRequestSearchCriteria, self).__init__() self.creator_id = creator_id self.include_links = include_links + self.max_time = max_time + self.min_time = min_time + self.query_time_range_type = query_time_range_type self.repository_id = repository_id self.reviewer_id = reviewer_id self.source_ref_name = source_ref_name @@ -1811,13 +2027,13 @@ def __init__(self, creator_id=None, include_links=None, repository_id=None, revi class GitPushRef(Model): """ :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param date: :type date: datetime :param push_correlation_id: :type push_correlation_id: str :param pushed_by: - :type pushed_by: :class:`IdentityRef ` + :type pushed_by: :class:`IdentityRef ` :param push_id: :type push_id: int :param url: @@ -1881,9 +2097,9 @@ def __init__(self, from_date=None, include_links=None, include_ref_updates=None, class GitQueryBranchStatsCriteria(Model): """ :param base_commit: - :type base_commit: :class:`GitVersionDescriptor ` + :type base_commit: :class:`GitVersionDescriptor ` :param target_commits: - :type target_commits: list of :class:`GitVersionDescriptor ` + :type target_commits: list of :class:`GitVersionDescriptor ` """ _attribute_map = { @@ -1906,7 +2122,7 @@ class GitQueryCommitsCriteria(Model): :param author: Alias or display name of the author :type author: str :param compare_version: Only applicable when ItemVersion specified. If provided, start walking history starting at this commit. - :type compare_version: :class:`GitVersionDescriptor ` + :type compare_version: :class:`GitVersionDescriptor ` :param exclude_deletes: Only applies when an itemPath is specified. This determines whether to exclude delete entries of the specified path. :type exclude_deletes: bool :param from_commit_id: If provided, a lower bound for filtering commits alphabetically @@ -1928,7 +2144,7 @@ class GitQueryCommitsCriteria(Model): :param item_path: Path of item to search under :type item_path: str :param item_version: If provided, identifies the commit or branch to search - :type item_version: :class:`GitVersionDescriptor ` + :type item_version: :class:`GitVersionDescriptor ` :param show_oldest_commits_first: If enabled, this option will ignore the itemVersion and compareVersion parameters :type show_oldest_commits_first: bool :param to_commit_id: If provided, an upper bound for filtering commits alphabetically @@ -2002,13 +2218,13 @@ def __init__(self, deleted=None): class GitRef(Model): """ :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param creator: - :type creator: :class:`IdentityRef ` + :type creator: :class:`IdentityRef ` :param is_locked: :type is_locked: bool :param is_locked_by: - :type is_locked_by: :class:`IdentityRef ` + :type is_locked_by: :class:`IdentityRef ` :param name: :type name: str :param object_id: @@ -2016,7 +2232,7 @@ class GitRef(Model): :param peeled_object_id: :type peeled_object_id: str :param statuses: - :type statuses: list of :class:`GitStatus ` + :type statuses: list of :class:`GitStatus ` :param url: :type url: str """ @@ -2049,7 +2265,7 @@ def __init__(self, _links=None, creator=None, is_locked=None, is_locked_by=None, class GitRefFavorite(Model): """ :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param id: :type id: int :param identity_id: @@ -2166,7 +2382,7 @@ def __init__(self, custom_message=None, is_locked=None, name=None, new_object_id class GitRepository(Model): """ :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param default_branch: :type default_branch: str :param id: @@ -2175,12 +2391,14 @@ class GitRepository(Model): :type is_disabled: bool :param is_fork: True if the repository was created as a fork. :type is_fork: bool + :param is_in_maintenance: True if the repository is in maintenance. False otherwise. + :type is_in_maintenance: bool :param name: :type name: str :param parent_repository: - :type parent_repository: :class:`GitRepositoryRef ` + :type parent_repository: :class:`GitRepositoryRef ` :param project: - :type project: :class:`TeamProjectReference ` + :type project: :class:`TeamProjectReference ` :param remote_url: :type remote_url: str :param size: Compressed size (bytes) of the repository. @@ -2201,6 +2419,7 @@ class GitRepository(Model): 'id': {'key': 'id', 'type': 'str'}, 'is_disabled': {'key': 'isDisabled', 'type': 'bool'}, 'is_fork': {'key': 'isFork', 'type': 'bool'}, + 'is_in_maintenance': {'key': 'isInMaintenance', 'type': 'bool'}, 'name': {'key': 'name', 'type': 'str'}, 'parent_repository': {'key': 'parentRepository', 'type': 'GitRepositoryRef'}, 'project': {'key': 'project', 'type': 'TeamProjectReference'}, @@ -2212,13 +2431,14 @@ class GitRepository(Model): 'web_url': {'key': 'webUrl', 'type': 'str'} } - def __init__(self, _links=None, default_branch=None, id=None, is_disabled=None, is_fork=None, name=None, parent_repository=None, project=None, remote_url=None, size=None, ssh_url=None, url=None, valid_remote_urls=None, web_url=None): + def __init__(self, _links=None, default_branch=None, id=None, is_disabled=None, is_fork=None, is_in_maintenance=None, name=None, parent_repository=None, project=None, remote_url=None, size=None, ssh_url=None, url=None, valid_remote_urls=None, web_url=None): super(GitRepository, self).__init__() self._links = _links self.default_branch = default_branch self.id = id self.is_disabled = is_disabled self.is_fork = is_fork + self.is_in_maintenance = is_in_maintenance self.name = name self.parent_repository = parent_repository self.project = project @@ -2235,9 +2455,9 @@ class GitRepositoryCreateOptions(Model): :param name: :type name: str :param parent_repository: - :type parent_repository: :class:`GitRepositoryRef ` + :type parent_repository: :class:`GitRepositoryRef ` :param project: - :type project: :class:`TeamProjectReference ` + :type project: :class:`TeamProjectReference ` """ _attribute_map = { @@ -2256,7 +2476,7 @@ def __init__(self, name=None, parent_repository=None, project=None): class GitRepositoryRef(Model): """ :param collection: Team Project Collection where this Fork resides - :type collection: :class:`TeamProjectCollectionReference ` + :type collection: :class:`TeamProjectCollectionReference ` :param id: :type id: str :param is_fork: True if the repository was created as a fork @@ -2264,7 +2484,7 @@ class GitRepositoryRef(Model): :param name: :type name: str :param project: - :type project: :class:`TeamProjectReference ` + :type project: :class:`TeamProjectReference ` :param remote_url: :type remote_url: str :param ssh_url: @@ -2326,11 +2546,11 @@ def __init__(self, active_pull_requests_count=None, branches_count=None, commits class GitRevert(GitAsyncRefOperation): """ :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param detailed_status: - :type detailed_status: :class:`GitAsyncRefOperationDetail ` + :type detailed_status: :class:`GitAsyncRefOperationDetail ` :param parameters: - :type parameters: :class:`GitAsyncRefOperationParameters ` + :type parameters: :class:`GitAsyncRefOperationParameters ` :param status: :type status: object :param url: A URL that can be used to make further requests for status about the operation @@ -2358,11 +2578,11 @@ class GitStatus(Model): This class contains the metadata of a service/extension posting a status. :param _links: Reference links. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param context: Context of the status. - :type context: :class:`GitStatusContext ` + :type context: :class:`GitStatusContext ` :param created_by: Identity that created the status. - :type created_by: :class:`IdentityRef ` + :type created_by: :class:`IdentityRef ` :param creation_date: Creation date and time of the status. :type creation_date: datetime :param description: Status description. Typically describes current state of the status. @@ -2468,7 +2688,7 @@ class GitTreeDiff(Model): :param base_tree_id: ObjectId of the base tree of this diff. :type base_tree_id: str :param diff_entries: List of tree entries that differ between the base and target tree. Renames and object type changes are returned as a delete for the old object and add for the new object. If a continuation token is returned in the response header, some tree entries are yet to be processed and may yield more diff entries. If the continuation token is not returned all the diff entries have been included in this response. - :type diff_entries: list of :class:`GitTreeDiffEntry ` + :type diff_entries: list of :class:`GitTreeDiffEntry ` :param target_tree_id: ObjectId of the target tree of this diff. :type target_tree_id: str :param url: REST Url to this resource. @@ -2526,7 +2746,7 @@ class GitTreeDiffResponse(Model): :param continuation_token: The HTTP client methods find the continuation token header in the response and populate this field. :type continuation_token: list of str :param tree_diff: - :type tree_diff: :class:`GitTreeDiff ` + :type tree_diff: :class:`GitTreeDiff ` """ _attribute_map = { @@ -2578,13 +2798,13 @@ def __init__(self, git_object_type=None, mode=None, object_id=None, relative_pat class GitTreeRef(Model): """ :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param object_id: SHA1 hash of git object :type object_id: str :param size: Sum of sizes of all children :type size: long :param tree_entries: Blobs and trees under this tree - :type tree_entries: list of :class:`GitTreeEntryRef ` + :type tree_entries: list of :class:`GitTreeEntryRef ` :param url: Url to tree :type url: str """ @@ -2686,7 +2906,7 @@ def __init__(self, collection_id=None, project_id=None, repository_id=None): class GraphSubjectBase(Model): """ :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. :type descriptor: str :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. @@ -2710,41 +2930,10 @@ def __init__(self, _links=None, descriptor=None, display_name=None, url=None): self.url = url -class Change(Model): - """ - :param change_type: The type of change that was made to the item. - :type change_type: object - :param item: Current version. - :type item: object - :param new_content: Content of the item after the change. - :type new_content: :class:`ItemContent ` - :param source_server_item: Path of the item on the server. - :type source_server_item: str - :param url: URL to retrieve the item. - :type url: str - """ - - _attribute_map = { - 'change_type': {'key': 'changeType', 'type': 'object'}, - 'item': {'key': 'item', 'type': 'object'}, - 'new_content': {'key': 'newContent', 'type': 'ItemContent'}, - 'source_server_item': {'key': 'sourceServerItem', 'type': 'str'}, - 'url': {'key': 'url', 'type': 'str'} - } - - def __init__(self, change_type=None, item=None, new_content=None, source_server_item=None, url=None): - super(Change, self).__init__() - self.change_type = change_type - self.item = item - self.new_content = new_content - self.source_server_item = source_server_item - self.url = url - - class IdentityRef(GraphSubjectBase): """ :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. :type descriptor: str :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. @@ -2805,7 +2994,7 @@ class IdentityRefWithVote(IdentityRef): Identity information including a vote on a pull request. :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. :type descriptor: str :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. @@ -2834,14 +3023,16 @@ class IdentityRefWithVote(IdentityRef): :type has_declined: bool :param is_flagged: Indicates if this reviewer is flagged for attention on this pull request. :type is_flagged: bool + :param is_reapprove: Indicates if this approve vote should still be handled even though vote didn't change. + :type is_reapprove: bool :param is_required: Indicates if this is a required reviewer for this pull request.
Branches can have policies that require particular reviewers are required for pull requests. :type is_required: bool :param reviewer_url: URL to retrieve information about this identity :type reviewer_url: str :param vote: Vote on a pull request:
10 - approved 5 - approved with suggestions 0 - no vote -5 - waiting for author -10 - rejected :type vote: int - :param voted_for: Groups or teams that that this reviewer contributed to.
Groups and teams can be reviewers on pull requests but can not vote directly. When a member of the group or team votes, that vote is rolled up into the group or team vote. VotedFor is a list of such votes. - :type voted_for: list of :class:`IdentityRefWithVote ` + :param voted_for: Groups or teams that this reviewer contributed to.
Groups and teams can be reviewers on pull requests but can not vote directly. When a member of the group or team votes, that vote is rolled up into the group or team vote. VotedFor is a list of such votes. + :type voted_for: list of :class:`IdentityRefWithVote ` """ _attribute_map = { @@ -2860,16 +3051,18 @@ class IdentityRefWithVote(IdentityRef): 'unique_name': {'key': 'uniqueName', 'type': 'str'}, 'has_declined': {'key': 'hasDeclined', 'type': 'bool'}, 'is_flagged': {'key': 'isFlagged', 'type': 'bool'}, + 'is_reapprove': {'key': 'isReapprove', 'type': 'bool'}, 'is_required': {'key': 'isRequired', 'type': 'bool'}, 'reviewer_url': {'key': 'reviewerUrl', 'type': 'str'}, 'vote': {'key': 'vote', 'type': 'int'}, 'voted_for': {'key': 'votedFor', 'type': '[IdentityRefWithVote]'} } - def __init__(self, _links=None, descriptor=None, display_name=None, url=None, directory_alias=None, id=None, image_url=None, inactive=None, is_aad_identity=None, is_container=None, is_deleted_in_origin=None, profile_url=None, unique_name=None, has_declined=None, is_flagged=None, is_required=None, reviewer_url=None, vote=None, voted_for=None): + def __init__(self, _links=None, descriptor=None, display_name=None, url=None, directory_alias=None, id=None, image_url=None, inactive=None, is_aad_identity=None, is_container=None, is_deleted_in_origin=None, profile_url=None, unique_name=None, has_declined=None, is_flagged=None, is_reapprove=None, is_required=None, reviewer_url=None, vote=None, voted_for=None): super(IdentityRefWithVote, self).__init__(_links=_links, descriptor=descriptor, display_name=display_name, url=url, directory_alias=directory_alias, id=id, image_url=image_url, inactive=inactive, is_aad_identity=is_aad_identity, is_container=is_container, is_deleted_in_origin=is_deleted_in_origin, profile_url=profile_url, unique_name=unique_name) self.has_declined = has_declined self.is_flagged = is_flagged + self.is_reapprove = is_reapprove self.is_required = is_required self.reviewer_url = reviewer_url self.vote = vote @@ -2879,11 +3072,11 @@ def __init__(self, _links=None, descriptor=None, display_name=None, url=None, di class ImportRepositoryValidation(Model): """ :param git_source: - :type git_source: :class:`GitImportGitSource ` + :type git_source: :class:`GitImportGitSource ` :param password: :type password: str :param tfvc_source: - :type tfvc_source: :class:`GitImportTfvcSource ` + :type tfvc_source: :class:`GitImportTfvcSource ` :param username: :type username: str """ @@ -2925,11 +3118,11 @@ def __init__(self, content=None, content_type=None): class ItemModel(Model): """ :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param content: :type content: str :param content_metadata: - :type content_metadata: :class:`FileContentMetadata ` + :type content_metadata: :class:`FileContentMetadata ` :param is_folder: :type is_folder: bool :param is_sym_link: @@ -3030,7 +3223,7 @@ class PolicyConfigurationRef(Model): :param id: The policy configuration ID. :type id: int :param type: The policy configuration type. - :type type: :class:`PolicyTypeRef ` + :type type: :class:`PolicyTypeRef ` :param url: The URL where the policy configuration can be retrieved. :type url: str """ @@ -3116,7 +3309,7 @@ class ShareNotificationContext(Model): :param message: Optional user note or message. :type message: str :param receivers: Identities of users who will receive a share notification. - :type receivers: list of :class:`IdentityRef ` + :type receivers: list of :class:`IdentityRef ` """ _attribute_map = { @@ -3153,6 +3346,8 @@ class TeamProjectCollectionReference(Model): """ Reference object for a TeamProjectCollection. + :param avatar_url: Collection avatar Url. + :type avatar_url: str :param id: Collection Id. :type id: str :param name: Collection Name. @@ -3162,13 +3357,15 @@ class TeamProjectCollectionReference(Model): """ _attribute_map = { + 'avatar_url': {'key': 'avatarUrl', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'url': {'key': 'url', 'type': 'str'} } - def __init__(self, id=None, name=None, url=None): + def __init__(self, avatar_url=None, id=None, name=None, url=None): super(TeamProjectCollectionReference, self).__init__() + self.avatar_url = avatar_url self.id = id self.name = name self.url = url @@ -3234,7 +3431,7 @@ class VersionedPolicyConfigurationRef(PolicyConfigurationRef): :param id: The policy configuration ID. :type id: int :param type: The policy configuration type. - :type type: :class:`PolicyTypeRef ` + :type type: :class:`PolicyTypeRef ` :param url: The URL where the policy configuration can be retrieved. :type url: str :param revision: The policy configuration revision ID. @@ -3256,9 +3453,9 @@ def __init__(self, id=None, type=None, url=None, revision=None): class VstsInfo(Model): """ :param collection: - :type collection: :class:`TeamProjectCollectionReference ` + :type collection: :class:`TeamProjectCollectionReference ` :param repository: - :type repository: :class:`GitRepository ` + :type repository: :class:`GitRepository ` :param server_url: :type server_url: str """ @@ -3357,9 +3554,13 @@ def __init__(self, version=None, version_options=None, version_type=None, base_v class GitCommit(GitCommitRef): """ :param _links: A collection of related REST reference links. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param author: Author of the commit. - :type author: :class:`GitUserDate ` + :type author: :class:`GitUserDate ` + :param change_counts: Counts of the types of changes (edits, deletes, etc.) included with the commit. + :type change_counts: dict + :param changes: An enumeration of the changes included with the commit. + :type changes: list of :class:`object ` :param comment: Comment or message of the commit. :type comment: str :param comment_truncated: Indicates if the comment is truncated from the full Git commit comment message. @@ -3367,23 +3568,21 @@ class GitCommit(GitCommitRef): :param commit_id: ID (SHA-1) of the commit. :type commit_id: str :param committer: Committer of the commit. - :type committer: :class:`GitUserDate ` - :param change_counts: Counts of the types of changes (edits, deletes, etc.) included with the commit. - :type change_counts: dict - :param changes: An enumeration of the changes included with the commit. - :type changes: list of :class:`object ` + :type committer: :class:`GitUserDate ` + :param commit_too_many_changes: Indicates that commit contains too many changes to be displayed + :type commit_too_many_changes: bool :param parents: An enumeration of the parent commit IDs for this commit. :type parents: list of str :param push: The push associated with this commit. - :type push: :class:`GitPushRef ` + :type push: :class:`GitPushRef ` :param remote_url: Remote URL path to the commit. :type remote_url: str :param statuses: A list of status metadata from services and extensions that may associate additional information to the commit. - :type statuses: list of :class:`GitStatus ` + :type statuses: list of :class:`GitStatus ` :param url: REST URL for this resource. :type url: str :param work_items: A list of workitems associated with this commit. - :type work_items: list of :class:`ResourceRef ` + :type work_items: list of :class:`ResourceRef ` :param tree_id: :type tree_id: str """ @@ -3391,12 +3590,13 @@ class GitCommit(GitCommitRef): _attribute_map = { '_links': {'key': '_links', 'type': 'ReferenceLinks'}, 'author': {'key': 'author', 'type': 'GitUserDate'}, + 'change_counts': {'key': 'changeCounts', 'type': '{int}'}, + 'changes': {'key': 'changes', 'type': '[object]'}, 'comment': {'key': 'comment', 'type': 'str'}, 'comment_truncated': {'key': 'commentTruncated', 'type': 'bool'}, 'commit_id': {'key': 'commitId', 'type': 'str'}, 'committer': {'key': 'committer', 'type': 'GitUserDate'}, - 'change_counts': {'key': 'changeCounts', 'type': '{int}'}, - 'changes': {'key': 'changes', 'type': '[object]'}, + 'commit_too_many_changes': {'key': 'commitTooManyChanges', 'type': 'bool'}, 'parents': {'key': 'parents', 'type': '[str]'}, 'push': {'key': 'push', 'type': 'GitPushRef'}, 'remote_url': {'key': 'remoteUrl', 'type': 'str'}, @@ -3406,8 +3606,8 @@ class GitCommit(GitCommitRef): 'tree_id': {'key': 'treeId', 'type': 'str'} } - def __init__(self, _links=None, author=None, comment=None, comment_truncated=None, commit_id=None, committer=None, change_counts=None, changes=None, parents=None, push=None, remote_url=None, statuses=None, url=None, work_items=None, tree_id=None): - super(GitCommit, self).__init__(_links=_links, author=author, comment=comment, comment_truncated=comment_truncated, commit_id=commit_id, committer=committer, change_counts=change_counts, changes=changes, parents=parents, push=push, remote_url=remote_url, statuses=statuses, url=url, work_items=work_items) + def __init__(self, _links=None, author=None, change_counts=None, changes=None, comment=None, comment_truncated=None, commit_id=None, committer=None, commit_too_many_changes=None, parents=None, push=None, remote_url=None, statuses=None, url=None, work_items=None, tree_id=None): + super(GitCommit, self).__init__(_links=_links, author=author, change_counts=change_counts, changes=changes, comment=comment, comment_truncated=comment_truncated, commit_id=commit_id, committer=committer, commit_too_many_changes=commit_too_many_changes, parents=parents, push=push, remote_url=remote_url, statuses=statuses, url=url, work_items=work_items) self.tree_id = tree_id @@ -3416,13 +3616,13 @@ class GitForkRef(GitRef): Information about a fork ref. :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param creator: - :type creator: :class:`IdentityRef ` + :type creator: :class:`IdentityRef ` :param is_locked: :type is_locked: bool :param is_locked_by: - :type is_locked_by: :class:`IdentityRef ` + :type is_locked_by: :class:`IdentityRef ` :param name: :type name: str :param object_id: @@ -3430,11 +3630,11 @@ class GitForkRef(GitRef): :param peeled_object_id: :type peeled_object_id: str :param statuses: - :type statuses: list of :class:`GitStatus ` + :type statuses: list of :class:`GitStatus ` :param url: :type url: str :param repository: The repository ID of the fork. - :type repository: :class:`GitRepository ` + :type repository: :class:`GitRepository ` """ _attribute_map = { @@ -3458,11 +3658,11 @@ def __init__(self, _links=None, creator=None, is_locked=None, is_locked_by=None, class GitItem(ItemModel): """ :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param content: :type content: str :param content_metadata: - :type content_metadata: :class:`FileContentMetadata ` + :type content_metadata: :class:`FileContentMetadata ` :param is_folder: :type is_folder: bool :param is_sym_link: @@ -3476,7 +3676,7 @@ class GitItem(ItemModel): :param git_object_type: Type of object (Commit, Tree, Blob, Tag, ...) :type git_object_type: object :param latest_processed_change: Shallow ref to commit that last changed this item Only populated if latestProcessedChange is requested May not be accurate if latest change is not yet cached - :type latest_processed_change: :class:`GitCommitRef ` + :type latest_processed_change: :class:`GitCommitRef ` :param object_id: Git object id :type object_id: str :param original_object_id: Git object id @@ -3514,9 +3714,9 @@ class GitMerge(GitMergeParameters): :param parents: An enumeration of the parent commit IDs for the merge commit. :type parents: list of str :param _links: Reference links. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param detailed_status: Detailed status of the merge operation. - :type detailed_status: :class:`GitMergeOperationStatusDetail ` + :type detailed_status: :class:`GitMergeOperationStatusDetail ` :param merge_operation_id: Unique identifier for the merge operation. :type merge_operation_id: int :param status: Status of the merge operation. @@ -3545,11 +3745,11 @@ class GitPullRequestStatus(GitStatus): This class contains the metadata of a service/extension posting pull request status. Status can be associated with a pull request or an iteration. :param _links: Reference links. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param context: Context of the status. - :type context: :class:`GitStatusContext ` + :type context: :class:`GitStatusContext ` :param created_by: Identity that created the status. - :type created_by: :class:`IdentityRef ` + :type created_by: :class:`IdentityRef ` :param creation_date: Creation date and time of the status. :type creation_date: datetime :param description: Status description. Typically describes current state of the status. @@ -3565,7 +3765,7 @@ class GitPullRequestStatus(GitStatus): :param iteration_id: ID of the iteration to associate status with. Minimum value is 1. :type iteration_id: int :param properties: Custom properties of the status. - :type properties: :class:`object ` + :type properties: :class:`object ` """ _attribute_map = { @@ -3591,23 +3791,23 @@ def __init__(self, _links=None, context=None, created_by=None, creation_date=Non class GitPush(GitPushRef): """ :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param date: :type date: datetime :param push_correlation_id: :type push_correlation_id: str :param pushed_by: - :type pushed_by: :class:`IdentityRef ` + :type pushed_by: :class:`IdentityRef ` :param push_id: :type push_id: int :param url: :type url: str :param commits: - :type commits: list of :class:`GitCommitRef ` + :type commits: list of :class:`GitCommitRef ` :param ref_updates: - :type ref_updates: list of :class:`GitRefUpdate ` + :type ref_updates: list of :class:`GitRefUpdate ` :param repository: - :type repository: :class:`GitRepository ` + :type repository: :class:`GitRepository ` """ _attribute_map = { @@ -3668,15 +3868,15 @@ class PolicyConfiguration(VersionedPolicyConfigurationRef): :param id: The policy configuration ID. :type id: int :param type: The policy configuration type. - :type type: :class:`PolicyTypeRef ` + :type type: :class:`PolicyTypeRef ` :param url: The URL where the policy configuration can be retrieved. :type url: str :param revision: The policy configuration revision ID. :type revision: int :param _links: The links to other objects related to this object. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param created_by: A reference to the identity that created the policy. - :type created_by: :class:`IdentityRef ` + :type created_by: :class:`IdentityRef ` :param created_date: The date and time when the policy was created. :type created_date: datetime :param is_blocking: Indicates whether the policy is blocking. @@ -3719,7 +3919,13 @@ def __init__(self, id=None, type=None, url=None, revision=None, _links=None, cre __all__ = [ + 'AdvSecEnablementStatus', + 'AdvSecEnablementUpdate', 'Attachment', + 'BillableCommitter', + 'BillableCommitterDetail', + 'BillablePusher', + 'Change', 'Comment', 'CommentIterationContext', 'CommentPosition', @@ -3737,8 +3943,9 @@ def __init__(self, id=None, type=None, url=None, revision=None, _links=None, cre 'GitAsyncRefOperationSource', 'GitBlobRef', 'GitBranchStats', - 'GitCommitDiffs', + 'GitCherryPick', 'GitCommitChanges', + 'GitCommitDiffs', 'GitCommitRef', 'GitConflict', 'GitConflictUpdateResult', @@ -3747,7 +3954,6 @@ def __init__(self, id=None, type=None, url=None, revision=None, _links=None, cre 'GitForkOperationStatusDetail', 'GitForkSyncRequest', 'GitForkSyncRequestParameters', - 'GitCherryPick', 'GitImportGitSource', 'GitImportRequest', 'GitImportRequestParameters', @@ -3761,10 +3967,10 @@ def __init__(self, id=None, type=None, url=None, revision=None, _links=None, cre 'GitObject', 'GitPolicyConfigurationResponse', 'GitPullRequest', + 'GitPullRequestChange', 'GitPullRequestCommentThread', 'GitPullRequestCommentThreadContext', 'GitPullRequestCompletionOptions', - 'GitPullRequestChange', 'GitPullRequestIteration', 'GitPullRequestIterationChanges', 'GitPullRequestMergeOptions', @@ -3798,7 +4004,6 @@ def __init__(self, id=None, type=None, url=None, revision=None, _links=None, cre 'GitVersionDescriptor', 'GlobalGitRepositoryKey', 'GraphSubjectBase', - 'Change', 'IdentityRef', 'IdentityRefWithVote', 'ImportRepositoryValidation', diff --git a/azure-devops/azure/devops/v7_0/graph/__init__.py b/azure-devops/azure/devops/v7_2/graph/__init__.py similarity index 79% rename from azure-devops/azure/devops/v7_0/graph/__init__.py rename to azure-devops/azure/devops/v7_2/graph/__init__.py index ce784bbd..fb5631e2 100644 --- a/azure-devops/azure/devops/v7_0/graph/__init__.py +++ b/azure-devops/azure/devops/v7_2/graph/__init__.py @@ -10,6 +10,7 @@ from .graph_client import GraphClient __all__ = [ + 'AadGraphMember', 'Avatar', 'GraphCachePolicies', 'GraphDescriptorResult', @@ -23,6 +24,9 @@ 'GraphProviderInfo', 'GraphScope', 'GraphScopeCreationContext', + 'GraphServicePrincipal', + 'GraphServicePrincipalCreationContext', + 'GraphServicePrincipalUpdateContext', 'GraphStorageKeyResult', 'GraphSubject', 'GraphSubjectBase', @@ -32,9 +36,16 @@ 'GraphUser', 'GraphUserCreationContext', 'GraphUserUpdateContext', + 'IdentityMapping', + 'IdentityMappings', 'JsonPatchOperation', + 'MappingResult', 'PagedGraphGroups', + 'PagedGraphMembers', + 'PagedGraphServicePrincipals', 'PagedGraphUsers', 'ReferenceLinks', + 'ResolveDisconnectedUsersResponse', + 'UserPrincipalName', 'GraphClient' ] diff --git a/azure-devops/azure/devops/v7_0/graph/graph_client.py b/azure-devops/azure/devops/v7_2/graph/graph_client.py similarity index 75% rename from azure-devops/azure/devops/v7_0/graph/graph_client.py rename to azure-devops/azure/devops/v7_2/graph/graph_client.py index 5af4fa59..99cb480d 100644 --- a/azure-devops/azure/devops/v7_0/graph/graph_client.py +++ b/azure-devops/azure/devops/v7_2/graph/graph_client.py @@ -27,6 +27,7 @@ def __init__(self, base_url=None, creds=None): def delete_avatar(self, subject_descriptor): """DeleteAvatar. + [Preview API] :param str subject_descriptor: """ route_values = {} @@ -34,15 +35,16 @@ def delete_avatar(self, subject_descriptor): route_values['subjectDescriptor'] = self._serialize.url('subject_descriptor', subject_descriptor, 'str') self._send(http_method='DELETE', location_id='801eaf9c-0585-4be8-9cdb-b0efa074de91', - version='7.0', + version='7.2-preview.1', route_values=route_values) def get_avatar(self, subject_descriptor, size=None, format=None): """GetAvatar. + [Preview API] :param str subject_descriptor: :param str size: :param str format: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if subject_descriptor is not None: @@ -54,14 +56,15 @@ def get_avatar(self, subject_descriptor, size=None, format=None): query_parameters['format'] = self._serialize.query('format', format, 'str') response = self._send(http_method='GET', location_id='801eaf9c-0585-4be8-9cdb-b0efa074de91', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('Avatar', response) def set_avatar(self, avatar, subject_descriptor): """SetAvatar. - :param :class:` ` avatar: + [Preview API] + :param :class:` ` avatar: :param str subject_descriptor: """ route_values = {} @@ -70,32 +73,32 @@ def set_avatar(self, avatar, subject_descriptor): content = self._serialize.body(avatar, 'Avatar') self._send(http_method='PUT', location_id='801eaf9c-0585-4be8-9cdb-b0efa074de91', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) def get_descriptor(self, storage_key): """GetDescriptor. - Resolve a storage key to a descriptor + [Preview API] Resolve a storage key to a descriptor :param str storage_key: Storage key of the subject (user, group, scope, etc.) to resolve - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if storage_key is not None: route_values['storageKey'] = self._serialize.url('storage_key', storage_key, 'str') response = self._send(http_method='GET', location_id='048aee0a-7072-4cde-ab73-7af77b1e0b4e', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('GraphDescriptorResult', response) def create_group(self, creation_context, scope_descriptor=None, group_descriptors=None): """CreateGroup. [Preview API] Create a new Azure DevOps group or materialize an existing AAD group. - :param :class:` ` creation_context: The subset of the full graph group used to uniquely find the graph subject in an external provider. + :param :class:` ` creation_context: The subset of the full graph group used to uniquely find the graph subject in an external provider. :param str scope_descriptor: A descriptor referencing the scope (collection, project) in which the group should be created. If omitted, will be created in the scope of the enclosing account or organization. Valid only for VSTS groups. :param [str] group_descriptors: A comma separated list of descriptors referencing groups you want the graph group to join - :rtype: :class:` ` + :rtype: :class:` ` """ query_parameters = {} if scope_descriptor is not None: @@ -106,7 +109,7 @@ def create_group(self, creation_context, scope_descriptor=None, group_descriptor content = self._serialize.body(creation_context, 'GraphGroupCreationContext') response = self._send(http_method='POST', location_id='ebbe6af8-0b91-4c13-8cf1-777c14858188', - version='7.0-preview.1', + version='7.2-preview.1', query_parameters=query_parameters, content=content) return self._deserialize('GraphGroup', response) @@ -121,21 +124,21 @@ def delete_group(self, group_descriptor): route_values['groupDescriptor'] = self._serialize.url('group_descriptor', group_descriptor, 'str') self._send(http_method='DELETE', location_id='ebbe6af8-0b91-4c13-8cf1-777c14858188', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) def get_group(self, group_descriptor): """GetGroup. [Preview API] Get a group by its descriptor. :param str group_descriptor: The descriptor of the desired graph group. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if group_descriptor is not None: route_values['groupDescriptor'] = self._serialize.url('group_descriptor', group_descriptor, 'str') response = self._send(http_method='GET', location_id='ebbe6af8-0b91-4c13-8cf1-777c14858188', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) return self._deserialize('GraphGroup', response) @@ -145,7 +148,7 @@ def list_groups(self, scope_descriptor=None, subject_types=None, continuation_to :param str scope_descriptor: Specify a non-default scope (collection, project) to search for groups. :param [str] subject_types: A comma separated list of user subject subtypes to reduce the retrieved results, e.g. Microsoft.IdentityModel.Claims.ClaimsIdentity :param str continuation_token: An opaque data blob that allows the next page of data to resume immediately after where the previous page ended. The only reliable way to know if there is more data left is the presence of a continuation token. - :rtype: :class:` ` + :rtype: :class:` ` """ query_parameters = {} if scope_descriptor is not None: @@ -157,7 +160,7 @@ def list_groups(self, scope_descriptor=None, subject_types=None, continuation_to query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'str') response = self._send(http_method='GET', location_id='ebbe6af8-0b91-4c13-8cf1-777c14858188', - version='7.0-preview.1', + version='7.2-preview.1', query_parameters=query_parameters) response_object = models.PagedGraphGroups() response_object.graph_groups = self._deserialize('[GraphGroup]', self._unwrap_collection(response)) @@ -168,8 +171,8 @@ def update_group(self, group_descriptor, patch_document): """UpdateGroup. [Preview API] Update the properties of an Azure DevOps group. :param str group_descriptor: The descriptor of the group to modify. - :param :class:`<[JsonPatchOperation]> ` patch_document: The JSON+Patch document containing the fields to alter. - :rtype: :class:` ` + :param :class:`<[JsonPatchOperation]> ` patch_document: The JSON+Patch document containing the fields to alter. + :rtype: :class:` ` """ route_values = {} if group_descriptor is not None: @@ -177,7 +180,7 @@ def update_group(self, group_descriptor, patch_document): content = self._serialize.body(patch_document, '[JsonPatchOperation]') response = self._send(http_method='PATCH', location_id='ebbe6af8-0b91-4c13-8cf1-777c14858188', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, content=content, media_type='application/json-patch+json') @@ -188,7 +191,7 @@ def add_membership(self, subject_descriptor, container_descriptor): [Preview API] Create a new membership between a container and subject. :param str subject_descriptor: A descriptor to a group or user that can be the child subject in the relationship. :param str container_descriptor: A descriptor to a group that can be the container in the relationship. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if subject_descriptor is not None: @@ -197,16 +200,32 @@ def add_membership(self, subject_descriptor, container_descriptor): route_values['containerDescriptor'] = self._serialize.url('container_descriptor', container_descriptor, 'str') response = self._send(http_method='PUT', location_id='3fd2e6ca-fb30-443a-b579-95b19ed0934c', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) return self._deserialize('GraphMembership', response) + def check_membership_existence(self, subject_descriptor, container_descriptor): + """CheckMembershipExistence. + [Preview API] Check to see if a membership relationship between a container and subject exists. + :param str subject_descriptor: The group or user that is a child subject of the relationship. + :param str container_descriptor: The group that is the container in the relationship. + """ + route_values = {} + if subject_descriptor is not None: + route_values['subjectDescriptor'] = self._serialize.url('subject_descriptor', subject_descriptor, 'str') + if container_descriptor is not None: + route_values['containerDescriptor'] = self._serialize.url('container_descriptor', container_descriptor, 'str') + self._send(http_method='HEAD', + location_id='3fd2e6ca-fb30-443a-b579-95b19ed0934c', + version='7.2-preview.1', + route_values=route_values) + def get_membership(self, subject_descriptor, container_descriptor): """GetMembership. [Preview API] Get a membership relationship between a container and subject. :param str subject_descriptor: A descriptor to the child subject in the relationship. :param str container_descriptor: A descriptor to the container in the relationship. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if subject_descriptor is not None: @@ -215,26 +234,10 @@ def get_membership(self, subject_descriptor, container_descriptor): route_values['containerDescriptor'] = self._serialize.url('container_descriptor', container_descriptor, 'str') response = self._send(http_method='GET', location_id='3fd2e6ca-fb30-443a-b579-95b19ed0934c', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) return self._deserialize('GraphMembership', response) - def check_membership_existence(self, subject_descriptor, container_descriptor): - """CheckMembershipExistence. - [Preview API] Check to see if a membership relationship between a container and subject exists. - :param str subject_descriptor: The group or user that is a child subject of the relationship. - :param str container_descriptor: The group that is the container in the relationship. - """ - route_values = {} - if subject_descriptor is not None: - route_values['subjectDescriptor'] = self._serialize.url('subject_descriptor', subject_descriptor, 'str') - if container_descriptor is not None: - route_values['containerDescriptor'] = self._serialize.url('container_descriptor', container_descriptor, 'str') - self._send(http_method='HEAD', - location_id='3fd2e6ca-fb30-443a-b579-95b19ed0934c', - version='7.0-preview.1', - route_values=route_values) - def remove_membership(self, subject_descriptor, container_descriptor): """RemoveMembership. [Preview API] Deletes a membership between a container and subject. @@ -248,7 +251,7 @@ def remove_membership(self, subject_descriptor, container_descriptor): route_values['containerDescriptor'] = self._serialize.url('container_descriptor', container_descriptor, 'str') self._send(http_method='DELETE', location_id='3fd2e6ca-fb30-443a-b579-95b19ed0934c', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) def list_memberships(self, subject_descriptor, direction=None, depth=None): @@ -269,7 +272,7 @@ def list_memberships(self, subject_descriptor, direction=None, depth=None): query_parameters['depth'] = self._serialize.query('depth', depth, 'int') response = self._send(http_method='GET', location_id='e34b6394-6b30-4435-94a9-409a5eef3e31', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[GraphMembership]', self._unwrap_collection(response)) @@ -278,89 +281,158 @@ def get_membership_state(self, subject_descriptor): """GetMembershipState. [Preview API] Check whether a subject is active or inactive. :param str subject_descriptor: Descriptor of the subject (user, group, scope, etc.) to check state of - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if subject_descriptor is not None: route_values['subjectDescriptor'] = self._serialize.url('subject_descriptor', subject_descriptor, 'str') response = self._send(http_method='GET', location_id='1ffe5c94-1144-4191-907b-d0211cad36a8', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) return self._deserialize('GraphMembershipState', response) def get_provider_info(self, user_descriptor): """GetProviderInfo. + [Preview API] :param str user_descriptor: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if user_descriptor is not None: route_values['userDescriptor'] = self._serialize.url('user_descriptor', user_descriptor, 'str') response = self._send(http_method='GET', location_id='1e377995-6fa2-4588-bd64-930186abdcfa', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('GraphProviderInfo', response) def request_access(self, jsondocument): """RequestAccess. [Preview API] - :param :class:` ` jsondocument: + :param :class:` ` jsondocument: """ content = self._serialize.body(jsondocument, 'object') self._send(http_method='POST', location_id='8d54bf92-8c99-47f2-9972-b21341f1722e', - version='7.0-preview.1', + version='7.2-preview.1', content=content) + def create_service_principal(self, creation_context, group_descriptors=None): + """CreateServicePrincipal. + [Preview API] Materialize an existing AAD service principal into the ADO account. + :param :class:` ` creation_context: The subset of the full graph service principal used to uniquely find the graph subject in an external provider. + :param [str] group_descriptors: A comma separated list of descriptors of groups you want the graph service principal to join + :rtype: :class:` ` + """ + query_parameters = {} + if group_descriptors is not None: + group_descriptors = ",".join(group_descriptors) + query_parameters['groupDescriptors'] = self._serialize.query('group_descriptors', group_descriptors, 'str') + content = self._serialize.body(creation_context, 'GraphServicePrincipalCreationContext') + response = self._send(http_method='POST', + location_id='e1dbb0ae-49cb-4532-95a1-86cd89cfcab4', + version='7.2-preview.1', + query_parameters=query_parameters, + content=content) + return self._deserialize('GraphServicePrincipal', response) + + def delete_service_principal(self, service_principal_descriptor): + """DeleteServicePrincipal. + [Preview API] Disables a service principal. + :param str service_principal_descriptor: The descriptor of the service principal to delete. + """ + route_values = {} + if service_principal_descriptor is not None: + route_values['servicePrincipalDescriptor'] = self._serialize.url('service_principal_descriptor', service_principal_descriptor, 'str') + self._send(http_method='DELETE', + location_id='e1dbb0ae-49cb-4532-95a1-86cd89cfcab4', + version='7.2-preview.1', + route_values=route_values) + + def get_service_principal(self, service_principal_descriptor): + """GetServicePrincipal. + [Preview API] Get a service principal by its descriptor. + :param str service_principal_descriptor: The descriptor of the desired service principal. + :rtype: :class:` ` + """ + route_values = {} + if service_principal_descriptor is not None: + route_values['servicePrincipalDescriptor'] = self._serialize.url('service_principal_descriptor', service_principal_descriptor, 'str') + response = self._send(http_method='GET', + location_id='e1dbb0ae-49cb-4532-95a1-86cd89cfcab4', + version='7.2-preview.1', + route_values=route_values) + return self._deserialize('GraphServicePrincipal', response) + + def list_service_principals(self, continuation_token=None, scope_descriptor=None): + """ListServicePrincipals. + [Preview API] Get a list of all service principals in a given scope. + :param str continuation_token: An opaque data blob that allows the next page of data to resume immediately after where the previous page ended. The only reliable way to know if there is more data left is the presence of a continuation token. + :param str scope_descriptor: Specify a non-default scope (collection, project) to search for service principals. + :rtype: :class:` ` + """ + query_parameters = {} + if continuation_token is not None: + query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'str') + if scope_descriptor is not None: + query_parameters['scopeDescriptor'] = self._serialize.query('scope_descriptor', scope_descriptor, 'str') + response = self._send(http_method='GET', + location_id='e1dbb0ae-49cb-4532-95a1-86cd89cfcab4', + version='7.2-preview.1', + query_parameters=query_parameters) + response_object = models.PagedGraphServicePrincipals() + response_object.graph_service_principals = self._deserialize('[GraphServicePrincipal]', self._unwrap_collection(response)) + response_object.continuation_token = response.headers.get('X-MS-ContinuationToken') + return response_object + def get_storage_key(self, subject_descriptor): """GetStorageKey. - Resolve a descriptor to a storage key. + [Preview API] Resolve a descriptor to a storage key. :param str subject_descriptor: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if subject_descriptor is not None: route_values['subjectDescriptor'] = self._serialize.url('subject_descriptor', subject_descriptor, 'str') response = self._send(http_method='GET', location_id='eb85f8cc-f0f6-4264-a5b1-ffe2e4d4801f', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('GraphStorageKeyResult', response) def lookup_subjects(self, subject_lookup): """LookupSubjects. [Preview API] Resolve descriptors to users, groups or scopes (Subjects) in a batch. - :param :class:` ` subject_lookup: A list of descriptors that specifies a subset of subjects to retrieve. Each descriptor uniquely identifies the subject across all instance scopes, but only at a single point in time. + :param :class:` ` subject_lookup: A list of descriptors that specifies a subset of subjects to retrieve. Each descriptor uniquely identifies the subject across all instance scopes, but only at a single point in time. :rtype: {GraphSubject} """ content = self._serialize.body(subject_lookup, 'GraphSubjectLookup') response = self._send(http_method='POST', location_id='4dd4d168-11f2-48c4-83e8-756fa0de027c', - version='7.0-preview.1', + version='7.2-preview.1', content=content) return self._deserialize('{GraphSubject}', self._unwrap_collection(response)) def query_subjects(self, subject_query): """QuerySubjects. [Preview API] Search for Azure Devops users, or/and groups. Results will be returned in a batch with no more than 100 graph subjects. - :param :class:` ` subject_query: The query that we'll be using to search includes the following: Query: the search term. The search will be prefix matching only. SubjectKind: "User" or "Group" can be specified, both or either ScopeDescriptor: Non-default scope can be specified, i.e. project scope descriptor + :param :class:` ` subject_query: The query that we'll be using to search includes the following: Query: the search term. The search will be prefix matching only. SubjectKind: "User" or "Group" can be specified, both or either ScopeDescriptor: Non-default scope can be specified, i.e. project scope descriptor :rtype: [GraphSubject] """ content = self._serialize.body(subject_query, 'GraphSubjectQuery') response = self._send(http_method='POST', location_id='05942c89-006a-48ce-bb79-baeb8abf99c6', - version='7.0-preview.1', + version='7.2-preview.1', content=content) return self._deserialize('[GraphSubject]', self._unwrap_collection(response)) def create_user(self, creation_context, group_descriptors=None): """CreateUser. - [Preview API] Materialize an existing AAD or MSA user into the VSTS account. - :param :class:` ` creation_context: The subset of the full graph user used to uniquely find the graph subject in an external provider. + [Preview API] Materialize an existing AAD or MSA user into the ADO account. + :param :class:` ` creation_context: The subset of the full graph user used to uniquely find the graph subject in an external provider. :param [str] group_descriptors: A comma separated list of descriptors of groups you want the graph user to join - :rtype: :class:` ` + :rtype: :class:` ` """ query_parameters = {} if group_descriptors is not None: @@ -369,7 +441,7 @@ def create_user(self, creation_context, group_descriptors=None): content = self._serialize.body(creation_context, 'GraphUserCreationContext') response = self._send(http_method='POST', location_id='005e26ec-6b77-4e4f-a986-b3827bf241f5', - version='7.0-preview.1', + version='7.2-preview.1', query_parameters=query_parameters, content=content) return self._deserialize('GraphUser', response) @@ -384,21 +456,21 @@ def delete_user(self, user_descriptor): route_values['userDescriptor'] = self._serialize.url('user_descriptor', user_descriptor, 'str') self._send(http_method='DELETE', location_id='005e26ec-6b77-4e4f-a986-b3827bf241f5', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) def get_user(self, user_descriptor): """GetUser. [Preview API] Get a user by its descriptor. :param str user_descriptor: The descriptor of the desired user. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if user_descriptor is not None: route_values['userDescriptor'] = self._serialize.url('user_descriptor', user_descriptor, 'str') response = self._send(http_method='GET', location_id='005e26ec-6b77-4e4f-a986-b3827bf241f5', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) return self._deserialize('GraphUser', response) @@ -408,7 +480,7 @@ def list_users(self, subject_types=None, continuation_token=None, scope_descript :param [str] subject_types: A comma separated list of user subject subtypes to reduce the retrieved results, e.g. msa’, ‘aad’, ‘svc’ (service identity), ‘imp’ (imported identity), etc. :param str continuation_token: An opaque data blob that allows the next page of data to resume immediately after where the previous page ended. The only reliable way to know if there is more data left is the presence of a continuation token. :param str scope_descriptor: Specify a non-default scope (collection, project) to search for users. - :rtype: :class:` ` + :rtype: :class:` ` """ query_parameters = {} if subject_types is not None: @@ -420,7 +492,7 @@ def list_users(self, subject_types=None, continuation_token=None, scope_descript query_parameters['scopeDescriptor'] = self._serialize.query('scope_descriptor', scope_descriptor, 'str') response = self._send(http_method='GET', location_id='005e26ec-6b77-4e4f-a986-b3827bf241f5', - version='7.0-preview.1', + version='7.2-preview.1', query_parameters=query_parameters) response_object = models.PagedGraphUsers() response_object.graph_users = self._deserialize('[GraphUser]', self._unwrap_collection(response)) @@ -429,10 +501,10 @@ def list_users(self, subject_types=None, continuation_token=None, scope_descript def update_user(self, update_context, user_descriptor): """UpdateUser. - [Preview API] Map an existing user to a different identity - :param :class:` ` update_context: The subset of the full graph user used to uniquely find the graph subject in an external provider. - :param str user_descriptor: the descriptor of the user to update - :rtype: :class:` ` + [Preview API] Map an existing user to a different user. + :param :class:` ` update_context: The subset of the full graph user used to uniquely find the graph subject in an external provider. + :param str user_descriptor: The descriptor of the user to update + :rtype: :class:` ` """ route_values = {} if user_descriptor is not None: @@ -440,7 +512,7 @@ def update_user(self, update_context, user_descriptor): content = self._serialize.body(update_context, 'GraphUserUpdateContext') response = self._send(http_method='PATCH', location_id='005e26ec-6b77-4e4f-a986-b3827bf241f5', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('GraphUser', response) diff --git a/azure-devops/azure/devops/v7_0/graph/models.py b/azure-devops/azure/devops/v7_2/graph/models.py similarity index 70% rename from azure-devops/azure/devops/v7_0/graph/models.py rename to azure-devops/azure/devops/v7_2/graph/models.py index 779004f2..864ebead 100644 --- a/azure-devops/azure/devops/v7_0/graph/models.py +++ b/azure-devops/azure/devops/v7_2/graph/models.py @@ -56,9 +56,9 @@ class GraphDescriptorResult(Model): Subject descriptor of a Graph entity :param _links: This field contains zero or more interesting links about the graph descriptor. These links may be invoked to obtain additional relationships or more detailed information about this graph descriptor. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param value: - :type value: :class:`str ` + :type value: :class:`str ` """ _attribute_map = { @@ -123,7 +123,7 @@ class GraphMembership(Model): Relationship between a container and a member :param _links: This field contains zero or more interesting links about the graph membership. These links may be invoked to obtain additional relationships or more detailed information about this graph membership. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param container_descriptor: :type container_descriptor: str :param member_descriptor: @@ -148,7 +148,7 @@ class GraphMembershipState(Model): Status of a Graph membership (active/inactive) :param _links: This field contains zero or more interesting links about the graph membership state. These links may be invoked to obtain additional relationships or more detailed information about this graph membership state. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param active: When true, the membership is active :type active: bool """ @@ -171,11 +171,11 @@ class GraphMembershipTraversal(Model): :param is_complete: When true, the subject is traversed completely :type is_complete: bool :param subject_descriptor: The traversed subject descriptor - :type subject_descriptor: :class:`str ` + :type subject_descriptor: :class:`str ` :param traversed_subject_ids: Subject descriptor ids of the traversed members :type traversed_subject_ids: list of str :param traversed_subjects: Subject descriptors of the traversed members - :type traversed_subjects: list of :class:`str ` + :type traversed_subjects: list of :class:`str ` """ _attribute_map = { @@ -261,12 +261,46 @@ def __init__(self, admin_group_description=None, admin_group_name=None, creator_ self.storage_key = storage_key +class GraphServicePrincipalCreationContext(Model): + """ + Do not attempt to use this type to create a new service principal. Use one of the subclasses instead. This type does not contain sufficient fields to create a new service principal. + + :param storage_key: Optional: If provided, we will use this identifier for the storage key of the created service principal + :type storage_key: str + """ + + _attribute_map = { + 'storage_key': {'key': 'storageKey', 'type': 'str'} + } + + def __init__(self, storage_key=None): + super(GraphServicePrincipalCreationContext, self).__init__() + self.storage_key = storage_key + + +class GraphServicePrincipalUpdateContext(Model): + """ + Do not attempt to use this type to update service principal. Use one of the subclasses instead. This type does not contain sufficient fields to create a new service principal. + + :param storage_key: Storage key should not be specified in case of updating service principal + :type storage_key: str + """ + + _attribute_map = { + 'storage_key': {'key': 'storageKey', 'type': 'str'} + } + + def __init__(self, storage_key=None): + super(GraphServicePrincipalUpdateContext, self).__init__() + self.storage_key = storage_key + + class GraphStorageKeyResult(Model): """ Storage key of a Graph entity :param _links: This field contains zero or more interesting links about the graph storage key. These links may be invoked to obtain additional relationships or more detailed information about this graph storage key. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param value: :type value: str """ @@ -285,7 +319,7 @@ def __init__(self, _links=None, value=None): class GraphSubjectBase(Model): """ :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. :type descriptor: str :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. @@ -314,7 +348,7 @@ class GraphSubjectLookup(Model): Batching of subjects to lookup using the Graph API :param lookup_keys: - :type lookup_keys: list of :class:`GraphSubjectLookupKey ` + :type lookup_keys: list of :class:`GraphSubjectLookupKey ` """ _attribute_map = { @@ -329,7 +363,7 @@ def __init__(self, lookup_keys=None): class GraphSubjectLookupKey(Model): """ :param descriptor: - :type descriptor: :class:`str ` + :type descriptor: :class:`str ` """ _attribute_map = { @@ -348,7 +382,7 @@ class GraphSubjectQuery(Model): :param query: Search term to search for Azure Devops users or/and groups :type query: str :param scope_descriptor: Optional parameter. Specify a non-default scope (collection, project) to search for users or groups within the scope. - :type scope_descriptor: :class:`str ` + :type scope_descriptor: :class:`str ` :param subject_kind: "User" or "Group" can be specified, both or either :type subject_kind: list of str """ @@ -400,6 +434,40 @@ def __init__(self, storage_key=None): self.storage_key = storage_key +class IdentityMapping(Model): + """ + :param source: + :type source: :class:`UserPrincipalName ` + :param target: + :type target: :class:`UserPrincipalName ` + """ + + _attribute_map = { + 'source': {'key': 'source', 'type': 'UserPrincipalName'}, + 'target': {'key': 'target', 'type': 'UserPrincipalName'} + } + + def __init__(self, source=None, target=None): + super(IdentityMapping, self).__init__() + self.source = source + self.target = target + + +class IdentityMappings(Model): + """ + :param mappings: + :type mappings: list of :class:`IdentityMapping ` + """ + + _attribute_map = { + 'mappings': {'key': 'mappings', 'type': '[IdentityMapping]'} + } + + def __init__(self, mappings=None): + super(IdentityMappings, self).__init__() + self.mappings = mappings + + class JsonPatchOperation(Model): """ The JSON model for a JSON Patch operation @@ -429,12 +497,31 @@ def __init__(self, from_=None, op=None, path=None, value=None): self.value = value +class MappingResult(Model): + """ + :param code: + :type code: str + :param error_message: + :type error_message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'} + } + + def __init__(self, code=None, error_message=None): + super(MappingResult, self).__init__() + self.code = code + self.error_message = error_message + + class PagedGraphGroups(Model): """ :param continuation_token: This will be non-null if there is another page of data. There will never be more than one continuation token returned by a request. :type continuation_token: list of str :param graph_groups: The enumerable list of groups found within a page. - :type graph_groups: list of :class:`GraphGroup ` + :type graph_groups: list of :class:`GraphGroup ` """ _attribute_map = { @@ -448,12 +535,50 @@ def __init__(self, continuation_token=None, graph_groups=None): self.graph_groups = graph_groups +class PagedGraphMembers(Model): + """ + :param continuation_token: This will be non-null if there is another page of data. There will never be more than one continuation token returned by a request. + :type continuation_token: list of str + :param graph_members: The enumerable list of members found within a page. + :type graph_members: list of :class:`GraphMember ` + """ + + _attribute_map = { + 'continuation_token': {'key': 'continuationToken', 'type': '[str]'}, + 'graph_members': {'key': 'graphMembers', 'type': '[GraphMember]'} + } + + def __init__(self, continuation_token=None, graph_members=None): + super(PagedGraphMembers, self).__init__() + self.continuation_token = continuation_token + self.graph_members = graph_members + + +class PagedGraphServicePrincipals(Model): + """ + :param continuation_token: This will be non-null if there is another page of data. There will never be more than one continuation token returned by a request. + :type continuation_token: list of str + :param graph_service_principals: The enumerable list of service principals found within a page. + :type graph_service_principals: list of :class:`GraphServicePrincipal ` + """ + + _attribute_map = { + 'continuation_token': {'key': 'continuationToken', 'type': '[str]'}, + 'graph_service_principals': {'key': 'graphServicePrincipals', 'type': '[GraphServicePrincipal]'} + } + + def __init__(self, continuation_token=None, graph_service_principals=None): + super(PagedGraphServicePrincipals, self).__init__() + self.continuation_token = continuation_token + self.graph_service_principals = graph_service_principals + + class PagedGraphUsers(Model): """ :param continuation_token: This will be non-null if there is another page of data. There will never be more than one continuation token returned by a request. :type continuation_token: list of str :param graph_users: The enumerable set of users found within a page. - :type graph_users: list of :class:`GraphUser ` + :type graph_users: list of :class:`GraphUser ` """ _attribute_map = { @@ -484,12 +609,50 @@ def __init__(self, links=None): self.links = links +class ResolveDisconnectedUsersResponse(Model): + """ + :param code: + :type code: str + :param error_message: + :type error_message: str + :param mapping_results: + :type mapping_results: list of :class:`MappingResult ` + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'mapping_results': {'key': 'mappingResults', 'type': '[MappingResult]'} + } + + def __init__(self, code=None, error_message=None, mapping_results=None): + super(ResolveDisconnectedUsersResponse, self).__init__() + self.code = code + self.error_message = error_message + self.mapping_results = mapping_results + + +class UserPrincipalName(Model): + """ + :param principal_name: + :type principal_name: str + """ + + _attribute_map = { + 'principal_name': {'key': 'principalName', 'type': 'str'} + } + + def __init__(self, principal_name=None): + super(UserPrincipalName, self).__init__() + self.principal_name = principal_name + + class GraphSubject(GraphSubjectBase): """ Top-level graph entity :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. :type descriptor: str :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. @@ -528,7 +691,7 @@ def __init__(self, _links=None, descriptor=None, display_name=None, url=None, le class GraphMember(GraphSubject): """ :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. :type descriptor: str :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. @@ -577,7 +740,7 @@ class GraphScope(GraphSubject): Container where a graph entity is defined (organization, project, team) :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. :type descriptor: str :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. @@ -629,12 +792,10 @@ def __init__(self, _links=None, descriptor=None, display_name=None, url=None, le self.securing_host_descriptor = securing_host_descriptor -class GraphUser(GraphMember): +class AadGraphMember(GraphMember): """ - Graph user entity - :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. :type descriptor: str :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. @@ -684,7 +845,7 @@ class GraphUser(GraphMember): } def __init__(self, _links=None, descriptor=None, display_name=None, url=None, legacy_descriptor=None, origin=None, origin_id=None, subject_kind=None, domain=None, mail_address=None, principal_name=None, directory_alias=None, is_deleted_in_origin=None, metadata_update_date=None, meta_type=None): - super(GraphUser, self).__init__(_links=_links, descriptor=descriptor, display_name=display_name, url=url, legacy_descriptor=legacy_descriptor, origin=origin, origin_id=origin_id, subject_kind=subject_kind, domain=domain, mail_address=mail_address, principal_name=principal_name) + super(AadGraphMember, self).__init__(_links=_links, descriptor=descriptor, display_name=display_name, url=url, legacy_descriptor=legacy_descriptor, origin=origin, origin_id=origin_id, subject_kind=subject_kind, domain=domain, mail_address=mail_address, principal_name=principal_name) self.directory_alias = directory_alias self.is_deleted_in_origin = is_deleted_in_origin self.metadata_update_date = metadata_update_date @@ -696,7 +857,7 @@ class GraphGroup(GraphMember): Graph group entity :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. :type descriptor: str :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. @@ -781,6 +942,122 @@ def __init__(self, _links=None, descriptor=None, display_name=None, url=None, le self.special_type = special_type +class GraphServicePrincipal(AadGraphMember): + """ + :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. + :type _links: :class:`ReferenceLinks ` + :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. + :type descriptor: str + :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. + :type display_name: str + :param url: This url is the full route to the source resource of this graph subject. + :type url: str + :param legacy_descriptor: [Internal Use Only] The legacy descriptor is here in case you need to access old version IMS using identity descriptor. + :type legacy_descriptor: str + :param origin: The type of source provider for the origin identifier (ex:AD, AAD, MSA) + :type origin: str + :param origin_id: The unique identifier from the system of origin. Typically a sid, object id or Guid. Linking and unlinking operations can cause this value to change for a user because the user is not backed by a different provider and has a different unique id in the new provider. + :type origin_id: str + :param subject_kind: This field identifies the type of the graph subject (ex: Group, Scope, User). + :type subject_kind: str + :param domain: This represents the name of the container of origin for a graph member. (For MSA this is "Windows Live ID", for AD the name of the domain, for AAD the tenantID of the directory, for VSTS groups the ScopeId, etc) + :type domain: str + :param mail_address: The email address of record for a given graph member. This may be different than the principal name. + :type mail_address: str + :param principal_name: This is the PrincipalName of this graph member from the source provider. The source provider may change this field over time and it is not guaranteed to be immutable for the life of the graph member by VSTS. + :type principal_name: str + :param directory_alias: The short, generally unique name for the user in the backing directory. For AAD users, this corresponds to the mail nickname, which is often but not necessarily similar to the part of the user's mail address before the @ sign. For GitHub users, this corresponds to the GitHub user handle. + :type directory_alias: str + :param is_deleted_in_origin: When true, the group has been deleted in the identity provider + :type is_deleted_in_origin: bool + :param metadata_update_date: + :type metadata_update_date: datetime + :param meta_type: The meta type of the user in the origin, such as "member", "guest", etc. See UserMetaType for the set of possible values. + :type meta_type: str + :param application_id: + :type application_id: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'descriptor': {'key': 'descriptor', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'legacy_descriptor': {'key': 'legacyDescriptor', 'type': 'str'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'origin_id': {'key': 'originId', 'type': 'str'}, + 'subject_kind': {'key': 'subjectKind', 'type': 'str'}, + 'domain': {'key': 'domain', 'type': 'str'}, + 'mail_address': {'key': 'mailAddress', 'type': 'str'}, + 'principal_name': {'key': 'principalName', 'type': 'str'}, + 'directory_alias': {'key': 'directoryAlias', 'type': 'str'}, + 'is_deleted_in_origin': {'key': 'isDeletedInOrigin', 'type': 'bool'}, + 'metadata_update_date': {'key': 'metadataUpdateDate', 'type': 'iso-8601'}, + 'meta_type': {'key': 'metaType', 'type': 'str'}, + 'application_id': {'key': 'applicationId', 'type': 'str'} + } + + def __init__(self, _links=None, descriptor=None, display_name=None, url=None, legacy_descriptor=None, origin=None, origin_id=None, subject_kind=None, domain=None, mail_address=None, principal_name=None, directory_alias=None, is_deleted_in_origin=None, metadata_update_date=None, meta_type=None, application_id=None): + super(GraphServicePrincipal, self).__init__(_links=_links, descriptor=descriptor, display_name=display_name, url=url, legacy_descriptor=legacy_descriptor, origin=origin, origin_id=origin_id, subject_kind=subject_kind, domain=domain, mail_address=mail_address, principal_name=principal_name, directory_alias=directory_alias, is_deleted_in_origin=is_deleted_in_origin, metadata_update_date=metadata_update_date, meta_type=meta_type) + self.application_id = application_id + + +class GraphUser(AadGraphMember): + """ + :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. + :type _links: :class:`ReferenceLinks ` + :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. + :type descriptor: str + :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. + :type display_name: str + :param url: This url is the full route to the source resource of this graph subject. + :type url: str + :param legacy_descriptor: [Internal Use Only] The legacy descriptor is here in case you need to access old version IMS using identity descriptor. + :type legacy_descriptor: str + :param origin: The type of source provider for the origin identifier (ex:AD, AAD, MSA) + :type origin: str + :param origin_id: The unique identifier from the system of origin. Typically a sid, object id or Guid. Linking and unlinking operations can cause this value to change for a user because the user is not backed by a different provider and has a different unique id in the new provider. + :type origin_id: str + :param subject_kind: This field identifies the type of the graph subject (ex: Group, Scope, User). + :type subject_kind: str + :param domain: This represents the name of the container of origin for a graph member. (For MSA this is "Windows Live ID", for AD the name of the domain, for AAD the tenantID of the directory, for VSTS groups the ScopeId, etc) + :type domain: str + :param mail_address: The email address of record for a given graph member. This may be different than the principal name. + :type mail_address: str + :param principal_name: This is the PrincipalName of this graph member from the source provider. The source provider may change this field over time and it is not guaranteed to be immutable for the life of the graph member by VSTS. + :type principal_name: str + :param directory_alias: The short, generally unique name for the user in the backing directory. For AAD users, this corresponds to the mail nickname, which is often but not necessarily similar to the part of the user's mail address before the @ sign. For GitHub users, this corresponds to the GitHub user handle. + :type directory_alias: str + :param is_deleted_in_origin: When true, the group has been deleted in the identity provider + :type is_deleted_in_origin: bool + :param metadata_update_date: + :type metadata_update_date: datetime + :param meta_type: The meta type of the user in the origin, such as "member", "guest", etc. See UserMetaType for the set of possible values. + :type meta_type: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'descriptor': {'key': 'descriptor', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'legacy_descriptor': {'key': 'legacyDescriptor', 'type': 'str'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'origin_id': {'key': 'originId', 'type': 'str'}, + 'subject_kind': {'key': 'subjectKind', 'type': 'str'}, + 'domain': {'key': 'domain', 'type': 'str'}, + 'mail_address': {'key': 'mailAddress', 'type': 'str'}, + 'principal_name': {'key': 'principalName', 'type': 'str'}, + 'directory_alias': {'key': 'directoryAlias', 'type': 'str'}, + 'is_deleted_in_origin': {'key': 'isDeletedInOrigin', 'type': 'bool'}, + 'metadata_update_date': {'key': 'metadataUpdateDate', 'type': 'iso-8601'}, + 'meta_type': {'key': 'metaType', 'type': 'str'}, + } + + def __init__(self, _links=None, descriptor=None, display_name=None, url=None, legacy_descriptor=None, origin=None, origin_id=None, subject_kind=None, domain=None, mail_address=None, principal_name=None, directory_alias=None, is_deleted_in_origin=None, metadata_update_date=None, meta_type=None): + super(GraphUser, self).__init__(_links=_links, descriptor=descriptor, display_name=display_name, url=url, legacy_descriptor=legacy_descriptor, origin=origin, origin_id=origin_id, subject_kind=subject_kind, domain=domain, mail_address=mail_address, principal_name=principal_name, directory_alias=directory_alias, is_deleted_in_origin=is_deleted_in_origin, metadata_update_date=metadata_update_date, meta_type=meta_type) + + __all__ = [ 'Avatar', 'GraphCachePolicies', @@ -792,6 +1069,8 @@ def __init__(self, _links=None, descriptor=None, display_name=None, url=None, le 'GraphMembershipTraversal', 'GraphProviderInfo', 'GraphScopeCreationContext', + 'GraphServicePrincipalCreationContext', + 'GraphServicePrincipalUpdateContext', 'GraphStorageKeyResult', 'GraphSubjectBase', 'GraphSubjectLookup', @@ -799,13 +1078,22 @@ def __init__(self, _links=None, descriptor=None, display_name=None, url=None, le 'GraphSubjectQuery', 'GraphUserCreationContext', 'GraphUserUpdateContext', + 'IdentityMapping', + 'IdentityMappings', 'JsonPatchOperation', + 'MappingResult', 'PagedGraphGroups', + 'PagedGraphMembers', + 'PagedGraphServicePrincipals', 'PagedGraphUsers', 'ReferenceLinks', + 'ResolveDisconnectedUsersResponse', + 'UserPrincipalName', 'GraphSubject', 'GraphMember', 'GraphScope', - 'GraphUser', + 'AadGraphMember', 'GraphGroup', + 'GraphServicePrincipal', + 'GraphUser', ] diff --git a/azure-devops/azure/devops/v7_0/identity/__init__.py b/azure-devops/azure/devops/v7_2/identity/__init__.py similarity index 100% rename from azure-devops/azure/devops/v7_0/identity/__init__.py rename to azure-devops/azure/devops/v7_2/identity/__init__.py index 4b0c102e..dabb636d 100644 --- a/azure-devops/azure/devops/v7_0/identity/__init__.py +++ b/azure-devops/azure/devops/v7_2/identity/__init__.py @@ -12,11 +12,11 @@ __all__ = [ 'AccessTokenResult', 'AuthorizationGrant', + 'ChangedIdentities', + 'ChangedIdentitiesContext', 'CreateScopeInfo', 'FrameworkIdentityInfo', 'GroupMembership', - 'ChangedIdentities', - 'ChangedIdentitiesContext', 'Identity', 'IdentityBase', 'IdentityBatchInfo', diff --git a/azure-devops/azure/devops/v7_0/identity/identity_client.py b/azure-devops/azure/devops/v7_2/identity/identity_client.py similarity index 87% rename from azure-devops/azure/devops/v7_0/identity/identity_client.py rename to azure-devops/azure/devops/v7_2/identity/identity_client.py index 492dd560..93d31912 100644 --- a/azure-devops/azure/devops/v7_0/identity/identity_client.py +++ b/azure-devops/azure/devops/v7_2/identity/identity_client.py @@ -28,13 +28,13 @@ def __init__(self, base_url=None, creds=None): def create_or_bind_with_claims(self, source_identity): """CreateOrBindWithClaims. [Preview API] - :param :class:` ` source_identity: - :rtype: :class:` ` + :param :class:` ` source_identity: + :rtype: :class:` ` """ content = self._serialize.body(source_identity, 'Identity') response = self._send(http_method='PUT', location_id='90ddfe71-171c-446c-bf3b-b597cd562afd', - version='7.0-preview.1', + version='7.2-preview.1', content=content) return self._deserialize('Identity', response) @@ -43,7 +43,7 @@ def get_descriptor_by_id(self, id, is_master_id=None): [Preview API] :param str id: :param bool is_master_id: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if id is not None: @@ -53,25 +53,27 @@ def get_descriptor_by_id(self, id, is_master_id=None): query_parameters['isMasterId'] = self._serialize.query('is_master_id', is_master_id, 'bool') response = self._send(http_method='GET', location_id='a230389a-94f2-496c-839f-c929787496dd', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('str', response) def create_groups(self, container): """CreateGroups. - :param :class:` ` container: + [Preview API] + :param :class:` ` container: :rtype: [Identity] """ content = self._serialize.body(container, 'object') response = self._send(http_method='POST', location_id='5966283b-4196-4d57-9211-1b68f41ec1c2', - version='7.0', + version='7.2-preview.1', content=content) return self._deserialize('[Identity]', self._unwrap_collection(response)) def delete_group(self, group_id): """DeleteGroup. + [Preview API] :param str group_id: """ route_values = {} @@ -79,11 +81,12 @@ def delete_group(self, group_id): route_values['groupId'] = self._serialize.url('group_id', group_id, 'str') self._send(http_method='DELETE', location_id='5966283b-4196-4d57-9211-1b68f41ec1c2', - version='7.0', + version='7.2-preview.1', route_values=route_values) def list_groups(self, scope_ids=None, recurse=None, deleted=None, properties=None): """ListGroups. + [Preview API] :param str scope_ids: :param bool recurse: :param bool deleted: @@ -101,18 +104,19 @@ def list_groups(self, scope_ids=None, recurse=None, deleted=None, properties=Non query_parameters['properties'] = self._serialize.query('properties', properties, 'str') response = self._send(http_method='GET', location_id='5966283b-4196-4d57-9211-1b68f41ec1c2', - version='7.0', + version='7.2-preview.1', query_parameters=query_parameters) return self._deserialize('[Identity]', self._unwrap_collection(response)) def get_identity_changes(self, identity_sequence_id, group_sequence_id, organization_identity_sequence_id=None, page_size=None, scope_id=None): """GetIdentityChanges. + [Preview API] :param int identity_sequence_id: :param int group_sequence_id: :param int organization_identity_sequence_id: :param int page_size: :param str scope_id: - :rtype: :class:` ` + :rtype: :class:` ` """ query_parameters = {} if identity_sequence_id is not None: @@ -127,12 +131,13 @@ def get_identity_changes(self, identity_sequence_id, group_sequence_id, organiza query_parameters['scopeId'] = self._serialize.query('scope_id', scope_id, 'str') response = self._send(http_method='GET', location_id='28010c54-d0c0-4c89-a5b0-1c9e188b9fb7', - version='7.0', + version='7.2-preview.1', query_parameters=query_parameters) return self._deserialize('ChangedIdentities', response) def get_user_identity_ids_by_domain_id(self, domain_id): """GetUserIdentityIdsByDomainId. + [Preview API] :param str domain_id: :rtype: [str] """ @@ -141,13 +146,13 @@ def get_user_identity_ids_by_domain_id(self, domain_id): query_parameters['domainId'] = self._serialize.query('domain_id', domain_id, 'str') response = self._send(http_method='GET', location_id='28010c54-d0c0-4c89-a5b0-1c9e188b9fb7', - version='7.0', + version='7.2-preview.1', query_parameters=query_parameters) return self._deserialize('[str]', self._unwrap_collection(response)) def read_identities(self, descriptors=None, identity_ids=None, subject_descriptors=None, social_descriptors=None, search_filter=None, filter_value=None, query_membership=None, properties=None, include_restricted_visibility=None, options=None): """ReadIdentities. - Resolve legacy identity information for use with older APIs such as the Security APIs + [Preview API] Resolve legacy identity information for use with older APIs such as the Security APIs :param str descriptors: A comma separated list of identity descriptors to resolve :param str identity_ids: A comma seperated list of storage keys to resolve :param str subject_descriptors: A comma seperated list of subject descriptors to resolve @@ -183,12 +188,13 @@ def read_identities(self, descriptors=None, identity_ids=None, subject_descripto query_parameters['options'] = self._serialize.query('options', options, 'str') response = self._send(http_method='GET', location_id='28010c54-d0c0-4c89-a5b0-1c9e188b9fb7', - version='7.0', + version='7.2-preview.1', query_parameters=query_parameters) return self._deserialize('[Identity]', self._unwrap_collection(response)) def read_identities_by_scope(self, scope_id, query_membership=None, properties=None): """ReadIdentitiesByScope. + [Preview API] :param str scope_id: :param str query_membership: :param str properties: @@ -203,16 +209,17 @@ def read_identities_by_scope(self, scope_id, query_membership=None, properties=N query_parameters['properties'] = self._serialize.query('properties', properties, 'str') response = self._send(http_method='GET', location_id='28010c54-d0c0-4c89-a5b0-1c9e188b9fb7', - version='7.0', + version='7.2-preview.1', query_parameters=query_parameters) return self._deserialize('[Identity]', self._unwrap_collection(response)) def read_identity(self, identity_id, query_membership=None, properties=None): """ReadIdentity. + [Preview API] :param str identity_id: :param str query_membership: :param str properties: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if identity_id is not None: @@ -224,14 +231,15 @@ def read_identity(self, identity_id, query_membership=None, properties=None): query_parameters['properties'] = self._serialize.query('properties', properties, 'str') response = self._send(http_method='GET', location_id='28010c54-d0c0-4c89-a5b0-1c9e188b9fb7', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('Identity', response) def update_identities(self, identities, allow_meta_data_update=None): """UpdateIdentities. - :param :class:` ` identities: + [Preview API] + :param :class:` ` identities: :param bool allow_meta_data_update: :rtype: [IdentityUpdateData] """ @@ -241,14 +249,15 @@ def update_identities(self, identities, allow_meta_data_update=None): content = self._serialize.body(identities, 'VssJsonCollectionWrapper') response = self._send(http_method='PUT', location_id='28010c54-d0c0-4c89-a5b0-1c9e188b9fb7', - version='7.0', + version='7.2-preview.1', query_parameters=query_parameters, content=content) return self._deserialize('[IdentityUpdateData]', self._unwrap_collection(response)) def update_identity(self, identity, identity_id): """UpdateIdentity. - :param :class:` ` identity: + [Preview API] + :param :class:` ` identity: :param str identity_id: """ route_values = {} @@ -257,32 +266,33 @@ def update_identity(self, identity, identity_id): content = self._serialize.body(identity, 'Identity') self._send(http_method='PUT', location_id='28010c54-d0c0-4c89-a5b0-1c9e188b9fb7', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) def create_identity(self, framework_identity_info): """CreateIdentity. - :param :class:` ` framework_identity_info: - :rtype: :class:` ` + [Preview API] + :param :class:` ` framework_identity_info: + :rtype: :class:` ` """ content = self._serialize.body(framework_identity_info, 'FrameworkIdentityInfo') response = self._send(http_method='PUT', location_id='dd55f0eb-6ea2-4fe4-9ebe-919e7dd1dfb4', - version='7.0', + version='7.2-preview.1', content=content) return self._deserialize('Identity', response) def read_identity_batch(self, batch_info): """ReadIdentityBatch. [Preview API] - :param :class:` ` batch_info: + :param :class:` ` batch_info: :rtype: [Identity] """ content = self._serialize.body(batch_info, 'IdentityBatchInfo') response = self._send(http_method='POST', location_id='299e50df-fe45-4d3a-8b5b-a5836fac74dc', - version='7.0-preview.1', + version='7.2-preview.1', content=content) return self._deserialize('[Identity]', self._unwrap_collection(response)) @@ -290,35 +300,35 @@ def get_identity_snapshot(self, scope_id): """GetIdentitySnapshot. [Preview API] :param str scope_id: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if scope_id is not None: route_values['scopeId'] = self._serialize.url('scope_id', scope_id, 'str') response = self._send(http_method='GET', location_id='d56223df-8ccd-45c9-89b4-eddf692400d7', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) return self._deserialize('IdentitySnapshot', response) def get_max_sequence_id(self): """GetMaxSequenceId. - Read the max sequence id of all the identities. + [Preview API] Read the max sequence id of all the identities. :rtype: long """ response = self._send(http_method='GET', location_id='e4a70778-cb2c-4e85-b7cc-3f3c7ae2d408', - version='7.0') + version='7.2-preview.1') return self._deserialize('long', response) def get_self(self): """GetSelf. - Read identity of the home tenant request user. - :rtype: :class:` ` + [Preview API] Read identity of the home tenant request user. + :rtype: :class:` ` """ response = self._send(http_method='GET', location_id='4bb02b5b-c120-4be2-b68e-21f7c50a4b82', - version='7.0') + version='7.2-preview.1') return self._deserialize('IdentitySelf', response) def add_member(self, container_id, member_id): @@ -335,7 +345,7 @@ def add_member(self, container_id, member_id): route_values['memberId'] = self._serialize.url('member_id', member_id, 'str') response = self._send(http_method='PUT', location_id='8ba35978-138e-41f8-8963-7b1ea2c5f775', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) return self._deserialize('bool', response) @@ -357,7 +367,7 @@ def force_remove_member(self, container_id, member_id, force_remove): query_parameters['forceRemove'] = self._serialize.query('force_remove', force_remove, 'bool') response = self._send(http_method='DELETE', location_id='8ba35978-138e-41f8-8963-7b1ea2c5f775', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('bool', response) @@ -368,7 +378,7 @@ def read_member(self, container_id, member_id, query_membership=None): :param str container_id: :param str member_id: :param str query_membership: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if container_id is not None: @@ -380,7 +390,7 @@ def read_member(self, container_id, member_id, query_membership=None): query_parameters['queryMembership'] = self._serialize.query('query_membership', query_membership, 'str') response = self._send(http_method='GET', location_id='8ba35978-138e-41f8-8963-7b1ea2c5f775', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('str', response) @@ -400,7 +410,7 @@ def read_members(self, container_id, query_membership=None): query_parameters['queryMembership'] = self._serialize.query('query_membership', query_membership, 'str') response = self._send(http_method='GET', location_id='8ba35978-138e-41f8-8963-7b1ea2c5f775', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[str]', self._unwrap_collection(response)) @@ -419,7 +429,7 @@ def remove_member(self, container_id, member_id): route_values['memberId'] = self._serialize.url('member_id', member_id, 'str') response = self._send(http_method='DELETE', location_id='8ba35978-138e-41f8-8963-7b1ea2c5f775', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) return self._deserialize('bool', response) @@ -429,7 +439,7 @@ def read_member_of(self, member_id, container_id, query_membership=None): :param str member_id: :param str container_id: :param str query_membership: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if member_id is not None: @@ -441,7 +451,7 @@ def read_member_of(self, member_id, container_id, query_membership=None): query_parameters['queryMembership'] = self._serialize.query('query_membership', query_membership, 'str') response = self._send(http_method='GET', location_id='22865b02-9e4a-479e-9e18-e35b8803b8a0', - version='7.0-preview.2', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters) return self._deserialize('str', response) @@ -461,7 +471,7 @@ def read_members_of(self, member_id, query_membership=None): query_parameters['queryMembership'] = self._serialize.query('query_membership', query_membership, 'str') response = self._send(http_method='GET', location_id='22865b02-9e4a-479e-9e18-e35b8803b8a0', - version='7.0-preview.2', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[str]', self._unwrap_collection(response)) @@ -481,7 +491,7 @@ def refresh_members_of(self, member_id, query_membership=None): query_parameters['queryMembership'] = self._serialize.query('query_membership', query_membership, 'str') response = self._send(http_method='POST', location_id='22865b02-9e4a-479e-9e18-e35b8803b8a0', - version='7.0-preview.2', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[str]', self._unwrap_collection(response)) @@ -489,9 +499,9 @@ def refresh_members_of(self, member_id, query_membership=None): def create_scope(self, info, scope_id): """CreateScope. [Preview API] - :param :class:` ` info: + :param :class:` ` info: :param str scope_id: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if scope_id is not None: @@ -499,7 +509,7 @@ def create_scope(self, info, scope_id): content = self._serialize.body(info, 'CreateScopeInfo') response = self._send(http_method='PUT', location_id='4e11e2bf-1e79-4eb5-8f34-a6337bd0de38', - version='7.0-preview.2', + version='7.2-preview.2', route_values=route_values, content=content) return self._deserialize('IdentityScope', response) @@ -514,21 +524,21 @@ def delete_scope(self, scope_id): route_values['scopeId'] = self._serialize.url('scope_id', scope_id, 'str') self._send(http_method='DELETE', location_id='4e11e2bf-1e79-4eb5-8f34-a6337bd0de38', - version='7.0-preview.2', + version='7.2-preview.2', route_values=route_values) def get_scope_by_id(self, scope_id): """GetScopeById. [Preview API] :param str scope_id: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if scope_id is not None: route_values['scopeId'] = self._serialize.url('scope_id', scope_id, 'str') response = self._send(http_method='GET', location_id='4e11e2bf-1e79-4eb5-8f34-a6337bd0de38', - version='7.0-preview.2', + version='7.2-preview.2', route_values=route_values) return self._deserialize('IdentityScope', response) @@ -536,21 +546,21 @@ def get_scope_by_name(self, scope_name): """GetScopeByName. [Preview API] :param str scope_name: - :rtype: :class:` ` + :rtype: :class:` ` """ query_parameters = {} if scope_name is not None: query_parameters['scopeName'] = self._serialize.query('scope_name', scope_name, 'str') response = self._send(http_method='GET', location_id='4e11e2bf-1e79-4eb5-8f34-a6337bd0de38', - version='7.0-preview.2', + version='7.2-preview.2', query_parameters=query_parameters) return self._deserialize('IdentityScope', response) def update_scope(self, patch_document, scope_id): """UpdateScope. [Preview API] - :param :class:`<[JsonPatchOperation]> ` patch_document: + :param :class:`<[JsonPatchOperation]> ` patch_document: :param str scope_id: """ route_values = {} @@ -559,7 +569,7 @@ def update_scope(self, patch_document, scope_id): content = self._serialize.body(patch_document, '[JsonPatchOperation]') self._send(http_method='PATCH', location_id='4e11e2bf-1e79-4eb5-8f34-a6337bd0de38', - version='7.0-preview.2', + version='7.2-preview.2', route_values=route_values, content=content, media_type='application/json-patch+json') @@ -567,35 +577,35 @@ def update_scope(self, patch_document, scope_id): def get_signed_in_token(self): """GetSignedInToken. [Preview API] - :rtype: :class:` ` + :rtype: :class:` ` """ response = self._send(http_method='GET', location_id='6074ff18-aaad-4abb-a41e-5c75f6178057', - version='7.0-preview.1') + version='7.2-preview.1') return self._deserialize('AccessTokenResult', response) def get_signout_token(self): """GetSignoutToken. [Preview API] - :rtype: :class:` ` + :rtype: :class:` ` """ response = self._send(http_method='GET', location_id='be39e83c-7529-45e9-9c67-0410885880da', - version='7.0-preview.1') + version='7.2-preview.1') return self._deserialize('AccessTokenResult', response) def get_tenant(self, tenant_id): """GetTenant. [Preview API] :param str tenant_id: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if tenant_id is not None: route_values['tenantId'] = self._serialize.url('tenant_id', tenant_id, 'str') response = self._send(http_method='GET', location_id='5f0a1723-2e2c-4c31-8cae-002d01bdd592', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) return self._deserialize('TenantInfo', response) diff --git a/azure-devops/azure/devops/v7_0/identity/models.py b/azure-devops/azure/devops/v7_2/identity/models.py similarity index 94% rename from azure-devops/azure/devops/v7_0/identity/models.py rename to azure-devops/azure/devops/v7_2/identity/models.py index 2c3926af..97c034c8 100644 --- a/azure-devops/azure/devops/v7_0/identity/models.py +++ b/azure-devops/azure/devops/v7_2/identity/models.py @@ -12,7 +12,7 @@ class AccessTokenResult(Model): """ :param access_token: - :type access_token: :class:`JsonWebToken ` + :type access_token: :class:`JsonWebToken ` :param access_token_error: :type access_token_error: object :param authorization_id: @@ -24,7 +24,7 @@ class AccessTokenResult(Model): :param is_first_party_client: :type is_first_party_client: bool :param refresh_token: - :type refresh_token: :class:`RefreshTokenGrant ` + :type refresh_token: :class:`RefreshTokenGrant ` :param scope: :type scope: str :param token_type: @@ -75,6 +75,60 @@ def __init__(self, grant_type=None): self.grant_type = grant_type +class ChangedIdentities(Model): + """ + Container class for changed identities + + :param identities: Changed Identities + :type identities: list of :class:`Identity ` + :param more_data: More data available, set to true if pagesize is specified. + :type more_data: bool + :param sequence_context: Last Identity SequenceId + :type sequence_context: :class:`ChangedIdentitiesContext ` + """ + + _attribute_map = { + 'identities': {'key': 'identities', 'type': '[Identity]'}, + 'more_data': {'key': 'moreData', 'type': 'bool'}, + 'sequence_context': {'key': 'sequenceContext', 'type': 'ChangedIdentitiesContext'} + } + + def __init__(self, identities=None, more_data=None, sequence_context=None): + super(ChangedIdentities, self).__init__() + self.identities = identities + self.more_data = more_data + self.sequence_context = sequence_context + + +class ChangedIdentitiesContext(Model): + """ + Context class for changed identities + + :param group_sequence_id: Last Group SequenceId + :type group_sequence_id: int + :param identity_sequence_id: Last Identity SequenceId + :type identity_sequence_id: int + :param organization_identity_sequence_id: Last Group OrganizationIdentitySequenceId + :type organization_identity_sequence_id: int + :param page_size: Page size + :type page_size: int + """ + + _attribute_map = { + 'group_sequence_id': {'key': 'groupSequenceId', 'type': 'int'}, + 'identity_sequence_id': {'key': 'identitySequenceId', 'type': 'int'}, + 'organization_identity_sequence_id': {'key': 'organizationIdentitySequenceId', 'type': 'int'}, + 'page_size': {'key': 'pageSize', 'type': 'int'} + } + + def __init__(self, group_sequence_id=None, identity_sequence_id=None, organization_identity_sequence_id=None, page_size=None): + super(ChangedIdentitiesContext, self).__init__() + self.group_sequence_id = group_sequence_id + self.identity_sequence_id = identity_sequence_id + self.organization_identity_sequence_id = organization_identity_sequence_id + self.page_size = page_size + + class CreateScopeInfo(Model): """ :param admin_group_description: @@ -142,7 +196,7 @@ class GroupMembership(Model): :param active: :type active: bool :param descriptor: - :type descriptor: :class:`str ` + :type descriptor: :class:`str ` :param id: :type id: str :param queried_id: @@ -164,60 +218,6 @@ def __init__(self, active=None, descriptor=None, id=None, queried_id=None): self.queried_id = queried_id -class ChangedIdentities(Model): - """ - Container class for changed identities - - :param identities: Changed Identities - :type identities: list of :class:`Identity ` - :param more_data: More data available, set to true if pagesize is specified. - :type more_data: bool - :param sequence_context: Last Identity SequenceId - :type sequence_context: :class:`ChangedIdentitiesContext ` - """ - - _attribute_map = { - 'identities': {'key': 'identities', 'type': '[Identity]'}, - 'more_data': {'key': 'moreData', 'type': 'bool'}, - 'sequence_context': {'key': 'sequenceContext', 'type': 'ChangedIdentitiesContext'} - } - - def __init__(self, identities=None, more_data=None, sequence_context=None): - super(ChangedIdentities, self).__init__() - self.identities = identities - self.more_data = more_data - self.sequence_context = sequence_context - - -class ChangedIdentitiesContext(Model): - """ - Context class for changed identities - - :param group_sequence_id: Last Group SequenceId - :type group_sequence_id: int - :param identity_sequence_id: Last Identity SequenceId - :type identity_sequence_id: int - :param organization_identity_sequence_id: Last Group OrganizationIdentitySequenceId - :type organization_identity_sequence_id: int - :param page_size: Page size - :type page_size: int - """ - - _attribute_map = { - 'group_sequence_id': {'key': 'groupSequenceId', 'type': 'int'}, - 'identity_sequence_id': {'key': 'identitySequenceId', 'type': 'int'}, - 'organization_identity_sequence_id': {'key': 'organizationIdentitySequenceId', 'type': 'int'}, - 'page_size': {'key': 'pageSize', 'type': 'int'} - } - - def __init__(self, group_sequence_id=None, identity_sequence_id=None, organization_identity_sequence_id=None, page_size=None): - super(ChangedIdentitiesContext, self).__init__() - self.group_sequence_id = group_sequence_id - self.identity_sequence_id = identity_sequence_id - self.organization_identity_sequence_id = organization_identity_sequence_id - self.page_size = page_size - - class IdentityBase(Model): """ Base Identity class to allow "trimmed" identity class in the GetConnectionData API Makes sure that on-the-wire representations of the derived classes are compatible with each other (e.g. Server responds with PublicIdentity object while client deserializes it as Identity object) Derived classes should not have additional [DataMember] properties @@ -225,7 +225,7 @@ class IdentityBase(Model): :param custom_display_name: The custom display name for the identity (if any). Setting this property to an empty string will clear the existing custom display name. Setting this property to null will not affect the existing persisted value (since null values do not get sent over the wire or to the database) :type custom_display_name: str :param descriptor: - :type descriptor: :class:`str ` + :type descriptor: :class:`str ` :param id: Identity Identifier. Also called Storage Key, or VSID :type id: str :param is_active: True if the identity has a membership in any Azure Devops group in the organization. @@ -237,21 +237,21 @@ class IdentityBase(Model): :param member_ids: Id of the members of the identity (groups only). :type member_ids: list of str :param member_of: - :type member_of: list of :class:`str ` + :type member_of: list of :class:`str ` :param members: - :type members: list of :class:`str ` + :type members: list of :class:`str ` :param meta_type_id: :type meta_type_id: int :param properties: - :type properties: :class:`object ` + :type properties: :class:`object ` :param provider_display_name: The display name for the identity as specified by the source identity provider. :type provider_display_name: str :param resource_version: :type resource_version: int :param social_descriptor: - :type social_descriptor: :class:`str ` + :type social_descriptor: :class:`str ` :param subject_descriptor: Subject descriptor of a Graph entity. - :type subject_descriptor: :class:`str ` + :type subject_descriptor: :class:`str ` :param unique_user_id: :type unique_user_id: int """ @@ -298,7 +298,7 @@ def __init__(self, custom_display_name=None, descriptor=None, id=None, is_active class IdentityBatchInfo(Model): """ :param descriptors: - :type descriptors: list of :class:`str ` + :type descriptors: list of :class:`str ` :param identity_ids: :type identity_ids: list of str :param include_restricted_visibility: @@ -308,9 +308,9 @@ class IdentityBatchInfo(Model): :param query_membership: :type query_membership: object :param social_descriptors: - :type social_descriptors: list of :class:`str ` + :type social_descriptors: list of :class:`str ` :param subject_descriptors: - :type subject_descriptors: list of :class:`str ` + :type subject_descriptors: list of :class:`str ` """ _attribute_map = { @@ -352,7 +352,7 @@ def __init__(self, user_principal_name_mappings=None): class IdentityScope(Model): """ :param administrators: - :type administrators: :class:`str ` + :type administrators: :class:`str ` :param id: :type id: str :param is_active: @@ -370,7 +370,7 @@ class IdentityScope(Model): :param securing_host_id: :type securing_host_id: str :param subject_descriptor: - :type subject_descriptor: :class:`str ` + :type subject_descriptor: :class:`str ` """ _attribute_map = { @@ -417,7 +417,7 @@ class IdentitySelf(Model): :param origin_id: The unique identifier from the system of origin. If there are multiple tenants this is the unique identifier of the account in the home tenant. (For MSA this is the PUID in hex notation, for AAD this is the object id.) :type origin_id: str :param tenants: For AAD accounts this is all of the tenants that this account is a member of. - :type tenants: list of :class:`TenantInfo ` + :type tenants: list of :class:`TenantInfo ` """ _attribute_map = { @@ -444,15 +444,15 @@ def __init__(self, account_name=None, display_name=None, domain=None, id=None, o class IdentitySnapshot(Model): """ :param groups: - :type groups: list of :class:`Identity ` + :type groups: list of :class:`Identity ` :param identity_ids: :type identity_ids: list of str :param memberships: - :type memberships: list of :class:`GroupMembership ` + :type memberships: list of :class:`GroupMembership ` :param scope_id: :type scope_id: str :param scopes: - :type scopes: list of :class:`IdentityScope ` + :type scopes: list of :class:`IdentityScope ` """ _attribute_map = { @@ -540,7 +540,7 @@ class PagedIdentities(Model): :param continuation_token: :type continuation_token: list of str :param identities: - :type identities: list of :class:`Identity ` + :type identities: list of :class:`Identity ` """ _attribute_map = { @@ -559,7 +559,7 @@ class RefreshTokenGrant(AuthorizationGrant): :param grant_type: :type grant_type: object :param jwt: - :type jwt: :class:`JsonWebToken ` + :type jwt: :class:`JsonWebToken ` """ _attribute_map = { @@ -623,7 +623,7 @@ class Identity(IdentityBase): :param custom_display_name: The custom display name for the identity (if any). Setting this property to an empty string will clear the existing custom display name. Setting this property to null will not affect the existing persisted value (since null values do not get sent over the wire or to the database) :type custom_display_name: str :param descriptor: - :type descriptor: :class:`str ` + :type descriptor: :class:`str ` :param id: Identity Identifier. Also called Storage Key, or VSID :type id: str :param is_active: True if the identity has a membership in any Azure Devops group in the organization. @@ -635,21 +635,21 @@ class Identity(IdentityBase): :param member_ids: Id of the members of the identity (groups only). :type member_ids: list of str :param member_of: - :type member_of: list of :class:`str ` + :type member_of: list of :class:`str ` :param members: - :type members: list of :class:`str ` + :type members: list of :class:`str ` :param meta_type_id: :type meta_type_id: int :param properties: - :type properties: :class:`object ` + :type properties: :class:`object ` :param provider_display_name: The display name for the identity as specified by the source identity provider. :type provider_display_name: str :param resource_version: :type resource_version: int :param social_descriptor: - :type social_descriptor: :class:`str ` + :type social_descriptor: :class:`str ` :param subject_descriptor: Subject descriptor of a Graph entity. - :type subject_descriptor: :class:`str ` + :type subject_descriptor: :class:`str ` :param unique_user_id: :type unique_user_id: int """ @@ -680,11 +680,11 @@ def __init__(self, custom_display_name=None, descriptor=None, id=None, is_active __all__ = [ 'AccessTokenResult', 'AuthorizationGrant', + 'ChangedIdentities', + 'ChangedIdentitiesContext', 'CreateScopeInfo', 'FrameworkIdentityInfo', 'GroupMembership', - 'ChangedIdentities', - 'ChangedIdentitiesContext', 'IdentityBase', 'IdentityBatchInfo', 'IdentityRightsTransferData', diff --git a/azure-devops/azure/devops/v7_0/location/__init__.py b/azure-devops/azure/devops/v7_2/location/__init__.py similarity index 100% rename from azure-devops/azure/devops/v7_0/location/__init__.py rename to azure-devops/azure/devops/v7_2/location/__init__.py diff --git a/azure-devops/azure/devops/v7_0/location/location_client.py b/azure-devops/azure/devops/v7_2/location/location_client.py similarity index 91% rename from azure-devops/azure/devops/v7_0/location/location_client.py rename to azure-devops/azure/devops/v7_2/location/location_client.py index 053e0087..875eaeb5 100644 --- a/azure-devops/azure/devops/v7_0/location/location_client.py +++ b/azure-devops/azure/devops/v7_2/location/location_client.py @@ -31,7 +31,7 @@ def get_connection_data(self, connect_options=None, last_change_id=None, last_ch :param str connect_options: :param int last_change_id: Obsolete 32-bit LastChangeId :param long last_change_id64: Non-truncated 64-bit LastChangeId - :rtype: :class:` ` + :rtype: :class:` ` """ query_parameters = {} if connect_options is not None: @@ -42,7 +42,7 @@ def get_connection_data(self, connect_options=None, last_change_id=None, last_ch query_parameters['lastChangeId64'] = self._serialize.query('last_change_id64', last_change_id64, 'long') response = self._send(http_method='GET', location_id='00d9565f-ed9c-4a06-9a50-00e7896ccab4', - version='7.0-preview.1', + version='7.2-preview.1', query_parameters=query_parameters) return self._deserialize('ConnectionData', response) @@ -52,7 +52,7 @@ def get_resource_area(self, area_id, enterprise_name=None, organization_name=Non :param str area_id: :param str enterprise_name: :param str organization_name: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if area_id is not None: @@ -64,7 +64,7 @@ def get_resource_area(self, area_id, enterprise_name=None, organization_name=Non query_parameters['organizationName'] = self._serialize.query('organization_name', organization_name, 'str') response = self._send(http_method='GET', location_id='e81700f7-3be2-46de-8624-2eb35882fcaa', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('ResourceAreaInfo', response) @@ -74,7 +74,7 @@ def get_resource_area_by_host(self, area_id, host_id): [Preview API] :param str area_id: :param str host_id: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if area_id is not None: @@ -84,7 +84,7 @@ def get_resource_area_by_host(self, area_id, host_id): query_parameters['hostId'] = self._serialize.query('host_id', host_id, 'str') response = self._send(http_method='GET', location_id='e81700f7-3be2-46de-8624-2eb35882fcaa', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('ResourceAreaInfo', response) @@ -103,7 +103,7 @@ def get_resource_areas(self, enterprise_name=None, organization_name=None): query_parameters['organizationName'] = self._serialize.query('organization_name', organization_name, 'str') response = self._send(http_method='GET', location_id='e81700f7-3be2-46de-8624-2eb35882fcaa', - version='7.0-preview.1', + version='7.2-preview.1', query_parameters=query_parameters) return self._deserialize('[ResourceAreaInfo]', self._unwrap_collection(response)) @@ -118,7 +118,7 @@ def get_resource_areas_by_host(self, host_id): query_parameters['hostId'] = self._serialize.query('host_id', host_id, 'str') response = self._send(http_method='GET', location_id='e81700f7-3be2-46de-8624-2eb35882fcaa', - version='7.0-preview.1', + version='7.2-preview.1', query_parameters=query_parameters) return self._deserialize('[ResourceAreaInfo]', self._unwrap_collection(response)) @@ -135,7 +135,7 @@ def delete_service_definition(self, service_type, identifier): route_values['identifier'] = self._serialize.url('identifier', identifier, 'str') self._send(http_method='DELETE', location_id='d810a47d-f4f4-4a62-a03f-fa1860585c4c', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) def get_service_definition(self, service_type, identifier, allow_fault_in=None, preview_fault_in=None): @@ -145,7 +145,7 @@ def get_service_definition(self, service_type, identifier, allow_fault_in=None, :param str identifier: :param bool allow_fault_in: If true, we will attempt to fault in a host instance mapping if in SPS. :param bool preview_fault_in: If true, we will calculate and return a host instance mapping, but not persist it. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if service_type is not None: @@ -159,7 +159,7 @@ def get_service_definition(self, service_type, identifier, allow_fault_in=None, query_parameters['previewFaultIn'] = self._serialize.query('preview_fault_in', preview_fault_in, 'bool') response = self._send(http_method='GET', location_id='d810a47d-f4f4-4a62-a03f-fa1860585c4c', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('ServiceDefinition', response) @@ -175,18 +175,18 @@ def get_service_definitions(self, service_type=None): route_values['serviceType'] = self._serialize.url('service_type', service_type, 'str') response = self._send(http_method='GET', location_id='d810a47d-f4f4-4a62-a03f-fa1860585c4c', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) return self._deserialize('[ServiceDefinition]', self._unwrap_collection(response)) def update_service_definitions(self, service_definitions): """UpdateServiceDefinitions. [Preview API] - :param :class:` ` service_definitions: + :param :class:` ` service_definitions: """ content = self._serialize.body(service_definitions, 'VssJsonCollectionWrapper') self._send(http_method='PATCH', location_id='d810a47d-f4f4-4a62-a03f-fa1860585c4c', - version='7.0-preview.1', + version='7.2-preview.1', content=content) diff --git a/azure-devops/azure/devops/v7_0/location/models.py b/azure-devops/azure/devops/v7_2/location/models.py similarity index 94% rename from azure-devops/azure/devops/v7_0/location/models.py rename to azure-devops/azure/devops/v7_2/location/models.py index aadbe408..7849186d 100644 --- a/azure-devops/azure/devops/v7_0/location/models.py +++ b/azure-devops/azure/devops/v7_2/location/models.py @@ -45,9 +45,9 @@ class ConnectionData(Model): Data transfer class that holds information needed to set up a connection with a VSS server. :param authenticated_user: The Id of the authenticated user who made this request. More information about the user can be obtained by passing this Id to the Identity service - :type authenticated_user: :class:`Identity ` + :type authenticated_user: :class:`Identity ` :param authorized_user: The Id of the authorized user who made this request. More information about the user can be obtained by passing this Id to the Identity service - :type authorized_user: :class:`Identity ` + :type authorized_user: :class:`Identity ` :param deployment_id: The id for the server. :type deployment_id: str :param deployment_type: The type for the server Hosted/OnPremises. @@ -57,7 +57,7 @@ class ConnectionData(Model): :param last_user_access: The last user access for this instance. Null if not requested specifically. :type last_user_access: datetime :param location_service_data: Data that the location service holds. - :type location_service_data: :class:`LocationServiceData ` + :type location_service_data: :class:`LocationServiceData ` :param web_application_relative_directory: The virtual directory of the host we are talking to. :type web_application_relative_directory: str """ @@ -92,7 +92,7 @@ class IdentityBase(Model): :param custom_display_name: The custom display name for the identity (if any). Setting this property to an empty string will clear the existing custom display name. Setting this property to null will not affect the existing persisted value (since null values do not get sent over the wire or to the database) :type custom_display_name: str :param descriptor: - :type descriptor: :class:`str ` + :type descriptor: :class:`str ` :param id: Identity Identifier. Also called Storage Key, or VSID :type id: str :param is_active: True if the identity has a membership in any Azure Devops group in the organization. @@ -104,21 +104,21 @@ class IdentityBase(Model): :param member_ids: Id of the members of the identity (groups only). :type member_ids: list of str :param member_of: - :type member_of: list of :class:`str ` + :type member_of: list of :class:`str ` :param members: - :type members: list of :class:`str ` + :type members: list of :class:`str ` :param meta_type_id: :type meta_type_id: int :param properties: - :type properties: :class:`object ` + :type properties: :class:`object ` :param provider_display_name: The display name for the identity as specified by the source identity provider. :type provider_display_name: str :param resource_version: :type resource_version: int :param social_descriptor: - :type social_descriptor: :class:`str ` + :type social_descriptor: :class:`str ` :param subject_descriptor: Subject descriptor of a Graph entity. - :type subject_descriptor: :class:`str ` + :type subject_descriptor: :class:`str ` :param unique_user_id: :type unique_user_id: int """ @@ -186,7 +186,7 @@ class LocationServiceData(Model): Data transfer class used to transfer data about the location service data over the web service. :param access_mappings: Data about the access mappings contained by this location service. - :type access_mappings: list of :class:`AccessMapping ` + :type access_mappings: list of :class:`AccessMapping ` :param client_cache_fresh: Data that the location service holds. :type client_cache_fresh: bool :param client_cache_time_to_live: The time to live on the location service cache. @@ -198,7 +198,7 @@ class LocationServiceData(Model): :param last_change_id64: The non-truncated 64-bit id for the last change that took place on the server. :type last_change_id64: long :param service_definitions: Data about the service definitions contained by this location service. - :type service_definitions: list of :class:`ServiceDefinition ` + :type service_definitions: list of :class:`ServiceDefinition ` :param service_owner: The identifier of the deployment which is hosting this location data (e.g. SPS, TFS, ELS, Napa, etc.) :type service_owner: str """ @@ -260,7 +260,7 @@ class ServiceDefinition(Model): :param inherit_level: :type inherit_level: object :param location_mappings: - :type location_mappings: list of :class:`LocationMapping ` + :type location_mappings: list of :class:`LocationMapping ` :param max_version: Maximum api version that this resource supports (current server version for this resource). Copied from ApiResourceLocation. :type max_version: str :param min_version: Minimum api version that this resource supports. Copied from ApiResourceLocation. @@ -270,7 +270,7 @@ class ServiceDefinition(Model): :param parent_service_type: :type parent_service_type: str :param properties: - :type properties: :class:`object ` + :type properties: :class:`object ` :param relative_path: :type relative_path: str :param relative_to_setting: @@ -337,7 +337,7 @@ class Identity(IdentityBase): :param custom_display_name: The custom display name for the identity (if any). Setting this property to an empty string will clear the existing custom display name. Setting this property to null will not affect the existing persisted value (since null values do not get sent over the wire or to the database) :type custom_display_name: str :param descriptor: - :type descriptor: :class:`str ` + :type descriptor: :class:`str ` :param id: Identity Identifier. Also called Storage Key, or VSID :type id: str :param is_active: True if the identity has a membership in any Azure Devops group in the organization. @@ -349,21 +349,21 @@ class Identity(IdentityBase): :param member_ids: Id of the members of the identity (groups only). :type member_ids: list of str :param member_of: - :type member_of: list of :class:`str ` + :type member_of: list of :class:`str ` :param members: - :type members: list of :class:`str ` + :type members: list of :class:`str ` :param meta_type_id: :type meta_type_id: int :param properties: - :type properties: :class:`object ` + :type properties: :class:`object ` :param provider_display_name: The display name for the identity as specified by the source identity provider. :type provider_display_name: str :param resource_version: :type resource_version: int :param social_descriptor: - :type social_descriptor: :class:`str ` + :type social_descriptor: :class:`str ` :param subject_descriptor: Subject descriptor of a Graph entity. - :type subject_descriptor: :class:`str ` + :type subject_descriptor: :class:`str ` :param unique_user_id: :type unique_user_id: int """ diff --git a/azure-devops/azure/devops/v7_0/maven/__init__.py b/azure-devops/azure/devops/v7_2/maven/__init__.py similarity index 100% rename from azure-devops/azure/devops/v7_0/maven/__init__.py rename to azure-devops/azure/devops/v7_2/maven/__init__.py diff --git a/azure-devops/azure/devops/v7_0/maven/maven_client.py b/azure-devops/azure/devops/v7_2/maven/maven_client.py similarity index 94% rename from azure-devops/azure/devops/v7_0/maven/maven_client.py rename to azure-devops/azure/devops/v7_2/maven/maven_client.py index 451285b6..f2f507a2 100644 --- a/azure-devops/azure/devops/v7_0/maven/maven_client.py +++ b/azure-devops/azure/devops/v7_2/maven/maven_client.py @@ -51,7 +51,7 @@ def download_package(self, feed_id, group_id, artifact_id, version, file_name, p route_values['fileName'] = self._serialize.url('file_name', file_name, 'str') response = self._send(http_method='GET', location_id='c338d4b5-d30a-47e2-95b7-f157ef558833', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, accept_media_type='application/octet-stream') if "callback" in kwargs: @@ -63,7 +63,7 @@ def download_package(self, feed_id, group_id, artifact_id, version, file_name, p def update_package_versions(self, batch_request, feed_id, project=None): """UpdatePackageVersions. [Preview API] Update several packages from a single feed in a single request. The updates to the packages do not happen atomically. - :param :class:` ` batch_request: Information about the packages to update, the operation to perform, and its associated data. + :param :class:` ` batch_request: Information about the packages to update, the operation to perform, and its associated data. :param str feed_id: Feed which contains the packages to update. :param str project: Project ID or project name """ @@ -75,14 +75,14 @@ def update_package_versions(self, batch_request, feed_id, project=None): content = self._serialize.body(batch_request, 'MavenPackagesBatchRequest') self._send(http_method='POST', location_id='b7c586b0-d947-4d35-811a-f1161de80e6c', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, content=content) def update_recycle_bin_packages(self, batch_request, feed, project=None): """UpdateRecycleBinPackages. [Preview API] Delete or restore several package versions from the recycle bin. - :param :class:` ` batch_request: Information about the packages to update, the operation to perform, and its associated data. + :param :class:` ` batch_request: Information about the packages to update, the operation to perform, and its associated data. :param str feed: :param str project: Project ID or project name """ @@ -94,7 +94,7 @@ def update_recycle_bin_packages(self, batch_request, feed, project=None): content = self._serialize.body(batch_request, 'MavenPackagesBatchRequest') self._send(http_method='POST', location_id='5dd6f547-c76f-4d9d-b2ec-4720feda641f', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, content=content) @@ -120,7 +120,7 @@ def delete_package_version_from_recycle_bin(self, feed, group_id, artifact_id, v route_values['version'] = self._serialize.url('version', version, 'str') self._send(http_method='DELETE', location_id='f67e10eb-1254-4953-add7-d49b83a16c9f', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) def get_package_version_metadata_from_recycle_bin(self, feed, group_id, artifact_id, version, project=None): @@ -131,7 +131,7 @@ def get_package_version_metadata_from_recycle_bin(self, feed, group_id, artifact :param str artifact_id: Artifact ID of the package. :param str version: Version of the package. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -146,14 +146,14 @@ def get_package_version_metadata_from_recycle_bin(self, feed, group_id, artifact route_values['version'] = self._serialize.url('version', version, 'str') response = self._send(http_method='GET', location_id='f67e10eb-1254-4953-add7-d49b83a16c9f', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) return self._deserialize('MavenPackageVersionDeletionState', response) def restore_package_version_from_recycle_bin(self, package_version_details, feed, group_id, artifact_id, version, project=None): """RestorePackageVersionFromRecycleBin. [Preview API] Restore a package version from the recycle bin to its associated feed. - :param :class:` ` package_version_details: Set the 'Deleted' property to false to restore the package. + :param :class:` ` package_version_details: Set the 'Deleted' property to false to restore the package. :param str feed: Name or ID of the feed. :param str group_id: Group ID of the package. :param str artifact_id: Artifact ID of the package. @@ -174,7 +174,7 @@ def restore_package_version_from_recycle_bin(self, package_version_details, feed content = self._serialize.body(package_version_details, 'MavenRecycleBinPackageVersionDetails') self._send(http_method='PATCH', location_id='f67e10eb-1254-4953-add7-d49b83a16c9f', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, content=content) @@ -185,7 +185,7 @@ def get_upstreaming_behavior(self, feed, group_id, artifact_id, project=None): :param str group_id: The group id of the package :param str artifact_id: The artifact id of the package :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -198,7 +198,7 @@ def get_upstreaming_behavior(self, feed, group_id, artifact_id, project=None): route_values['artifactId'] = self._serialize.url('artifact_id', artifact_id, 'str') response = self._send(http_method='GET', location_id='fba7ba8c-d1f5-4aeb-8f5d-f017a7d5e719', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) return self._deserialize('UpstreamingBehavior', response) @@ -208,7 +208,7 @@ def set_upstreaming_behavior(self, feed, group_id, artifact_id, behavior, projec :param str feed: The name or id of the feed :param str group_id: :param str artifact_id: - :param :class:` ` behavior: The behavior to apply to the package within the scope of the feed + :param :class:` ` behavior: The behavior to apply to the package within the scope of the feed :param str project: Project ID or project name """ route_values = {} @@ -223,7 +223,7 @@ def set_upstreaming_behavior(self, feed, group_id, artifact_id, behavior, projec content = self._serialize.body(behavior, 'UpstreamingBehavior') self._send(http_method='PATCH', location_id='fba7ba8c-d1f5-4aeb-8f5d-f017a7d5e719', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, content=content) @@ -236,7 +236,7 @@ def get_package_version(self, feed, group_id, artifact_id, version, project=None :param str version: Version of the package. :param str project: Project ID or project name :param bool show_deleted: True to show information for deleted packages. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -254,7 +254,7 @@ def get_package_version(self, feed, group_id, artifact_id, version, project=None query_parameters['showDeleted'] = self._serialize.query('show_deleted', show_deleted, 'bool') response = self._send(http_method='GET', location_id='180ed967-377a-4112-986b-607adb14ded4', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('Package', response) @@ -281,13 +281,13 @@ def package_delete(self, feed, group_id, artifact_id, version, project=None): route_values['version'] = self._serialize.url('version', version, 'str') self._send(http_method='DELETE', location_id='180ed967-377a-4112-986b-607adb14ded4', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) def update_package_version(self, package_version_details, feed, group_id, artifact_id, version, project=None): """UpdatePackageVersion. [Preview API] Update state for a package version. - :param :class:` ` package_version_details: Details to be updated. + :param :class:` ` package_version_details: Details to be updated. :param str feed: Name or ID of the feed. :param str group_id: Group ID of the package. :param str artifact_id: Artifact ID of the package. @@ -308,7 +308,7 @@ def update_package_version(self, package_version_details, feed, group_id, artifa content = self._serialize.body(package_version_details, 'PackageVersionDetails') self._send(http_method='PATCH', location_id='180ed967-377a-4112-986b-607adb14ded4', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, content=content) diff --git a/azure-devops/azure/devops/v7_0/maven/models.py b/azure-devops/azure/devops/v7_2/maven/models.py similarity index 94% rename from azure-devops/azure/devops/v7_0/maven/models.py rename to azure-devops/azure/devops/v7_2/maven/models.py index a8f42350..a3f91c9a 100644 --- a/azure-devops/azure/devops/v7_0/maven/models.py +++ b/azure-devops/azure/devops/v7_2/maven/models.py @@ -54,9 +54,9 @@ def __init__(self, from_=None, op=None, path=None, value=None): class MavenDistributionManagement(Model): """ :param repository: - :type repository: :class:`MavenRepository ` + :type repository: :class:`MavenRepository ` :param snapshot_repository: - :type snapshot_repository: :class:`MavenSnapshotRepository ` + :type snapshot_repository: :class:`MavenSnapshotRepository ` """ _attribute_map = { @@ -100,27 +100,27 @@ class MavenPackage(Model): :param artifact_id: :type artifact_id: str :param artifact_index: - :type artifact_index: :class:`ReferenceLink ` + :type artifact_index: :class:`ReferenceLink ` :param artifact_metadata: - :type artifact_metadata: :class:`ReferenceLink ` + :type artifact_metadata: :class:`ReferenceLink ` :param deleted_date: :type deleted_date: datetime :param files: - :type files: :class:`ReferenceLinks ` + :type files: :class:`ReferenceLinks ` :param group_id: :type group_id: str :param pom: - :type pom: :class:`MavenPomMetadata ` + :type pom: :class:`MavenPomMetadata ` :param requested_file: - :type requested_file: :class:`ReferenceLink ` + :type requested_file: :class:`ReferenceLink ` :param snapshot_metadata: - :type snapshot_metadata: :class:`ReferenceLink ` + :type snapshot_metadata: :class:`ReferenceLink ` :param version: :type version: str :param versions: - :type versions: :class:`ReferenceLinks ` + :type versions: :class:`ReferenceLinks ` :param versions_index: - :type versions_index: :class:`ReferenceLink ` + :type versions_index: :class:`ReferenceLink ` """ _attribute_map = { @@ -159,11 +159,11 @@ class MavenPackagesBatchRequest(Model): A batch of operations to apply to package versions. :param data: Data required to perform the operation. This is optional based on type of operation. Use BatchPromoteData if performing a promote operation. - :type data: :class:`BatchOperationData ` + :type data: :class:`BatchOperationData ` :param operation: Type of operation that needs to be performed on packages. :type operation: object :param packages: The packages onto which the operation will be performed. - :type packages: list of :class:`MavenMinimalPackageDetails ` + :type packages: list of :class:`MavenMinimalPackageDetails ` """ _attribute_map = { @@ -211,7 +211,7 @@ def __init__(self, artifact_id=None, deleted_date=None, group_id=None, version=N class MavenPomBuild(Model): """ :param plugins: - :type plugins: list of :class:`Plugin ` + :type plugins: list of :class:`Plugin ` """ _attribute_map = { @@ -226,7 +226,7 @@ def __init__(self, plugins=None): class MavenPomCi(Model): """ :param notifiers: - :type notifiers: list of :class:`MavenPomCiNotifier ` + :type notifiers: list of :class:`MavenPomCiNotifier ` :param system: :type system: str :param url: @@ -284,7 +284,7 @@ def __init__(self, configuration=None, send_on_error=None, send_on_failure=None, class MavenPomDependencyManagement(Model): """ :param dependencies: - :type dependencies: list of :class:`MavenPomDependency ` + :type dependencies: list of :class:`MavenPomDependency ` """ _attribute_map = { @@ -382,29 +382,29 @@ class MavenPomMetadata(MavenPomGav): :param version: :type version: str :param build: - :type build: :class:`MavenPomBuild ` + :type build: :class:`MavenPomBuild ` :param ci_management: - :type ci_management: :class:`MavenPomCi ` + :type ci_management: :class:`MavenPomCi ` :param contributors: - :type contributors: list of :class:`MavenPomPerson ` + :type contributors: list of :class:`MavenPomPerson ` :param dependencies: - :type dependencies: list of :class:`MavenPomDependency ` + :type dependencies: list of :class:`MavenPomDependency ` :param dependency_management: - :type dependency_management: :class:`MavenPomDependencyManagement ` + :type dependency_management: :class:`MavenPomDependencyManagement ` :param description: :type description: str :param developers: - :type developers: list of :class:`MavenPomPerson ` + :type developers: list of :class:`MavenPomPerson ` :param distribution_management: - :type distribution_management: :class:`MavenDistributionManagement ` + :type distribution_management: :class:`MavenDistributionManagement ` :param inception_year: :type inception_year: str :param issue_management: - :type issue_management: :class:`MavenPomIssueManagement ` + :type issue_management: :class:`MavenPomIssueManagement ` :param licenses: - :type licenses: list of :class:`MavenPomLicense ` + :type licenses: list of :class:`MavenPomLicense ` :param mailing_lists: - :type mailing_lists: list of :class:`MavenPomMailingList ` + :type mailing_lists: list of :class:`MavenPomMailingList ` :param model_version: :type model_version: str :param modules: @@ -412,17 +412,17 @@ class MavenPomMetadata(MavenPomGav): :param name: :type name: str :param organization: - :type organization: :class:`MavenPomOrganization ` + :type organization: :class:`MavenPomOrganization ` :param packaging: :type packaging: str :param parent: - :type parent: :class:`MavenPomParent ` + :type parent: :class:`MavenPomParent ` :param prerequisites: :type prerequisites: dict :param properties: :type properties: dict :param scm: - :type scm: :class:`MavenPomScm ` + :type scm: :class:`MavenPomScm ` :param url: :type url: str """ @@ -643,7 +643,7 @@ class Package(Model): Package version metadata for a Maven package :param _links: Related REST links. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param deleted_date: If and when the package was deleted. :type deleted_date: datetime :param id: Package Id. @@ -653,7 +653,7 @@ class Package(Model): :param permanently_deleted_date: If and when the package was permanently deleted. :type permanently_deleted_date: datetime :param source_chain: The history of upstream sources for this package. The first source in the list is the immediate source from which this package was saved. - :type source_chain: list of :class:`UpstreamSourceInfo ` + :type source_chain: list of :class:`UpstreamSourceInfo ` :param version: The version of the package. :type version: str """ @@ -682,7 +682,7 @@ def __init__(self, _links=None, deleted_date=None, id=None, name=None, permanent class PackageVersionDetails(Model): """ :param views: The view to which the package version will be added - :type views: :class:`JsonPatchOperation ` + :type views: :class:`JsonPatchOperation ` """ _attribute_map = { @@ -703,7 +703,7 @@ class Plugin(MavenPomGav): :param version: :type version: str :param configuration: - :type configuration: :class:`PluginConfiguration ` + :type configuration: :class:`PluginConfiguration ` """ _attribute_map = { diff --git a/azure-devops/azure/devops/v7_0/member_entitlement_management/__init__.py b/azure-devops/azure/devops/v7_2/member_entitlement_management/__init__.py similarity index 72% rename from azure-devops/azure/devops/v7_0/member_entitlement_management/__init__.py rename to azure-devops/azure/devops/v7_2/member_entitlement_management/__init__.py index ebe2a1f5..211259a0 100644 --- a/azure-devops/azure/devops/v7_0/member_entitlement_management/__init__.py +++ b/azure-devops/azure/devops/v7_2/member_entitlement_management/__init__.py @@ -10,12 +10,16 @@ from .member_entitlement_management_client import MemberEntitlementManagementClient __all__ = [ + 'AadGraphMember', 'AccessLevel', 'BaseOperationResult', + 'EntitlementBase', + 'EntitlementOperationResultBase', 'Extension', 'ExtensionSummaryData', 'GraphGroup', 'GraphMember', + 'GraphServicePrincipal', 'GraphSubject', 'GraphSubjectBase', 'GraphUser', @@ -27,6 +31,12 @@ 'JsonPatchOperation', 'LicenseSummaryData', 'MemberEntitlement', + 'MemberEntitlement2', + 'MemberEntitlement2OperationReference', + 'MemberEntitlement2OperationResult', + 'MemberEntitlement2PatchResponse', + 'MemberEntitlement2PostResponse', + 'MemberEntitlement2ResponseBase', 'MemberEntitlementOperationReference', 'MemberEntitlementsPatchResponse', 'MemberEntitlementsPostResponse', @@ -35,9 +45,16 @@ 'OperationResult', 'PagedGraphMemberList', 'PagedList', + 'PagedUserEntitlementsList', 'ProjectEntitlement', 'ProjectRef', 'ReferenceLinks', + 'ServicePrincipalEntitlement', + 'ServicePrincipalEntitlementOperationReference', + 'ServicePrincipalEntitlementOperationResult', + 'ServicePrincipalEntitlementsPatchResponse', + 'ServicePrincipalEntitlementsPostResponse', + 'ServicePrincipalEntitlementsResponseBase', 'SummaryData', 'TeamRef', 'UserEntitlement', diff --git a/azure-devops/azure/devops/v7_0/member_entitlement_management/member_entitlement_management_client.py b/azure-devops/azure/devops/v7_2/member_entitlement_management/member_entitlement_management_client.py similarity index 60% rename from azure-devops/azure/devops/v7_0/member_entitlement_management/member_entitlement_management_client.py rename to azure-devops/azure/devops/v7_2/member_entitlement_management/member_entitlement_management_client.py index 1853865b..4e60268c 100644 --- a/azure-devops/azure/devops/v7_0/member_entitlement_management/member_entitlement_management_client.py +++ b/azure-devops/azure/devops/v7_2/member_entitlement_management/member_entitlement_management_client.py @@ -27,10 +27,10 @@ def __init__(self, base_url=None, creds=None): def add_group_entitlement(self, group_entitlement, rule_option=None): """AddGroupEntitlement. - Create a group entitlement with license rule, extension rule. - :param :class:` ` group_entitlement: GroupEntitlement object specifying License Rule, Extensions Rule for the group. Based on the rules the members of the group will be given licenses and extensions. The Group Entitlement can be used to add the group to another project level groups + [Preview API] Create a group entitlement with license rule, extension rule. + :param :class:` ` group_entitlement: GroupEntitlement object specifying License Rule, Extensions Rule for the group. Based on the rules the members of the group will be given licenses and extensions. The Group Entitlement can be used to add the group to another project level groups :param str rule_option: RuleOption [ApplyGroupRule/TestApplyGroupRule] - specifies if the rules defined in group entitlement should be created and applied to it’s members (default option) or just be tested - :rtype: :class:` ` + :rtype: :class:` ` """ query_parameters = {} if rule_option is not None: @@ -38,18 +38,18 @@ def add_group_entitlement(self, group_entitlement, rule_option=None): content = self._serialize.body(group_entitlement, 'GroupEntitlement') response = self._send(http_method='POST', location_id='2280bffa-58a2-49da-822e-0764a1bb44f7', - version='7.0', + version='7.2-preview.1', query_parameters=query_parameters, content=content) return self._deserialize('GroupEntitlementOperationReference', response) def delete_group_entitlement(self, group_id, rule_option=None, remove_group_membership=None): """DeleteGroupEntitlement. - Delete a group entitlement. + [Preview API] Delete a group entitlement. :param str group_id: ID of the group to delete. :param str rule_option: RuleOption [ApplyGroupRule/TestApplyGroupRule] - specifies if the rules defined in group entitlement should be deleted and the changes are applied to it’s members (default option) or just be tested :param bool remove_group_membership: Optional parameter that specifies whether the group with the given ID should be removed from all other groups - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if group_id is not None: @@ -61,33 +61,33 @@ def delete_group_entitlement(self, group_id, rule_option=None, remove_group_memb query_parameters['removeGroupMembership'] = self._serialize.query('remove_group_membership', remove_group_membership, 'bool') response = self._send(http_method='DELETE', location_id='2280bffa-58a2-49da-822e-0764a1bb44f7', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('GroupEntitlementOperationReference', response) def get_group_entitlement(self, group_id): """GetGroupEntitlement. - Get a group entitlement. + [Preview API] Get a group entitlement. :param str group_id: ID of the group. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if group_id is not None: route_values['groupId'] = self._serialize.url('group_id', group_id, 'str') response = self._send(http_method='GET', location_id='2280bffa-58a2-49da-822e-0764a1bb44f7', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('GroupEntitlement', response) def update_group_entitlement(self, document, group_id, rule_option=None): """UpdateGroupEntitlement. - Update entitlements (License Rule, Extensions Rule, Project memberships etc.) for a group. - :param :class:`<[JsonPatchOperation]> ` document: JsonPatchDocument containing the operations to perform on the group. + [Preview API] Update entitlements (License Rule, Extensions Rule, Project memberships etc.) for a group. + :param :class:`<[JsonPatchOperation]> ` document: JsonPatchDocument containing the operations to perform on the group. :param str group_id: ID of the group. :param str rule_option: RuleOption [ApplyGroupRule/TestApplyGroupRule] - specifies if the rules defined in group entitlement should be updated and the changes are applied to it’s members (default option) or just be tested - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if group_id is not None: @@ -98,7 +98,7 @@ def update_group_entitlement(self, document, group_id, rule_option=None): content = self._serialize.body(document, '[JsonPatchOperation]') response = self._send(http_method='PATCH', location_id='2280bffa-58a2-49da-822e-0764a1bb44f7', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters, content=content, @@ -107,17 +107,41 @@ def update_group_entitlement(self, document, group_id, rule_option=None): def get_group_entitlements(self): """GetGroupEntitlements. - Get the group entitlements for an account. + [Preview API] Get the group entitlements for an account. :rtype: [GroupEntitlement] """ response = self._send(http_method='GET', location_id='9bce1f43-2629-419f-8f6c-7503be58a4f3', - version='7.0') + version='7.2-preview.1') return self._deserialize('[GroupEntitlement]', self._unwrap_collection(response)) + def search_member_entitlements(self, continuation_token=None, select=None, filter=None, order_by=None): + """SearchMemberEntitlements. + [Preview API] + :param str continuation_token: + :param str select: + :param str filter: + :param str order_by: + :rtype: :class:` ` + """ + query_parameters = {} + if continuation_token is not None: + query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'str') + if select is not None: + query_parameters['select'] = self._serialize.query('select', select, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query('filter', filter, 'str') + if order_by is not None: + query_parameters['$orderBy'] = self._serialize.query('order_by', order_by, 'str') + response = self._send(http_method='GET', + location_id='1e8cabfb-1fda-461e-860f-eeeae54d06bb', + version='7.2-preview.2', + query_parameters=query_parameters) + return self._deserialize('PagedList', response) + def add_member_to_group(self, group_id, member_id): """AddMemberToGroup. - Add a member to a Group. + [Preview API] Add a member to a Group. :param str group_id: Id of the Group. :param str member_id: Id of the member to add. """ @@ -128,16 +152,16 @@ def add_member_to_group(self, group_id, member_id): route_values['memberId'] = self._serialize.url('member_id', member_id, 'str') self._send(http_method='PUT', location_id='45a36e53-5286-4518-aa72-2d29f7acc5d8', - version='7.0', + version='7.2-preview.1', route_values=route_values) def get_group_members(self, group_id, max_results=None, paging_token=None): """GetGroupMembers. - Get direct members of a Group. + [Preview API] Get direct members of a Group. :param str group_id: Id of the Group. :param int max_results: Maximum number of results to retrieve. :param str paging_token: Paging Token from the previous page fetched. If the 'pagingToken' is null, the results would be fetched from the beginning of the Members List. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if group_id is not None: @@ -149,14 +173,14 @@ def get_group_members(self, group_id, max_results=None, paging_token=None): query_parameters['pagingToken'] = self._serialize.query('paging_token', paging_token, 'str') response = self._send(http_method='GET', location_id='45a36e53-5286-4518-aa72-2d29f7acc5d8', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('PagedGraphMemberList', response) def remove_member_from_group(self, group_id, member_id): """RemoveMemberFromGroup. - Remove a member from a Group. + [Preview API] Remove a member from a Group. :param str group_id: Id of the group. :param str member_id: Id of the member to remove. """ @@ -167,30 +191,104 @@ def remove_member_from_group(self, group_id, member_id): route_values['memberId'] = self._serialize.url('member_id', member_id, 'str') self._send(http_method='DELETE', location_id='45a36e53-5286-4518-aa72-2d29f7acc5d8', - version='7.0', + version='7.2-preview.1', + route_values=route_values) + + def add_service_principal_entitlement(self, service_principal_entitlement): + """AddServicePrincipalEntitlement. + [Preview API] Add a service principal, assign license and extensions and make them a member of a project group in an account. + :param :class:` ` service_principal_entitlement: ServicePrincipalEntitlement object specifying License, Extensions and Project/Team groups the service principal should be added to. + :rtype: :class:` ` + """ + content = self._serialize.body(service_principal_entitlement, 'ServicePrincipalEntitlement') + response = self._send(http_method='POST', + location_id='f03dbf50-80f8-41b7-8ca2-65b6a178caba', + version='7.2-preview.1', + content=content) + return self._deserialize('ServicePrincipalEntitlementsPostResponse', response) + + def update_service_principal_entitlements(self, document): + """UpdateServicePrincipalEntitlements. + [Preview API] Edit the entitlements (License, Extensions, Projects, Teams etc) for one or more service principals. + :param :class:`<[JsonPatchOperation]> ` document: JsonPatchDocument containing the operations to perform. + :rtype: :class:` ` + """ + content = self._serialize.body(document, '[JsonPatchOperation]') + response = self._send(http_method='PATCH', + location_id='f03dbf50-80f8-41b7-8ca2-65b6a178caba', + version='7.2-preview.1', + content=content, + media_type='application/json-patch+json') + return self._deserialize('ServicePrincipalEntitlementOperationReference', response) + + def delete_service_principal_entitlement(self, service_principal_id): + """DeleteServicePrincipalEntitlement. + [Preview API] Delete a service principal from the account. + :param str service_principal_id: ID of the service principal. + """ + route_values = {} + if service_principal_id is not None: + route_values['servicePrincipalId'] = self._serialize.url('service_principal_id', service_principal_id, 'str') + self._send(http_method='DELETE', + location_id='1d491a66-190b-43ae-86b8-9c2688c55186', + version='7.2-preview.1', route_values=route_values) + def get_service_principal_entitlement(self, service_principal_id): + """GetServicePrincipalEntitlement. + [Preview API] Get Service principal Entitlement for a service principal. + :param str service_principal_id: ID of the service principal. + :rtype: :class:` ` + """ + route_values = {} + if service_principal_id is not None: + route_values['servicePrincipalId'] = self._serialize.url('service_principal_id', service_principal_id, 'str') + response = self._send(http_method='GET', + location_id='1d491a66-190b-43ae-86b8-9c2688c55186', + version='7.2-preview.1', + route_values=route_values) + return self._deserialize('ServicePrincipalEntitlement', response) + + def update_service_principal_entitlement(self, document, service_principal_id): + """UpdateServicePrincipalEntitlement. + [Preview API] Edit the entitlements (License, Extensions, Projects, Teams etc) for a service principal. + :param :class:`<[JsonPatchOperation]> ` document: JsonPatchDocument containing the operations to perform on the service principal. + :param str service_principal_id: ID of the service principal. + :rtype: :class:` ` + """ + route_values = {} + if service_principal_id is not None: + route_values['servicePrincipalId'] = self._serialize.url('service_principal_id', service_principal_id, 'str') + content = self._serialize.body(document, '[JsonPatchOperation]') + response = self._send(http_method='PATCH', + location_id='1d491a66-190b-43ae-86b8-9c2688c55186', + version='7.2-preview.1', + route_values=route_values, + content=content, + media_type='application/json-patch+json') + return self._deserialize('ServicePrincipalEntitlementsPatchResponse', response) + def add_user_entitlement(self, user_entitlement): """AddUserEntitlement. - Add a user, assign license and extensions and make them a member of a project group in an account. - :param :class:` ` user_entitlement: UserEntitlement object specifying License, Extensions and Project/Team groups the user should be added to. - :rtype: :class:` ` + [Preview API] Add a user, assign license and extensions and make them a member of a project group in an account. + :param :class:` ` user_entitlement: UserEntitlement object specifying License, Extensions and Project/Team groups the user should be added to. + :rtype: :class:` ` """ content = self._serialize.body(user_entitlement, 'UserEntitlement') response = self._send(http_method='POST', location_id='387f832c-dbf2-4643-88e9-c1aa94dbb737', - version='7.0', + version='7.2-preview.4', content=content) return self._deserialize('UserEntitlementsPostResponse', response) def search_user_entitlements(self, continuation_token=None, select=None, filter=None, order_by=None): """SearchUserEntitlements. - Get a paged set of user entitlements matching the filter and sort criteria built with properties that match the select input. + [Preview API] Get a paged set of user entitlements matching the filter and sort criteria built with properties that match the select input. :param str continuation_token: Continuation token for getting the next page of data set. If null is passed, gets the first page. :param str select: Comma (",") separated list of properties to select in the result entitlements. names of the properties are - 'Projects, 'Extensions' and 'Grouprules'. - :param str filter: Equality operators relating to searching user entitlements seperated by and clauses. Valid filters include: licenseId, licenseStatus, userType, and name. licenseId: filters based on license assignment using license names. i.e. licenseId eq 'Account-Stakeholder' or licenseId eq 'Account-Express'. licenseStatus: filters based on license status. currently only supports disabled. i.e. licenseStatus eq 'Disabled'. To get disabled basic licenses, you would pass (licenseId eq 'Account-Express' and licenseStatus eq 'Disabled') userType: filters off identity type. Suppored types are member or guest i.e. userType eq 'member'. name: filters on if the user's display name or email contians given input. i.e. get all users with "test" in email or displayname is "name eq 'test'". A valid query could be: (licenseId eq 'Account-Stakeholder' or (licenseId eq 'Account-Express' and licenseStatus eq 'Disabled')) and name eq 'test' and userType eq 'guest'. + :param str filter: Equality operators relating to searching user entitlements separated by and clauses. Valid filters include: licenseId, licenseStatus, userType, and name. licenseId: filters based on license assignment using license names. i.e. licenseId eq 'Account-Stakeholder' or licenseId eq 'Account-Express'. licenseStatus: filters based on license status. currently only supports disabled. i.e. licenseStatus eq 'Disabled'. To get disabled basic licenses, you would pass (licenseId eq 'Account-Express' and licenseStatus eq 'Disabled'). userType: filters off identity type. Supported types are member or guest i.e. userType eq 'member'. name: filters on if the user's display name or email contains given input. i.e. get all users with "test" in email or displayname is "name eq 'test'". A valid query could be: (licenseId eq 'Account-Stakeholder' or (licenseId eq 'Account-Express' and licenseStatus eq 'Disabled')) and name eq 'test' and userType eq 'guest'. :param str order_by: PropertyName and Order (separated by a space ( )) to sort on (e.g. lastAccessed desc). Order defaults to ascending. valid properties to order by are dateCreated, lastAccessed, and name - :rtype: :class:` ` + :rtype: :class:` ` """ query_parameters = {} if continuation_token is not None: @@ -203,16 +301,16 @@ def search_user_entitlements(self, continuation_token=None, select=None, filter= query_parameters['$orderBy'] = self._serialize.query('order_by', order_by, 'str') response = self._send(http_method='GET', location_id='387f832c-dbf2-4643-88e9-c1aa94dbb737', - version='7.0', + version='7.2-preview.4', query_parameters=query_parameters) - return self._deserialize('PagedGraphMemberList', response) + return self._deserialize('PagedUserEntitlementsList', response) def update_user_entitlements(self, document, do_not_send_invite_for_new_users=None): """UpdateUserEntitlements. - Edit the entitlements (License, Extensions, Projects, Teams etc) for one or more users. - :param :class:`<[JsonPatchOperation]> ` document: JsonPatchDocument containing the operations to perform. + [Preview API] Edit the entitlements (License, Extensions, Projects, Teams etc) for one or more users. + :param :class:`<[JsonPatchOperation]> ` document: JsonPatchDocument containing the operations to perform. :param bool do_not_send_invite_for_new_users: Whether to send email invites to new users or not - :rtype: :class:` ` + :rtype: :class:` ` """ query_parameters = {} if do_not_send_invite_for_new_users is not None: @@ -220,7 +318,7 @@ def update_user_entitlements(self, document, do_not_send_invite_for_new_users=No content = self._serialize.body(document, '[JsonPatchOperation]') response = self._send(http_method='PATCH', location_id='387f832c-dbf2-4643-88e9-c1aa94dbb737', - version='7.0', + version='7.2-preview.4', query_parameters=query_parameters, content=content, media_type='application/json-patch+json') @@ -228,7 +326,7 @@ def update_user_entitlements(self, document, do_not_send_invite_for_new_users=No def delete_user_entitlement(self, user_id): """DeleteUserEntitlement. - Delete a user from the account. + [Preview API] Delete a user from the account. :param str user_id: ID of the user. """ route_values = {} @@ -236,30 +334,30 @@ def delete_user_entitlement(self, user_id): route_values['userId'] = self._serialize.url('user_id', user_id, 'str') self._send(http_method='DELETE', location_id='8480c6eb-ce60-47e9-88df-eca3c801638b', - version='7.0', + version='7.2-preview.4', route_values=route_values) def get_user_entitlement(self, user_id): """GetUserEntitlement. - Get User Entitlement for a user. + [Preview API] Get User Entitlement for a user. :param str user_id: ID of the user. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if user_id is not None: route_values['userId'] = self._serialize.url('user_id', user_id, 'str') response = self._send(http_method='GET', location_id='8480c6eb-ce60-47e9-88df-eca3c801638b', - version='7.0', + version='7.2-preview.4', route_values=route_values) return self._deserialize('UserEntitlement', response) def update_user_entitlement(self, document, user_id): """UpdateUserEntitlement. - Edit the entitlements (License, Extensions, Projects, Teams etc) for a user. - :param :class:`<[JsonPatchOperation]> ` document: JsonPatchDocument containing the operations to perform on the user. + [Preview API] Edit the entitlements (License, Extensions, Projects, Teams etc) for a user. + :param :class:`<[JsonPatchOperation]> ` document: JsonPatchDocument containing the operations to perform on the user. :param str user_id: ID of the user. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if user_id is not None: @@ -267,7 +365,7 @@ def update_user_entitlement(self, document, user_id): content = self._serialize.body(document, '[JsonPatchOperation]') response = self._send(http_method='PATCH', location_id='8480c6eb-ce60-47e9-88df-eca3c801638b', - version='7.0', + version='7.2-preview.4', route_values=route_values, content=content, media_type='application/json-patch+json') @@ -275,16 +373,16 @@ def update_user_entitlement(self, document, user_id): def get_users_summary(self, select=None): """GetUsersSummary. - Get summary of Licenses, Extension, Projects, Groups and their assignments in the collection. + [Preview API] Get summary of Licenses, Extension, Projects, Groups and their assignments in the collection. :param str select: Comma (",") separated list of properties to select. Supported property names are {AccessLevels, Licenses, Projects, Groups}. - :rtype: :class:` ` + :rtype: :class:` ` """ query_parameters = {} if select is not None: query_parameters['select'] = self._serialize.query('select', select, 'str') response = self._send(http_method='GET', location_id='5ae55b13-c9dd-49d1-957e-6e76c152e3d9', - version='7.0', + version='7.2-preview.1', query_parameters=query_parameters) return self._deserialize('UsersSummary', response) diff --git a/azure-devops/azure/devops/v7_0/member_entitlement_management/models.py b/azure-devops/azure/devops/v7_2/member_entitlement_management/models.py similarity index 61% rename from azure-devops/azure/devops/v7_0/member_entitlement_management/models.py rename to azure-devops/azure/devops/v7_2/member_entitlement_management/models.py index 518392d0..92e7489c 100644 --- a/azure-devops/azure/devops/v7_0/member_entitlement_management/models.py +++ b/azure-devops/azure/devops/v7_2/member_entitlement_management/models.py @@ -13,7 +13,7 @@ class AccessLevel(Model): """ License assigned to a user - :param account_license_type: Type of Account License (e.g. Express, Stakeholder etc.) + :param account_license_type: Type of Account License (e.g. Express, Stakeholder etc.). To use the AccountLicenseType, LicensingSource should be defined as 'account' in the request body. :type account_license_type: object :param assignment_source: Assignment Source of the License (e.g. Group, Unknown etc. :type assignment_source: object @@ -21,7 +21,7 @@ class AccessLevel(Model): :type license_display_name: str :param licensing_source: Licensing Source (e.g. Account. MSDN etc.) :type licensing_source: object - :param msdn_license_type: Type of MSDN License (e.g. Visual Studio Professional, Visual Studio Enterprise etc.) + :param msdn_license_type: Type of MSDN License (e.g. Visual Studio Professional, Visual Studio Enterprise etc.). To use the MsdnLicenseType, LicensingSource should be defined as 'msdn' in the request body. :type msdn_license_type: object :param status: User status in the account :type status: object @@ -69,6 +69,64 @@ def __init__(self, errors=None, is_success=None): self.is_success = is_success +class EntitlementBase(Model): + """ + :param access_level: Member's access level denoted by a license. + :type access_level: :class:`AccessLevel ` + :param date_created: [Readonly] Date the member was added to the collection. + :type date_created: datetime + :param group_assignments: [Readonly] GroupEntitlements that this member belongs to. + :type group_assignments: list of :class:`GroupEntitlement ` + :param id: The unique identifier which matches the Id of the Identity associated with the GraphMember. + :type id: str + :param last_accessed_date: [Readonly] Date the member last accessed the collection. + :type last_accessed_date: datetime + :param project_entitlements: Relation between a project and the member's effective permissions in that project. + :type project_entitlements: list of :class:`ProjectEntitlement ` + """ + + _attribute_map = { + 'access_level': {'key': 'accessLevel', 'type': 'AccessLevel'}, + 'date_created': {'key': 'dateCreated', 'type': 'iso-8601'}, + 'group_assignments': {'key': 'groupAssignments', 'type': '[GroupEntitlement]'}, + 'id': {'key': 'id', 'type': 'str'}, + 'last_accessed_date': {'key': 'lastAccessedDate', 'type': 'iso-8601'}, + 'project_entitlements': {'key': 'projectEntitlements', 'type': '[ProjectEntitlement]'} + } + + def __init__(self, access_level=None, date_created=None, group_assignments=None, id=None, last_accessed_date=None, project_entitlements=None): + super(EntitlementBase, self).__init__() + self.access_level = access_level + self.date_created = date_created + self.group_assignments = group_assignments + self.id = id + self.last_accessed_date = last_accessed_date + self.project_entitlements = project_entitlements + + +class EntitlementOperationResultBase(Model): + """ + :param errors: List of error codes paired with their corresponding error messages. + :type errors: list of { key: int; value: str } + :param is_success: Success status of the operation. + :type is_success: bool + :param result: Resulting entitlement property. For specific implementations, see also: + :type result: object + """ + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[{ key: int; value: str }]'}, + 'is_success': {'key': 'isSuccess', 'type': 'bool'}, + 'result': {'key': 'result', 'type': 'object'} + } + + def __init__(self, errors=None, is_success=None, result=None): + super(EntitlementOperationResultBase, self).__init__() + self.errors = errors + self.is_success = is_success + self.result = result + + class Extension(Model): """ An extension assigned to a user @@ -101,7 +159,7 @@ def __init__(self, assignment_source=None, id=None, name=None, source=None): class GraphSubjectBase(Model): """ :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. :type descriptor: str :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. @@ -151,19 +209,19 @@ class GroupEntitlement(Model): A group entity with additional properties including its license, extensions, and project membership :param extension_rules: Extension Rules. - :type extension_rules: list of :class:`Extension ` + :type extension_rules: list of :class:`Extension ` :param group: Member reference. - :type group: :class:`GraphGroup ` + :type group: :class:`GraphGroup ` :param id: The unique identifier which matches the Id of the GraphMember. :type id: str :param last_executed: [Readonly] The last time the group licensing rule was executed (regardless of whether any changes were made). :type last_executed: datetime :param license_rule: License Rule. - :type license_rule: :class:`AccessLevel ` + :type license_rule: :class:`AccessLevel ` :param members: Group members. Only used when creating a new group. - :type members: list of :class:`UserEntitlement ` + :type members: list of :class:`UserEntitlement ` :param project_entitlements: Relation between a project and the member's effective permissions in that project. - :type project_entitlements: list of :class:`ProjectEntitlement ` + :type project_entitlements: list of :class:`ProjectEntitlement ` :param status: The status of the group rule. :type status: object """ @@ -200,7 +258,7 @@ class GroupOperationResult(BaseOperationResult): :param group_id: Identifier of the Group being acted upon :type group_id: str :param result: Result of the Groupentitlement after the operation - :type result: :class:`GroupEntitlement ` + :type result: :class:`GroupEntitlement ` """ _attribute_map = { @@ -221,9 +279,9 @@ class GroupOption(Model): Group option to add a user to :param access_level: Access Level - :type access_level: :class:`AccessLevel ` + :type access_level: :class:`AccessLevel ` :param group: Group - :type group: :class:`Group ` + :type group: :class:`Group ` """ _attribute_map = { @@ -266,12 +324,83 @@ def __init__(self, from_=None, op=None, path=None, value=None): self.value = value +class MemberEntitlement2(EntitlementBase): + """ + An AAD member entity + + :param access_level: Member's access level denoted by a license. + :type access_level: :class:`AccessLevel ` + :param date_created: [Readonly] Date the member was added to the collection. + :type date_created: datetime + :param group_assignments: [Readonly] GroupEntitlements that this member belongs to. + :type group_assignments: list of :class:`GroupEntitlement ` + :param id: The unique identifier which matches the Id of the Identity associated with the GraphMember. + :type id: str + :param last_accessed_date: [Readonly] Date the member last accessed the collection. + :type last_accessed_date: datetime + :param project_entitlements: Relation between a project and the member's effective permissions in that project. + :type project_entitlements: list of :class:`ProjectEntitlement ` + :param member: + :type member: :class:`AadGraphMember ` + """ + + _attribute_map = { + 'access_level': {'key': 'accessLevel', 'type': 'AccessLevel'}, + 'date_created': {'key': 'dateCreated', 'type': 'iso-8601'}, + 'group_assignments': {'key': 'groupAssignments', 'type': '[GroupEntitlement]'}, + 'id': {'key': 'id', 'type': 'str'}, + 'last_accessed_date': {'key': 'lastAccessedDate', 'type': 'iso-8601'}, + 'project_entitlements': {'key': 'projectEntitlements', 'type': '[ProjectEntitlement]'}, + 'member': {'key': 'member', 'type': 'AadGraphMember'} + } + + def __init__(self, access_level=None, date_created=None, group_assignments=None, id=None, last_accessed_date=None, project_entitlements=None, member=None): + super(MemberEntitlement2, self).__init__(access_level=access_level, date_created=date_created, group_assignments=group_assignments, id=id, last_accessed_date=last_accessed_date, project_entitlements=project_entitlements) + self.member = member + + +class MemberEntitlement2OperationResult(EntitlementOperationResultBase): + """ + :param member_id: Identifier of the Member being acted upon. + :type member_id: str + """ + + _attribute_map = { + 'member_id': {'key': 'memberId', 'type': 'str'} + } + + def __init__(self, member_id=None): + super(MemberEntitlement2OperationResult, self).__init__() + self.member_id = member_id + + +class MemberEntitlement2ResponseBase(Model): + """ + :param is_success: True if all operations were successful. + :type is_success: bool + :param member_entitlement: Result of the member entitlement after the operations. have been applied + :type member_entitlement: :class:`MemberEntitlement2 ` + """ + + _attribute_map = { + 'is_success': {'key': 'isSuccess', 'type': 'bool'}, + 'member_entitlement': {'key': 'memberEntitlement', 'type': 'MemberEntitlement2'} + } + + def __init__(self, is_success=None, member_entitlement=None): + super(MemberEntitlement2ResponseBase, self).__init__() + self.is_success = is_success + self.member_entitlement = member_entitlement + + class MemberEntitlementsResponseBase(Model): """ + Obsolete: Please use UserEntitlementsResponseBase instead + :param is_success: True if all operations were successful. :type is_success: bool :param member_entitlement: Result of the member entitlement after the operations. have been applied - :type member_entitlement: :class:`MemberEntitlement ` + :type member_entitlement: :class:`MemberEntitlement ` """ _attribute_map = { @@ -316,6 +445,8 @@ def __init__(self, id=None, plugin_id=None, status=None, url=None): class OperationResult(Model): """ + Obsolete: Please use UserEntitlementOperationResult instead + :param errors: List of error codes paired with their corresponding error messages. :type errors: list of { key: int; value: str } :param is_success: Success status of the operation. @@ -323,7 +454,7 @@ class OperationResult(Model): :param member_id: Identifier of the Member being acted upon. :type member_id: str :param result: Result of the MemberEntitlement after the operation. - :type result: :class:`MemberEntitlement ` + :type result: :class:`MemberEntitlement ` """ _attribute_map = { @@ -341,6 +472,35 @@ def __init__(self, errors=None, is_success=None, member_id=None, result=None): self.result = result +class PagedGraphMemberList(Model): + """ + A page of users + + :param continuation_token: + :type continuation_token: str + :param items: + :type items: list of :class:`UserEntitlement ` + :param members: + :type members: list of :class:`UserEntitlement ` + :param total_count: + :type total_count: int + """ + + _attribute_map = { + 'continuation_token': {'key': 'continuationToken', 'type': 'str'}, + 'items': {'key': 'items', 'type': '[UserEntitlement]'}, + 'members': {'key': 'members', 'type': '[UserEntitlement]'}, + 'total_count': {'key': 'totalCount', 'type': 'int'} + } + + def __init__(self, continuation_token=None, items=None, members=None, total_count=None): + super(PagedGraphMemberList, self).__init__() + self.continuation_token = continuation_token + self.items = items + self.members = members + self.total_count = total_count + + class PagedList(Model): """ :param continuation_token: @@ -364,6 +524,31 @@ def __init__(self, continuation_token=None, items=None, total_count=None): self.total_count = total_count +class PagedUserEntitlementsList(Model): + """ + A page of user entitlements + + :param continuation_token: The continuation token for next page of data. Can be null, if no more data exists. + :type continuation_token: str + :param items: The requested user entitlement items. + :type items: list of :class:`UserEntitlement ` + :param total_count: The total count of the existing user entitlement items. + :type total_count: int + """ + + _attribute_map = { + 'continuation_token': {'key': 'continuationToken', 'type': 'str'}, + 'items': {'key': 'items', 'type': '[UserEntitlement]'}, + 'total_count': {'key': 'totalCount', 'type': 'int'} + } + + def __init__(self, continuation_token=None, items=None, total_count=None): + super(PagedUserEntitlementsList, self).__init__() + self.continuation_token = continuation_token + self.items = items + self.total_count = total_count + + class ProjectEntitlement(Model): """ Relation between a project and the user's effective permissions in that project. @@ -371,15 +556,15 @@ class ProjectEntitlement(Model): :param assignment_source: Assignment Source (e.g. Group or Unknown). :type assignment_source: object :param group: Project Group (e.g. Contributor, Reader etc.) - :type group: :class:`Group ` + :type group: :class:`Group ` :param is_project_permission_inherited: [Deprecated] Whether the user is inheriting permissions to a project through a Azure DevOps or AAD group membership. :type is_project_permission_inherited: bool :param project_permission_inherited: Whether the user is inheriting permissions to a project through a Azure DevOps or AAD group membership. :type project_permission_inherited: object :param project_ref: Project Ref - :type project_ref: :class:`ProjectRef ` + :type project_ref: :class:`ProjectRef ` :param team_refs: Team Ref. - :type team_refs: list of :class:`TeamRef ` + :type team_refs: list of :class:`TeamRef ` """ _attribute_map = { @@ -439,6 +624,108 @@ def __init__(self, links=None): self.links = links +class ServicePrincipalEntitlement(EntitlementBase): + """ + :param access_level: Member's access level denoted by a license. + :type access_level: :class:`AccessLevel ` + :param date_created: [Readonly] Date the member was added to the collection. + :type date_created: datetime + :param group_assignments: [Readonly] GroupEntitlements that this member belongs to. + :type group_assignments: list of :class:`GroupEntitlement ` + :param id: The unique identifier which matches the Id of the Identity associated with the GraphMember. + :type id: str + :param last_accessed_date: [Readonly] Date the member last accessed the collection. + :type last_accessed_date: datetime + :param project_entitlements: Relation between a project and the member's effective permissions in that project. + :type project_entitlements: list of :class:`ProjectEntitlement ` + :param service_principal: ServicePrincipal reference. + :type service_principal: :class:`GraphServicePrincipal ` + """ + + _attribute_map = { + 'access_level': {'key': 'accessLevel', 'type': 'AccessLevel'}, + 'date_created': {'key': 'dateCreated', 'type': 'iso-8601'}, + 'group_assignments': {'key': 'groupAssignments', 'type': '[GroupEntitlement]'}, + 'id': {'key': 'id', 'type': 'str'}, + 'last_accessed_date': {'key': 'lastAccessedDate', 'type': 'iso-8601'}, + 'project_entitlements': {'key': 'projectEntitlements', 'type': '[ProjectEntitlement]'}, + 'service_principal': {'key': 'servicePrincipal', 'type': 'GraphServicePrincipal'} + } + + def __init__(self, access_level=None, date_created=None, group_assignments=None, id=None, last_accessed_date=None, project_entitlements=None, service_principal=None): + super(ServicePrincipalEntitlement, self).__init__(access_level=access_level, date_created=date_created, group_assignments=group_assignments, id=id, last_accessed_date=last_accessed_date, project_entitlements=project_entitlements) + self.service_principal = service_principal + + +class ServicePrincipalEntitlementOperationReference(OperationReference): + """ + :param id: Unique identifier for the operation. + :type id: str + :param plugin_id: Unique identifier for the plugin. + :type plugin_id: str + :param status: The current status of the operation. + :type status: object + :param url: URL to get the full operation object. + :type url: str + :param completed: Operation completed with success or failure. + :type completed: bool + :param have_results_succeeded: True if all operations were successful. + :type have_results_succeeded: bool + :param results: List of results for each operation. + :type results: list of :class:`ServicePrincipalEntitlementOperationResult ` + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'plugin_id': {'key': 'pluginId', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'object'}, + 'url': {'key': 'url', 'type': 'str'}, + 'completed': {'key': 'completed', 'type': 'bool'}, + 'have_results_succeeded': {'key': 'haveResultsSucceeded', 'type': 'bool'}, + 'results': {'key': 'results', 'type': '[ServicePrincipalEntitlementOperationResult]'} + } + + def __init__(self, id=None, plugin_id=None, status=None, url=None, completed=None, have_results_succeeded=None, results=None): + super(ServicePrincipalEntitlementOperationReference, self).__init__(id=id, plugin_id=plugin_id, status=status, url=url) + self.completed = completed + self.have_results_succeeded = have_results_succeeded + self.results = results + + +class ServicePrincipalEntitlementOperationResult(EntitlementOperationResultBase): + """ + :param service_principal_id: Identifier of the ServicePrincipal being acted upon. + :type service_principal_id: str + """ + + _attribute_map = { + 'service_principal_id': {'key': 'servicePrincipalId', 'type': 'str'} + } + + def __init__(self, service_principal_id=None): + super(ServicePrincipalEntitlementOperationResult, self).__init__() + self.service_principal_id = service_principal_id + + +class ServicePrincipalEntitlementsResponseBase(Model): + """ + :param is_success: + :type is_success: bool + :param service_principal_entitlement: + :type service_principal_entitlement: :class:`ServicePrincipalEntitlement ` + """ + + _attribute_map = { + 'is_success': {'key': 'isSuccess', 'type': 'bool'}, + 'service_principal_entitlement': {'key': 'servicePrincipalEntitlement', 'type': 'ServicePrincipalEntitlement'} + } + + def __init__(self, is_success=None, service_principal_entitlement=None): + super(ServicePrincipalEntitlementsResponseBase, self).__init__() + self.is_success = is_success + self.service_principal_entitlement = service_principal_entitlement + + class SummaryData(Model): """ :param assigned: Count of Licenses already assigned. @@ -487,48 +774,42 @@ def __init__(self, id=None, name=None): self.name = name -class UserEntitlement(Model): +class UserEntitlement(EntitlementBase): """ A user entity with additional properties including their license, extensions, and project membership - :param access_level: User's access level denoted by a license. - :type access_level: :class:`AccessLevel ` - :param date_created: [Readonly] Date the user was added to the collection. + :param access_level: Member's access level denoted by a license. + :type access_level: :class:`AccessLevel ` + :param date_created: [Readonly] Date the member was added to the collection. :type date_created: datetime - :param extensions: User's extensions. - :type extensions: list of :class:`Extension ` - :param group_assignments: [Readonly] GroupEntitlements that this user belongs to. - :type group_assignments: list of :class:`GroupEntitlement ` + :param group_assignments: [Readonly] GroupEntitlements that this member belongs to. + :type group_assignments: list of :class:`GroupEntitlement ` :param id: The unique identifier which matches the Id of the Identity associated with the GraphMember. :type id: str - :param last_accessed_date: [Readonly] Date the user last accessed the collection. + :param last_accessed_date: [Readonly] Date the member last accessed the collection. :type last_accessed_date: datetime - :param project_entitlements: Relation between a project and the user's effective permissions in that project. - :type project_entitlements: list of :class:`ProjectEntitlement ` + :param project_entitlements: Relation between a project and the member's effective permissions in that project. + :type project_entitlements: list of :class:`ProjectEntitlement ` + :param extensions: User's extensions. + :type extensions: list of :class:`Extension ` :param user: User reference. - :type user: :class:`GraphUser ` + :type user: :class:`GraphUser ` """ _attribute_map = { 'access_level': {'key': 'accessLevel', 'type': 'AccessLevel'}, 'date_created': {'key': 'dateCreated', 'type': 'iso-8601'}, - 'extensions': {'key': 'extensions', 'type': '[Extension]'}, 'group_assignments': {'key': 'groupAssignments', 'type': '[GroupEntitlement]'}, 'id': {'key': 'id', 'type': 'str'}, 'last_accessed_date': {'key': 'lastAccessedDate', 'type': 'iso-8601'}, 'project_entitlements': {'key': 'projectEntitlements', 'type': '[ProjectEntitlement]'}, + 'extensions': {'key': 'extensions', 'type': '[Extension]'}, 'user': {'key': 'user', 'type': 'GraphUser'} } - def __init__(self, access_level=None, date_created=None, extensions=None, group_assignments=None, id=None, last_accessed_date=None, project_entitlements=None, user=None): - super(UserEntitlement, self).__init__() - self.access_level = access_level - self.date_created = date_created + def __init__(self, access_level=None, date_created=None, group_assignments=None, id=None, last_accessed_date=None, project_entitlements=None, extensions=None, user=None): + super(UserEntitlement, self).__init__(access_level=access_level, date_created=date_created, group_assignments=group_assignments, id=id, last_accessed_date=last_accessed_date, project_entitlements=project_entitlements) self.extensions = extensions - self.group_assignments = group_assignments - self.id = id - self.last_accessed_date = last_accessed_date - self.project_entitlements = project_entitlements self.user = user @@ -547,7 +828,7 @@ class UserEntitlementOperationReference(OperationReference): :param have_results_succeeded: True if all operations were successful. :type have_results_succeeded: bool :param results: List of results for each operation. - :type results: list of :class:`UserEntitlementOperationResult ` + :type results: list of :class:`UserEntitlementOperationResult ` """ _attribute_map = { @@ -567,30 +848,18 @@ def __init__(self, id=None, plugin_id=None, status=None, url=None, completed=Non self.results = results -class UserEntitlementOperationResult(Model): +class UserEntitlementOperationResult(EntitlementOperationResultBase): """ - :param errors: List of error codes paired with their corresponding error messages. - :type errors: list of { key: int; value: str } - :param is_success: Success status of the operation. - :type is_success: bool - :param result: Result of the MemberEntitlement after the operation. - :type result: :class:`UserEntitlement ` :param user_id: Identifier of the Member being acted upon. :type user_id: str """ _attribute_map = { - 'errors': {'key': 'errors', 'type': '[{ key: int; value: str }]'}, - 'is_success': {'key': 'isSuccess', 'type': 'bool'}, - 'result': {'key': 'result', 'type': 'UserEntitlement'}, 'user_id': {'key': 'userId', 'type': 'str'} } - def __init__(self, errors=None, is_success=None, result=None, user_id=None): + def __init__(self, user_id=None): super(UserEntitlementOperationResult, self).__init__() - self.errors = errors - self.is_success = is_success - self.result = result self.user_id = user_id @@ -599,7 +868,7 @@ class UserEntitlementsResponseBase(Model): :param is_success: True if all operations were successful. :type is_success: bool :param user_entitlement: Result of the user entitlement after the operations have been applied. - :type user_entitlement: :class:`UserEntitlement ` + :type user_entitlement: :class:`UserEntitlement ` """ _attribute_map = { @@ -618,17 +887,17 @@ class UsersSummary(Model): Summary of licenses and extensions assigned to users in the organization :param available_access_levels: Available Access Levels - :type available_access_levels: list of :class:`AccessLevel ` + :type available_access_levels: list of :class:`AccessLevel ` :param default_access_level: Default Access Level - :type default_access_level: :class:`AccessLevel ` + :type default_access_level: :class:`AccessLevel ` :param extensions: Summary of Extensions in the organization - :type extensions: list of :class:`ExtensionSummaryData ` + :type extensions: list of :class:`ExtensionSummaryData ` :param group_options: Group Options - :type group_options: list of :class:`GroupOption ` + :type group_options: list of :class:`GroupOption ` :param licenses: Summary of Licenses in the organization - :type licenses: list of :class:`LicenseSummaryData ` + :type licenses: list of :class:`LicenseSummaryData ` :param project_refs: Summary of Projects in the organization - :type project_refs: list of :class:`ProjectRef ` + :type project_refs: list of :class:`ProjectRef ` """ _attribute_map = { @@ -708,7 +977,7 @@ class GraphSubject(GraphSubjectBase): Top-level graph entity :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. :type descriptor: str :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. @@ -759,7 +1028,7 @@ class GroupEntitlementOperationReference(OperationReference): :param have_results_succeeded: True if all operations were successful. :type have_results_succeeded: bool :param results: List of results for each operation. - :type results: list of :class:`GroupOperationResult ` + :type results: list of :class:`GroupOperationResult ` """ _attribute_map = { @@ -791,7 +1060,7 @@ class LicenseSummaryData(SummaryData): :type included_quantity: int :param total: Total Count. :type total: int - :param account_license_type: Type of Account License. + :param account_license_type: Type of Account License. To use the AccountLicenseType, LicensingSource should be defined as 'account' in the request body. :type account_license_type: object :param disabled: Count of Disabled Licenses. :type disabled: int @@ -799,7 +1068,7 @@ class LicenseSummaryData(SummaryData): :type is_purchasable: bool :param license_name: Name of the License. :type license_name: str - :param msdn_license_type: Type of MSDN License. + :param msdn_license_type: Type of MSDN License. To use the MsdnLicenseType, LicensingSource should be defined as 'msdn' in the request body. :type msdn_license_type: object :param next_billing_date: Specifies the date when billing will charge for paid licenses :type next_billing_date: datetime @@ -840,45 +1109,124 @@ class MemberEntitlement(UserEntitlement): """ Deprecated: Use UserEntitlement instead - :param access_level: User's access level denoted by a license. - :type access_level: :class:`AccessLevel ` - :param date_created: [Readonly] Date the user was added to the collection. + :param access_level: Member's access level denoted by a license. + :type access_level: :class:`AccessLevel ` + :param date_created: [Readonly] Date the member was added to the collection. :type date_created: datetime - :param extensions: User's extensions. - :type extensions: list of :class:`Extension ` - :param group_assignments: [Readonly] GroupEntitlements that this user belongs to. - :type group_assignments: list of :class:`GroupEntitlement ` + :param group_assignments: [Readonly] GroupEntitlements that this member belongs to. + :type group_assignments: list of :class:`GroupEntitlement ` :param id: The unique identifier which matches the Id of the Identity associated with the GraphMember. :type id: str - :param last_accessed_date: [Readonly] Date the user last accessed the collection. + :param last_accessed_date: [Readonly] Date the member last accessed the collection. :type last_accessed_date: datetime - :param project_entitlements: Relation between a project and the user's effective permissions in that project. - :type project_entitlements: list of :class:`ProjectEntitlement ` + :param project_entitlements: Relation between a project and the member's effective permissions in that project. + :type project_entitlements: list of :class:`ProjectEntitlement ` + :param extensions: User's extensions. + :type extensions: list of :class:`Extension ` :param user: User reference. - :type user: :class:`GraphUser ` + :type user: :class:`GraphUser ` :param member: Member reference - :type member: :class:`GraphMember ` + :type member: :class:`GraphMember ` """ _attribute_map = { 'access_level': {'key': 'accessLevel', 'type': 'AccessLevel'}, 'date_created': {'key': 'dateCreated', 'type': 'iso-8601'}, - 'extensions': {'key': 'extensions', 'type': '[Extension]'}, 'group_assignments': {'key': 'groupAssignments', 'type': '[GroupEntitlement]'}, 'id': {'key': 'id', 'type': 'str'}, 'last_accessed_date': {'key': 'lastAccessedDate', 'type': 'iso-8601'}, 'project_entitlements': {'key': 'projectEntitlements', 'type': '[ProjectEntitlement]'}, + 'extensions': {'key': 'extensions', 'type': '[Extension]'}, 'user': {'key': 'user', 'type': 'GraphUser'}, 'member': {'key': 'member', 'type': 'GraphMember'} } - def __init__(self, access_level=None, date_created=None, extensions=None, group_assignments=None, id=None, last_accessed_date=None, project_entitlements=None, user=None, member=None): - super(MemberEntitlement, self).__init__(access_level=access_level, date_created=date_created, extensions=extensions, group_assignments=group_assignments, id=id, last_accessed_date=last_accessed_date, project_entitlements=project_entitlements, user=user) + def __init__(self, access_level=None, date_created=None, group_assignments=None, id=None, last_accessed_date=None, project_entitlements=None, extensions=None, user=None, member=None): + super(MemberEntitlement, self).__init__(access_level=access_level, date_created=date_created, group_assignments=group_assignments, id=id, last_accessed_date=last_accessed_date, project_entitlements=project_entitlements, extensions=extensions, user=user) self.member = member +class MemberEntitlement2OperationReference(OperationReference): + """ + :param id: Unique identifier for the operation. + :type id: str + :param plugin_id: Unique identifier for the plugin. + :type plugin_id: str + :param status: The current status of the operation. + :type status: object + :param url: URL to get the full operation object. + :type url: str + :param completed: Operation completed with success or failure. + :type completed: bool + :param have_results_succeeded: True if all operations were successful. + :type have_results_succeeded: bool + :param results: List of results for each operation. + :type results: list of :class:`MemberEntitlement2OperationResult ` + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'plugin_id': {'key': 'pluginId', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'object'}, + 'url': {'key': 'url', 'type': 'str'}, + 'completed': {'key': 'completed', 'type': 'bool'}, + 'have_results_succeeded': {'key': 'haveResultsSucceeded', 'type': 'bool'}, + 'results': {'key': 'results', 'type': '[MemberEntitlement2OperationResult]'} + } + + def __init__(self, id=None, plugin_id=None, status=None, url=None, completed=None, have_results_succeeded=None, results=None): + super(MemberEntitlement2OperationReference, self).__init__(id=id, plugin_id=plugin_id, status=status, url=url) + self.completed = completed + self.have_results_succeeded = have_results_succeeded + self.results = results + + +class MemberEntitlement2PatchResponse(MemberEntitlement2ResponseBase): + """ + :param is_success: True if all operations were successful. + :type is_success: bool + :param member_entitlement: Result of the member entitlement after the operations. have been applied + :type member_entitlement: :class:`MemberEntitlement2 ` + :param operation_results: List of results for each operation + :type operation_results: list of :class:`MemberEntitlement2OperationResult ` + """ + + _attribute_map = { + 'is_success': {'key': 'isSuccess', 'type': 'bool'}, + 'member_entitlement': {'key': 'memberEntitlement', 'type': 'MemberEntitlement2'}, + 'operation_results': {'key': 'operationResults', 'type': '[MemberEntitlement2OperationResult]'} + } + + def __init__(self, is_success=None, member_entitlement=None, operation_results=None): + super(MemberEntitlement2PatchResponse, self).__init__(is_success=is_success, member_entitlement=member_entitlement) + self.operation_results = operation_results + + +class MemberEntitlement2PostResponse(MemberEntitlement2ResponseBase): + """ + :param is_success: True if all operations were successful. + :type is_success: bool + :param member_entitlement: Result of the member entitlement after the operations. have been applied + :type member_entitlement: :class:`MemberEntitlement2 ` + :param operation_result: Operation result + :type operation_result: :class:`MemberEntitlement2OperationResult ` + """ + + _attribute_map = { + 'is_success': {'key': 'isSuccess', 'type': 'bool'}, + 'member_entitlement': {'key': 'memberEntitlement', 'type': 'MemberEntitlement2'}, + 'operation_result': {'key': 'operationResult', 'type': 'MemberEntitlement2OperationResult'} + } + + def __init__(self, is_success=None, member_entitlement=None, operation_result=None): + super(MemberEntitlement2PostResponse, self).__init__(is_success=is_success, member_entitlement=member_entitlement) + self.operation_result = operation_result + + class MemberEntitlementOperationReference(OperationReference): """ + Obsolete: Please use UserEntitlementOperationReference instead + :param id: Unique identifier for the operation. :type id: str :param plugin_id: Unique identifier for the plugin. @@ -892,7 +1240,7 @@ class MemberEntitlementOperationReference(OperationReference): :param have_results_succeeded: True if all operations were successful :type have_results_succeeded: bool :param results: List of results for each operation - :type results: list of :class:`OperationResult ` + :type results: list of :class:`OperationResult ` """ _attribute_map = { @@ -914,12 +1262,14 @@ def __init__(self, id=None, plugin_id=None, status=None, url=None, completed=Non class MemberEntitlementsPatchResponse(MemberEntitlementsResponseBase): """ + Obsolete: Please use UserEntitlementsPatchResponse instead + :param is_success: True if all operations were successful. :type is_success: bool :param member_entitlement: Result of the member entitlement after the operations. have been applied - :type member_entitlement: :class:`MemberEntitlement ` + :type member_entitlement: :class:`MemberEntitlement ` :param operation_results: List of results for each operation - :type operation_results: list of :class:`OperationResult ` + :type operation_results: list of :class:`OperationResult ` """ _attribute_map = { @@ -935,12 +1285,14 @@ def __init__(self, is_success=None, member_entitlement=None, operation_results=N class MemberEntitlementsPostResponse(MemberEntitlementsResponseBase): """ + Obsolete: Please use UserEntitlementsPostResponse instead + :param is_success: True if all operations were successful. :type is_success: bool :param member_entitlement: Result of the member entitlement after the operations. have been applied - :type member_entitlement: :class:`MemberEntitlement ` + :type member_entitlement: :class:`MemberEntitlement ` :param operation_result: Operation result - :type operation_result: :class:`OperationResult ` + :type operation_result: :class:`OperationResult ` """ _attribute_map = { @@ -954,21 +1306,46 @@ def __init__(self, is_success=None, member_entitlement=None, operation_result=No self.operation_result = operation_result -class PagedGraphMemberList(PagedList): +class ServicePrincipalEntitlementsPatchResponse(ServicePrincipalEntitlementsResponseBase): + """ + :param is_success: + :type is_success: bool + :param service_principal_entitlement: + :type service_principal_entitlement: :class:`ServicePrincipalEntitlement ` + :param operation_results: + :type operation_results: list of :class:`ServicePrincipalEntitlementOperationResult ` """ - A page of users - :param members: - :type members: list of :class:`UserEntitlement ` + _attribute_map = { + 'is_success': {'key': 'isSuccess', 'type': 'bool'}, + 'service_principal_entitlement': {'key': 'servicePrincipalEntitlement', 'type': 'ServicePrincipalEntitlement'}, + 'operation_results': {'key': 'operationResults', 'type': '[ServicePrincipalEntitlementOperationResult]'} + } + + def __init__(self, is_success=None, service_principal_entitlement=None, operation_results=None): + super(ServicePrincipalEntitlementsPatchResponse, self).__init__(is_success=is_success, service_principal_entitlement=service_principal_entitlement) + self.operation_results = operation_results + + +class ServicePrincipalEntitlementsPostResponse(ServicePrincipalEntitlementsResponseBase): + """ + :param is_success: + :type is_success: bool + :param service_principal_entitlement: + :type service_principal_entitlement: :class:`ServicePrincipalEntitlement ` + :param operation_result: + :type operation_result: :class:`ServicePrincipalEntitlementOperationResult ` """ _attribute_map = { - 'members': {'key': 'members', 'type': '[UserEntitlement]'} + 'is_success': {'key': 'isSuccess', 'type': 'bool'}, + 'service_principal_entitlement': {'key': 'servicePrincipalEntitlement', 'type': 'ServicePrincipalEntitlement'}, + 'operation_result': {'key': 'operationResult', 'type': 'ServicePrincipalEntitlementOperationResult'} } - def __init__(self, members=None): - super(PagedGraphMemberList, self).__init__() - self.members = members + def __init__(self, is_success=None, service_principal_entitlement=None, operation_result=None): + super(ServicePrincipalEntitlementsPostResponse, self).__init__(is_success=is_success, service_principal_entitlement=service_principal_entitlement) + self.operation_result = operation_result class UserEntitlementsPatchResponse(UserEntitlementsResponseBase): @@ -976,9 +1353,9 @@ class UserEntitlementsPatchResponse(UserEntitlementsResponseBase): :param is_success: True if all operations were successful. :type is_success: bool :param user_entitlement: Result of the user entitlement after the operations have been applied. - :type user_entitlement: :class:`UserEntitlement ` + :type user_entitlement: :class:`UserEntitlement ` :param operation_results: List of results for each operation. - :type operation_results: list of :class:`UserEntitlementOperationResult ` + :type operation_results: list of :class:`UserEntitlementOperationResult ` """ _attribute_map = { @@ -997,9 +1374,9 @@ class UserEntitlementsPostResponse(UserEntitlementsResponseBase): :param is_success: True if all operations were successful. :type is_success: bool :param user_entitlement: Result of the user entitlement after the operations have been applied. - :type user_entitlement: :class:`UserEntitlement ` + :type user_entitlement: :class:`UserEntitlement ` :param operation_result: Operation result. - :type operation_result: :class:`UserEntitlementOperationResult ` + :type operation_result: :class:`UserEntitlementOperationResult ` """ _attribute_map = { @@ -1016,7 +1393,7 @@ def __init__(self, is_success=None, user_entitlement=None, operation_result=None class GraphMember(GraphSubject): """ :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. :type descriptor: str :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. @@ -1060,12 +1437,10 @@ def __init__(self, _links=None, descriptor=None, display_name=None, url=None, le self.principal_name = principal_name -class GraphUser(GraphMember): +class AadGraphMember(GraphMember): """ - Graph user entity - :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. :type descriptor: str :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. @@ -1115,7 +1490,7 @@ class GraphUser(GraphMember): } def __init__(self, _links=None, descriptor=None, display_name=None, url=None, legacy_descriptor=None, origin=None, origin_id=None, subject_kind=None, domain=None, mail_address=None, principal_name=None, directory_alias=None, is_deleted_in_origin=None, metadata_update_date=None, meta_type=None): - super(GraphUser, self).__init__(_links=_links, descriptor=descriptor, display_name=display_name, url=url, legacy_descriptor=legacy_descriptor, origin=origin, origin_id=origin_id, subject_kind=subject_kind, domain=domain, mail_address=mail_address, principal_name=principal_name) + super(AadGraphMember, self).__init__(_links=_links, descriptor=descriptor, display_name=display_name, url=url, legacy_descriptor=legacy_descriptor, origin=origin, origin_id=origin_id, subject_kind=subject_kind, domain=domain, mail_address=mail_address, principal_name=principal_name) self.directory_alias = directory_alias self.is_deleted_in_origin = is_deleted_in_origin self.metadata_update_date = metadata_update_date @@ -1127,7 +1502,7 @@ class GraphGroup(GraphMember): Graph group entity :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. :type descriptor: str :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. @@ -1212,9 +1587,127 @@ def __init__(self, _links=None, descriptor=None, display_name=None, url=None, le self.special_type = special_type +class GraphServicePrincipal(AadGraphMember): + """ + :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. + :type _links: :class:`ReferenceLinks ` + :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. + :type descriptor: str + :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. + :type display_name: str + :param url: This url is the full route to the source resource of this graph subject. + :type url: str + :param legacy_descriptor: [Internal Use Only] The legacy descriptor is here in case you need to access old version IMS using identity descriptor. + :type legacy_descriptor: str + :param origin: The type of source provider for the origin identifier (ex:AD, AAD, MSA) + :type origin: str + :param origin_id: The unique identifier from the system of origin. Typically a sid, object id or Guid. Linking and unlinking operations can cause this value to change for a user because the user is not backed by a different provider and has a different unique id in the new provider. + :type origin_id: str + :param subject_kind: This field identifies the type of the graph subject (ex: Group, Scope, User). + :type subject_kind: str + :param domain: This represents the name of the container of origin for a graph member. (For MSA this is "Windows Live ID", for AD the name of the domain, for AAD the tenantID of the directory, for VSTS groups the ScopeId, etc) + :type domain: str + :param mail_address: The email address of record for a given graph member. This may be different than the principal name. + :type mail_address: str + :param principal_name: This is the PrincipalName of this graph member from the source provider. The source provider may change this field over time and it is not guaranteed to be immutable for the life of the graph member by VSTS. + :type principal_name: str + :param directory_alias: The short, generally unique name for the user in the backing directory. For AAD users, this corresponds to the mail nickname, which is often but not necessarily similar to the part of the user's mail address before the @ sign. For GitHub users, this corresponds to the GitHub user handle. + :type directory_alias: str + :param is_deleted_in_origin: When true, the group has been deleted in the identity provider + :type is_deleted_in_origin: bool + :param metadata_update_date: + :type metadata_update_date: datetime + :param meta_type: The meta type of the user in the origin, such as "member", "guest", etc. See UserMetaType for the set of possible values. + :type meta_type: str + :param application_id: + :type application_id: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'descriptor': {'key': 'descriptor', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'legacy_descriptor': {'key': 'legacyDescriptor', 'type': 'str'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'origin_id': {'key': 'originId', 'type': 'str'}, + 'subject_kind': {'key': 'subjectKind', 'type': 'str'}, + 'domain': {'key': 'domain', 'type': 'str'}, + 'mail_address': {'key': 'mailAddress', 'type': 'str'}, + 'principal_name': {'key': 'principalName', 'type': 'str'}, + 'directory_alias': {'key': 'directoryAlias', 'type': 'str'}, + 'is_deleted_in_origin': {'key': 'isDeletedInOrigin', 'type': 'bool'}, + 'metadata_update_date': {'key': 'metadataUpdateDate', 'type': 'iso-8601'}, + 'meta_type': {'key': 'metaType', 'type': 'str'}, + 'application_id': {'key': 'applicationId', 'type': 'str'} + } + + def __init__(self, _links=None, descriptor=None, display_name=None, url=None, legacy_descriptor=None, origin=None, origin_id=None, subject_kind=None, domain=None, mail_address=None, principal_name=None, directory_alias=None, is_deleted_in_origin=None, metadata_update_date=None, meta_type=None, application_id=None): + super(GraphServicePrincipal, self).__init__(_links=_links, descriptor=descriptor, display_name=display_name, url=url, legacy_descriptor=legacy_descriptor, origin=origin, origin_id=origin_id, subject_kind=subject_kind, domain=domain, mail_address=mail_address, principal_name=principal_name, directory_alias=directory_alias, is_deleted_in_origin=is_deleted_in_origin, metadata_update_date=metadata_update_date, meta_type=meta_type) + self.application_id = application_id + + +class GraphUser(AadGraphMember): + """ + :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. + :type _links: :class:`ReferenceLinks ` + :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. + :type descriptor: str + :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. + :type display_name: str + :param url: This url is the full route to the source resource of this graph subject. + :type url: str + :param legacy_descriptor: [Internal Use Only] The legacy descriptor is here in case you need to access old version IMS using identity descriptor. + :type legacy_descriptor: str + :param origin: The type of source provider for the origin identifier (ex:AD, AAD, MSA) + :type origin: str + :param origin_id: The unique identifier from the system of origin. Typically a sid, object id or Guid. Linking and unlinking operations can cause this value to change for a user because the user is not backed by a different provider and has a different unique id in the new provider. + :type origin_id: str + :param subject_kind: This field identifies the type of the graph subject (ex: Group, Scope, User). + :type subject_kind: str + :param domain: This represents the name of the container of origin for a graph member. (For MSA this is "Windows Live ID", for AD the name of the domain, for AAD the tenantID of the directory, for VSTS groups the ScopeId, etc) + :type domain: str + :param mail_address: The email address of record for a given graph member. This may be different than the principal name. + :type mail_address: str + :param principal_name: This is the PrincipalName of this graph member from the source provider. The source provider may change this field over time and it is not guaranteed to be immutable for the life of the graph member by VSTS. + :type principal_name: str + :param directory_alias: The short, generally unique name for the user in the backing directory. For AAD users, this corresponds to the mail nickname, which is often but not necessarily similar to the part of the user's mail address before the @ sign. For GitHub users, this corresponds to the GitHub user handle. + :type directory_alias: str + :param is_deleted_in_origin: When true, the group has been deleted in the identity provider + :type is_deleted_in_origin: bool + :param metadata_update_date: + :type metadata_update_date: datetime + :param meta_type: The meta type of the user in the origin, such as "member", "guest", etc. See UserMetaType for the set of possible values. + :type meta_type: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'descriptor': {'key': 'descriptor', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'legacy_descriptor': {'key': 'legacyDescriptor', 'type': 'str'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'origin_id': {'key': 'originId', 'type': 'str'}, + 'subject_kind': {'key': 'subjectKind', 'type': 'str'}, + 'domain': {'key': 'domain', 'type': 'str'}, + 'mail_address': {'key': 'mailAddress', 'type': 'str'}, + 'principal_name': {'key': 'principalName', 'type': 'str'}, + 'directory_alias': {'key': 'directoryAlias', 'type': 'str'}, + 'is_deleted_in_origin': {'key': 'isDeletedInOrigin', 'type': 'bool'}, + 'metadata_update_date': {'key': 'metadataUpdateDate', 'type': 'iso-8601'}, + 'meta_type': {'key': 'metaType', 'type': 'str'}, + } + + def __init__(self, _links=None, descriptor=None, display_name=None, url=None, legacy_descriptor=None, origin=None, origin_id=None, subject_kind=None, domain=None, mail_address=None, principal_name=None, directory_alias=None, is_deleted_in_origin=None, metadata_update_date=None, meta_type=None): + super(GraphUser, self).__init__(_links=_links, descriptor=descriptor, display_name=display_name, url=url, legacy_descriptor=legacy_descriptor, origin=origin, origin_id=origin_id, subject_kind=subject_kind, domain=domain, mail_address=mail_address, principal_name=principal_name, directory_alias=directory_alias, is_deleted_in_origin=is_deleted_in_origin, metadata_update_date=metadata_update_date, meta_type=meta_type) + + __all__ = [ 'AccessLevel', 'BaseOperationResult', + 'EntitlementBase', + 'EntitlementOperationResultBase', 'Extension', 'GraphSubjectBase', 'Group', @@ -1222,13 +1715,22 @@ def __init__(self, _links=None, descriptor=None, display_name=None, url=None, le 'GroupOperationResult', 'GroupOption', 'JsonPatchOperation', + 'MemberEntitlement2', + 'MemberEntitlement2OperationResult', + 'MemberEntitlement2ResponseBase', 'MemberEntitlementsResponseBase', 'OperationReference', 'OperationResult', + 'PagedGraphMemberList', 'PagedList', + 'PagedUserEntitlementsList', 'ProjectEntitlement', 'ProjectRef', 'ReferenceLinks', + 'ServicePrincipalEntitlement', + 'ServicePrincipalEntitlementOperationReference', + 'ServicePrincipalEntitlementOperationResult', + 'ServicePrincipalEntitlementsResponseBase', 'SummaryData', 'TeamRef', 'UserEntitlement', @@ -1241,13 +1743,19 @@ def __init__(self, _links=None, descriptor=None, display_name=None, url=None, le 'GroupEntitlementOperationReference', 'LicenseSummaryData', 'MemberEntitlement', + 'MemberEntitlement2OperationReference', + 'MemberEntitlement2PatchResponse', + 'MemberEntitlement2PostResponse', 'MemberEntitlementOperationReference', 'MemberEntitlementsPatchResponse', 'MemberEntitlementsPostResponse', - 'PagedGraphMemberList', + 'ServicePrincipalEntitlementsPatchResponse', + 'ServicePrincipalEntitlementsPostResponse', 'UserEntitlementsPatchResponse', 'UserEntitlementsPostResponse', 'GraphMember', - 'GraphUser', + 'AadGraphMember', 'GraphGroup', + 'GraphServicePrincipal', + 'GraphUser', ] diff --git a/azure-devops/azure/devops/v7_0/notification/__init__.py b/azure-devops/azure/devops/v7_2/notification/__init__.py similarity index 100% rename from azure-devops/azure/devops/v7_0/notification/__init__.py rename to azure-devops/azure/devops/v7_2/notification/__init__.py index 9a25d3d0..df6f9834 100644 --- a/azure-devops/azure/devops/v7_0/notification/__init__.py +++ b/azure-devops/azure/devops/v7_2/notification/__init__.py @@ -30,8 +30,8 @@ 'InputValues', 'InputValuesError', 'InputValuesQuery', - 'ISubscriptionFilter', 'ISubscriptionChannel', + 'ISubscriptionFilter', 'NotificationAdminSettings', 'NotificationAdminSettingsUpdateParameters', 'NotificationDiagnosticLogMessage', @@ -57,11 +57,11 @@ 'OperatorConstraint', 'ReferenceLinks', 'SubscriptionAdminSettings', + 'SubscriptionChannelWithAddress', 'SubscriptionDiagnostics', 'SubscriptionEvaluationRequest', 'SubscriptionEvaluationResult', 'SubscriptionEvaluationSettings', - 'SubscriptionChannelWithAddress', 'SubscriptionManagement', 'SubscriptionQuery', 'SubscriptionQueryCondition', diff --git a/azure-devops/azure/devops/v7_0/notification/models.py b/azure-devops/azure/devops/v7_2/notification/models.py similarity index 94% rename from azure-devops/azure/devops/v7_0/notification/models.py rename to azure-devops/azure/devops/v7_2/notification/models.py index 3449b8c4..c3a3147d 100644 --- a/azure-devops/azure/devops/v7_0/notification/models.py +++ b/azure-devops/azure/devops/v7_2/notification/models.py @@ -33,7 +33,7 @@ class BatchNotificationOperation(Model): :param notification_operation: :type notification_operation: object :param notification_query_conditions: - :type notification_query_conditions: list of :class:`NotificationQueryCondition ` + :type notification_query_conditions: list of :class:`NotificationQueryCondition ` """ _attribute_map = { @@ -224,10 +224,12 @@ def __init__(self, end=None, level=None, start=None): class ExpressionFilterModel(Model): """ + This class represents the Subscription Filter associated with a subscription in a user readable format e.g. "filterModel":{ "clauses":[ { "logicalOperator":"", "fieldName":"PortfolioProject", "operator":"=", "value":"@@MyProjectName@@", "index":1 } ], "groups":[ ], "maxGroupLevel":0 } + :param clauses: Flat list of clauses in this subscription - :type clauses: list of :class:`ExpressionFilterClause ` + :type clauses: list of :class:`ExpressionFilterClause ` :param groups: Grouping of clauses in the subscription - :type groups: list of :class:`ExpressionFilterGroup ` + :type groups: list of :class:`ExpressionFilterGroup ` :param max_group_level: Max depth of the Subscription tree :type max_group_level: int """ @@ -248,7 +250,7 @@ def __init__(self, clauses=None, groups=None, max_group_level=None): class GraphSubjectBase(Model): """ :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. :type descriptor: str :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. @@ -275,7 +277,7 @@ def __init__(self, _links=None, descriptor=None, display_name=None, url=None): class IdentityRef(GraphSubjectBase): """ :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. :type descriptor: str :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. @@ -346,7 +348,7 @@ class INotificationDiagnosticLog(Model): :param log_type: Type of information being logged. :type log_type: str :param messages: List of log messages. - :type messages: list of :class:`NotificationDiagnosticLogMessage ` + :type messages: list of :class:`NotificationDiagnosticLogMessage ` :param properties: Dictionary of log properties and settings for the job. :type properties: dict :param source: This identifier depends on the logType. For notification jobs, this will be the job Id. For subscription tracing, this will be a special root Guid with the subscription Id encoded. @@ -412,7 +414,7 @@ class InputValues(Model): :param default_value: The default value to use for this input :type default_value: str :param error: Errors encountered while computing dynamic values. - :type error: :class:`InputValuesError ` + :type error: :class:`InputValuesError ` :param input_id: The id of the input :type input_id: str :param is_disabled: Should this input be disabled @@ -422,7 +424,7 @@ class InputValues(Model): :param is_read_only: Should this input be made read-only :type is_read_only: bool :param possible_values: Possible values that this input can take - :type possible_values: list of :class:`InputValue ` + :type possible_values: list of :class:`InputValue ` """ _attribute_map = { @@ -468,7 +470,7 @@ class InputValuesQuery(Model): :param current_values: :type current_values: dict :param input_values: The input values to return on input, and the result from the consumer on output. - :type input_values: list of :class:`InputValues ` + :type input_values: list of :class:`InputValues ` :param resource: Subscription containing information about the publisher/consumer and the current input values :type resource: object """ @@ -486,37 +488,37 @@ def __init__(self, current_values=None, input_values=None, resource=None): self.resource = resource -class ISubscriptionFilter(Model): +class ISubscriptionChannel(Model): """ - :param event_type: - :type event_type: str :param type: :type type: str """ _attribute_map = { - 'event_type': {'key': 'eventType', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'} } - def __init__(self, event_type=None, type=None): - super(ISubscriptionFilter, self).__init__() - self.event_type = event_type + def __init__(self, type=None): + super(ISubscriptionChannel, self).__init__() self.type = type -class ISubscriptionChannel(Model): +class ISubscriptionFilter(Model): """ + :param event_type: + :type event_type: str :param type: :type type: str """ _attribute_map = { + 'event_type': {'key': 'eventType', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'} } - def __init__(self, type=None): - super(ISubscriptionChannel, self).__init__() + def __init__(self, event_type=None, type=None): + super(ISubscriptionFilter, self).__init__() + self.event_type = event_type self.type = type @@ -578,7 +580,7 @@ class NotificationEventField(Model): Encapsulates the properties of a filterable field. A filterable field is a field in an event that can used to filter notifications for a certain event type. :param field_type: Gets or sets the type of this field. - :type field_type: :class:`NotificationEventFieldType ` + :type field_type: :class:`NotificationEventFieldType ` :param id: Gets or sets the unique identifier of this field. :type id: str :param name: Gets or sets the name of this field. @@ -634,13 +636,13 @@ class NotificationEventFieldType(Model): :param id: Gets or sets the unique identifier of this field type. :type id: str :param operator_constraints: - :type operator_constraints: list of :class:`OperatorConstraint ` + :type operator_constraints: list of :class:`OperatorConstraint ` :param operators: Gets or sets the list of operators that this type supports. - :type operators: list of :class:`NotificationEventFieldOperator ` + :type operators: list of :class:`NotificationEventFieldOperator ` :param subscription_field_type: :type subscription_field_type: object :param value: Gets or sets the value definition of this field like the getValuesMethod and template to display in the UI - :type value: :class:`ValueDefinition ` + :type value: :class:`ValueDefinition ` """ _attribute_map = { @@ -667,7 +669,7 @@ class NotificationEventPublisher(Model): :param id: :type id: str :param subscription_management_info: - :type subscription_management_info: :class:`SubscriptionManagement ` + :type subscription_management_info: :class:`SubscriptionManagement ` :param url: :type url: str """ @@ -715,13 +717,13 @@ class NotificationEventType(Model): Encapsulates the properties of an event type. It defines the fields, that can be used for filtering, for that event type. :param category: - :type category: :class:`NotificationEventTypeCategory ` + :type category: :class:`NotificationEventTypeCategory ` :param color: Gets or sets the color representing this event type. Example: rgb(128,245,211) or #fafafa :type color: str :param custom_subscriptions_allowed: :type custom_subscriptions_allowed: bool :param event_publisher: - :type event_publisher: :class:`NotificationEventPublisher ` + :type event_publisher: :class:`NotificationEventPublisher ` :param fields: :type fields: dict :param has_initiator: @@ -733,7 +735,7 @@ class NotificationEventType(Model): :param name: Gets or sets the name of this event definition. :type name: str :param roles: - :type roles: list of :class:`NotificationEventRole ` + :type roles: list of :class:`NotificationEventRole ` :param supported_scopes: Gets or sets the scopes that this event type supports :type supported_scopes: list of str :param url: Gets or sets the rest end point to get this event type details (fields, fields types) @@ -824,7 +826,7 @@ class NotificationReason(Model): :param notification_reason_type: :type notification_reason_type: object :param target_identities: - :type target_identities: list of :class:`IdentityRef ` + :type target_identities: list of :class:`IdentityRef ` """ _attribute_map = { @@ -866,7 +868,7 @@ class NotificationStatistic(Model): :param type: :type type: object :param user: - :type user: :class:`IdentityRef ` + :type user: :class:`IdentityRef ` """ _attribute_map = { @@ -889,7 +891,7 @@ def __init__(self, date=None, hit_count=None, path=None, type=None, user=None): class NotificationStatisticsQuery(Model): """ :param conditions: - :type conditions: list of :class:`NotificationStatisticsQueryConditions ` + :type conditions: list of :class:`NotificationStatisticsQueryConditions ` """ _attribute_map = { @@ -914,7 +916,7 @@ class NotificationStatisticsQueryConditions(Model): :param type: :type type: object :param user: - :type user: :class:`IdentityRef ` + :type user: :class:`IdentityRef ` """ _attribute_map = { @@ -991,52 +993,52 @@ class NotificationSubscription(Model): A subscription defines criteria for matching events and how the subscription's subscriber should be notified about those events. :param _links: Links to related resources, APIs, and views for the subscription. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param admin_settings: Admin-managed settings for the subscription. Only applies when the subscriber is a group. - :type admin_settings: :class:`SubscriptionAdminSettings ` + :type admin_settings: :class:`SubscriptionAdminSettings ` + :param channel: Channel for delivering notifications triggered by the subscription. + :type channel: :class:`ISubscriptionChannel ` :param description: Description of the subscription. Typically describes filter criteria which helps identity the subscription. :type description: str :param diagnostics: Diagnostics for this subscription. - :type diagnostics: :class:`SubscriptionDiagnostics ` + :type diagnostics: :class:`SubscriptionDiagnostics ` :param extended_properties: Any extra properties like detailed description for different contexts, user/group contexts :type extended_properties: dict :param filter: Matching criteria for the subscription. ExpressionFilter - :type filter: :class:`ISubscriptionFilter ` + :type filter: :class:`ISubscriptionFilter ` :param flags: Read-only indicators that further describe the subscription. :type flags: object - :param channel: Channel for delivering notifications triggered by the subscription. - :type channel: :class:`ISubscriptionChannel ` :param id: Subscription identifier. :type id: str :param last_modified_by: User that last modified (or created) the subscription. - :type last_modified_by: :class:`IdentityRef ` + :type last_modified_by: :class:`IdentityRef ` :param modified_date: Date when the subscription was last modified. If the subscription has not been updated since it was created, this value will indicate when the subscription was created. :type modified_date: datetime :param permissions: The permissions the user have for this subscriptions. :type permissions: object :param scope: The container in which events must be published from in order to be matched by the subscription. If empty, the scope is the current host (typically an account or project collection). For example, a subscription scoped to project A will not produce notifications for events published from project B. - :type scope: :class:`SubscriptionScope ` + :type scope: :class:`SubscriptionScope ` :param status: Status of the subscription. Typically indicates whether the subscription is enabled or not. :type status: object :param status_message: Message that provides more details about the status of the subscription. :type status_message: str :param subscriber: User or group that will receive notifications for events matching the subscription's filter criteria. - :type subscriber: :class:`IdentityRef ` - :param url: REST API URL of the subscriotion. + :type subscriber: :class:`IdentityRef ` + :param url: REST API URL of the subscription. :type url: str :param user_settings: User-managed settings for the subscription. Only applies when the subscriber is a group. Typically used to indicate whether the calling user is opted in or out of a group subscription. - :type user_settings: :class:`SubscriptionUserSettings ` + :type user_settings: :class:`SubscriptionUserSettings ` """ _attribute_map = { '_links': {'key': '_links', 'type': 'ReferenceLinks'}, 'admin_settings': {'key': 'adminSettings', 'type': 'SubscriptionAdminSettings'}, + 'channel': {'key': 'channel', 'type': 'ISubscriptionChannel'}, 'description': {'key': 'description', 'type': 'str'}, 'diagnostics': {'key': 'diagnostics', 'type': 'SubscriptionDiagnostics'}, 'extended_properties': {'key': 'extendedProperties', 'type': '{str}'}, 'filter': {'key': 'filter', 'type': 'ISubscriptionFilter'}, 'flags': {'key': 'flags', 'type': 'object'}, - 'channel': {'key': 'channel', 'type': 'ISubscriptionChannel'}, 'id': {'key': 'id', 'type': 'str'}, 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'IdentityRef'}, 'modified_date': {'key': 'modifiedDate', 'type': 'iso-8601'}, @@ -1049,16 +1051,16 @@ class NotificationSubscription(Model): 'user_settings': {'key': 'userSettings', 'type': 'SubscriptionUserSettings'} } - def __init__(self, _links=None, admin_settings=None, description=None, diagnostics=None, extended_properties=None, filter=None, flags=None, channel=None, id=None, last_modified_by=None, modified_date=None, permissions=None, scope=None, status=None, status_message=None, subscriber=None, url=None, user_settings=None): + def __init__(self, _links=None, admin_settings=None, channel=None, description=None, diagnostics=None, extended_properties=None, filter=None, flags=None, id=None, last_modified_by=None, modified_date=None, permissions=None, scope=None, status=None, status_message=None, subscriber=None, url=None, user_settings=None): super(NotificationSubscription, self).__init__() self._links = _links self.admin_settings = admin_settings + self.channel = channel self.description = description self.diagnostics = diagnostics self.extended_properties = extended_properties self.filter = filter self.flags = flags - self.channel = channel self.id = id self.last_modified_by = last_modified_by self.modified_date = modified_date @@ -1075,31 +1077,31 @@ class NotificationSubscriptionCreateParameters(Model): """ Parameters for creating a new subscription. A subscription defines criteria for matching events and how the subscription's subscriber should be notified about those events. + :param channel: Channel for delivering notifications triggered by the new subscription. + :type channel: :class:`ISubscriptionChannel ` :param description: Brief description for the new subscription. Typically describes filter criteria which helps identity the subscription. :type description: str :param filter: Matching criteria for the new subscription. ExpressionFilter - :type filter: :class:`ISubscriptionFilter ` - :param channel: Channel for delivering notifications triggered by the new subscription. - :type channel: :class:`ISubscriptionChannel ` + :type filter: :class:`ISubscriptionFilter ` :param scope: The container in which events must be published from in order to be matched by the new subscription. If not specified, defaults to the current host (typically an account or project collection). For example, a subscription scoped to project A will not produce notifications for events published from project B. - :type scope: :class:`SubscriptionScope ` + :type scope: :class:`SubscriptionScope ` :param subscriber: User or group that will receive notifications for events matching the subscription's filter criteria. If not specified, defaults to the calling user. - :type subscriber: :class:`IdentityRef ` + :type subscriber: :class:`IdentityRef ` """ _attribute_map = { + 'channel': {'key': 'channel', 'type': 'ISubscriptionChannel'}, 'description': {'key': 'description', 'type': 'str'}, 'filter': {'key': 'filter', 'type': 'ISubscriptionFilter'}, - 'channel': {'key': 'channel', 'type': 'ISubscriptionChannel'}, 'scope': {'key': 'scope', 'type': 'SubscriptionScope'}, 'subscriber': {'key': 'subscriber', 'type': 'IdentityRef'} } - def __init__(self, description=None, filter=None, channel=None, scope=None, subscriber=None): + def __init__(self, channel=None, description=None, filter=None, scope=None, subscriber=None): super(NotificationSubscriptionCreateParameters, self).__init__() + self.channel = channel self.description = description self.filter = filter - self.channel = channel self.scope = scope self.subscriber = subscriber @@ -1109,11 +1111,11 @@ class NotificationSubscriptionTemplate(Model): :param description: :type description: str :param filter: - :type filter: :class:`ISubscriptionFilter ` + :type filter: :class:`ISubscriptionFilter ` :param id: :type id: str :param notification_event_information: - :type notification_event_information: :class:`NotificationEventType ` + :type notification_event_information: :class:`NotificationEventType ` :param type: :type type: object """ @@ -1140,40 +1142,40 @@ class NotificationSubscriptionUpdateParameters(Model): Parameters for updating an existing subscription. A subscription defines criteria for matching events and how the subscription's subscriber should be notified about those events. Note: only the fields to be updated should be set. :param admin_settings: Admin-managed settings for the subscription. Only applies to subscriptions where the subscriber is a group. - :type admin_settings: :class:`SubscriptionAdminSettings ` + :type admin_settings: :class:`SubscriptionAdminSettings ` + :param channel: Channel for delivering notifications triggered by the subscription. + :type channel: :class:`ISubscriptionChannel ` :param description: Updated description for the subscription. Typically describes filter criteria which helps identity the subscription. :type description: str :param filter: Matching criteria for the subscription. ExpressionFilter - :type filter: :class:`ISubscriptionFilter ` - :param channel: Channel for delivering notifications triggered by the subscription. - :type channel: :class:`ISubscriptionChannel ` + :type filter: :class:`ISubscriptionFilter ` :param scope: The container in which events must be published from in order to be matched by the new subscription. If not specified, defaults to the current host (typically the current account or project collection). For example, a subscription scoped to project A will not produce notifications for events published from project B. - :type scope: :class:`SubscriptionScope ` + :type scope: :class:`SubscriptionScope ` :param status: Updated status for the subscription. Typically used to enable or disable a subscription. :type status: object :param status_message: Optional message that provides more details about the updated status. :type status_message: str :param user_settings: User-managed settings for the subscription. Only applies to subscriptions where the subscriber is a group. Typically used to opt-in or opt-out a user from a group subscription. - :type user_settings: :class:`SubscriptionUserSettings ` + :type user_settings: :class:`SubscriptionUserSettings ` """ _attribute_map = { 'admin_settings': {'key': 'adminSettings', 'type': 'SubscriptionAdminSettings'}, + 'channel': {'key': 'channel', 'type': 'ISubscriptionChannel'}, 'description': {'key': 'description', 'type': 'str'}, 'filter': {'key': 'filter', 'type': 'ISubscriptionFilter'}, - 'channel': {'key': 'channel', 'type': 'ISubscriptionChannel'}, 'scope': {'key': 'scope', 'type': 'SubscriptionScope'}, 'status': {'key': 'status', 'type': 'object'}, 'status_message': {'key': 'statusMessage', 'type': 'str'}, 'user_settings': {'key': 'userSettings', 'type': 'SubscriptionUserSettings'} } - def __init__(self, admin_settings=None, description=None, filter=None, channel=None, scope=None, status=None, status_message=None, user_settings=None): + def __init__(self, admin_settings=None, channel=None, description=None, filter=None, scope=None, status=None, status_message=None, user_settings=None): super(NotificationSubscriptionUpdateParameters, self).__init__() self.admin_settings = admin_settings + self.channel = channel self.description = description self.filter = filter - self.channel = channel self.scope = scope self.status = status self.status_message = status_message @@ -1235,16 +1237,39 @@ def __init__(self, block_user_opt_out=None): self.block_user_opt_out = block_user_opt_out +class SubscriptionChannelWithAddress(Model): + """ + :param address: + :type address: str + :param type: + :type type: str + :param use_custom_address: + :type use_custom_address: bool + """ + + _attribute_map = { + 'address': {'key': 'address', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'use_custom_address': {'key': 'useCustomAddress', 'type': 'bool'} + } + + def __init__(self, address=None, type=None, use_custom_address=None): + super(SubscriptionChannelWithAddress, self).__init__() + self.address = address + self.type = type + self.use_custom_address = use_custom_address + + class SubscriptionDiagnostics(Model): """ Contains all the diagnostics settings for a subscription. :param delivery_results: Diagnostics settings for retaining delivery results. Used for Service Hooks subscriptions. - :type delivery_results: :class:`SubscriptionTracing ` + :type delivery_results: :class:`SubscriptionTracing ` :param delivery_tracing: Diagnostics settings for troubleshooting notification delivery. - :type delivery_tracing: :class:`SubscriptionTracing ` + :type delivery_tracing: :class:`SubscriptionTracing ` :param evaluation_tracing: Diagnostics settings for troubleshooting event matching. - :type evaluation_tracing: :class:`SubscriptionTracing ` + :type evaluation_tracing: :class:`SubscriptionTracing ` """ _attribute_map = { @@ -1267,7 +1292,7 @@ class SubscriptionEvaluationRequest(Model): :param min_events_created_date: The min created date for the events used for matching in UTC. Use all events created since this date :type min_events_created_date: datetime :param subscription_create_parameters: User or group that will receive notifications for events matching the subscription's filter criteria. If not specified, defaults to the calling user. - :type subscription_create_parameters: :class:`NotificationSubscriptionCreateParameters ` + :type subscription_create_parameters: :class:`NotificationSubscriptionCreateParameters ` """ _attribute_map = { @@ -1288,11 +1313,11 @@ class SubscriptionEvaluationResult(Model): :param evaluation_job_status: Subscription evaluation job status :type evaluation_job_status: object :param events: Subscription evaluation events results. - :type events: :class:`EventsEvaluationResult ` + :type events: :class:`EventsEvaluationResult ` :param id: The requestId which is the subscription evaluation jobId :type id: str :param notifications: Subscription evaluation notification results. - :type notifications: :class:`NotificationsEvaluationResult ` + :type notifications: :class:`NotificationsEvaluationResult ` """ _attribute_map = { @@ -1339,29 +1364,6 @@ def __init__(self, enabled=None, interval=None, threshold=None, time_out=None): self.time_out = time_out -class SubscriptionChannelWithAddress(Model): - """ - :param address: - :type address: str - :param type: - :type type: str - :param use_custom_address: - :type use_custom_address: bool - """ - - _attribute_map = { - 'address': {'key': 'address', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'use_custom_address': {'key': 'useCustomAddress', 'type': 'bool'} - } - - def __init__(self, address=None, type=None, use_custom_address=None): - super(SubscriptionChannelWithAddress, self).__init__() - self.address = address - self.type = type - self.use_custom_address = use_custom_address - - class SubscriptionManagement(Model): """ Encapsulates the properties needed to manage subscriptions, opt in and out of subscriptions. @@ -1388,7 +1390,7 @@ class SubscriptionQuery(Model): Notification subscriptions query input. :param conditions: One or more conditions to query on. If more than 2 conditions are specified, the combined results of each condition is returned (i.e. conditions are logically OR'ed). - :type conditions: list of :class:`SubscriptionQueryCondition ` + :type conditions: list of :class:`SubscriptionQueryCondition ` :param query_flags: Flags the refine the types of subscriptions that will be returned from the query. :type query_flags: object """ @@ -1409,8 +1411,8 @@ class SubscriptionQueryCondition(Model): Conditions a subscription must match to qualify for the query result set. Not all fields are required. A subscription must match all conditions specified in order to qualify for the result set. :param filter: Filter conditions that matching subscriptions must have. Typically only the filter's type and event type are used for matching. - :type filter: :class:`ISubscriptionFilter ` - :param flags: Flags to specify the the type subscriptions to query for. + :type filter: :class:`ISubscriptionFilter ` + :param flags: Flags to specify the type subscriptions to query for. :type flags: object :param scope: Scope that matching subscriptions must have. :type scope: str @@ -1514,11 +1516,11 @@ class UpdateSubscripitonDiagnosticsParameters(Model): Parameters to update diagnostics settings for a subscription. :param delivery_results: Diagnostics settings for retaining delivery results. Used for Service Hooks subscriptions. - :type delivery_results: :class:`UpdateSubscripitonTracingParameters ` + :type delivery_results: :class:`UpdateSubscripitonTracingParameters ` :param delivery_tracing: Diagnostics settings for troubleshooting notification delivery. - :type delivery_tracing: :class:`UpdateSubscripitonTracingParameters ` + :type delivery_tracing: :class:`UpdateSubscripitonTracingParameters ` :param evaluation_tracing: Diagnostics settings for troubleshooting event matching. - :type evaluation_tracing: :class:`UpdateSubscripitonTracingParameters ` + :type evaluation_tracing: :class:`UpdateSubscripitonTracingParameters ` """ _attribute_map = { @@ -1556,7 +1558,7 @@ class ValueDefinition(Model): Encapsulates the properties of a field value definition. It has the information needed to retrieve the list of possible values for a certain field and how to handle that field values in the UI. This information includes what type of object this value represents, which property to use for UI display and which property to use for saving the subscription :param data_source: Gets or sets the data source. - :type data_source: list of :class:`InputValue ` + :type data_source: list of :class:`InputValue ` :param end_point: Gets or sets the rest end point. :type end_point: str :param result_template: Gets or sets the result template. @@ -1581,7 +1583,7 @@ class VssNotificationEvent(Model): This is the type used for firing notifications intended for the subsystem in the Notifications SDK. For components that can't take a dependency on the Notifications SDK directly, they can use ITeamFoundationEventService.PublishNotification and the Notifications SDK ISubscriber implementation will get it. :param actors: Optional: A list of actors which are additional identities with corresponding roles that are relevant to the event. - :type actors: list of :class:`EventActor ` + :type actors: list of :class:`EventActor ` :param artifact_uris: Optional: A list of artifacts referenced or impacted by this event. :type artifact_uris: list of str :param data: Required: The event payload. If Data is a string, it must be in Json or XML format. Otherwise it must have a serialization format attribute. @@ -1594,8 +1596,8 @@ class VssNotificationEvent(Model): :type item_id: str :param process_delay: How long to wait before processing this event. The default is to process immediately. :type process_delay: object - :param scopes: Optional: A list of scopes which are are relevant to the event. - :type scopes: list of :class:`EventScope ` + :param scopes: Optional: A list of scopes which are relevant to the event. + :type scopes: list of :class:`EventScope ` :param source_event_created_time: This is the time the original source event for this VssNotificationEvent was created. For example, for something like a build completion notification SourceEventCreatedTime should be the time the build finished not the time this event was raised. :type source_event_created_time: datetime """ @@ -1662,7 +1664,7 @@ class FieldInputValues(InputValues): :param default_value: The default value to use for this input :type default_value: str :param error: Errors encountered while computing dynamic values. - :type error: :class:`InputValuesError ` + :type error: :class:`InputValuesError ` :param input_id: The id of the input :type input_id: str :param is_disabled: Should this input be disabled @@ -1672,7 +1674,7 @@ class FieldInputValues(InputValues): :param is_read_only: Should this input be made read-only :type is_read_only: bool :param possible_values: Possible values that this input can take - :type possible_values: list of :class:`InputValue ` + :type possible_values: list of :class:`InputValue ` :param operators: :type operators: str """ @@ -1700,7 +1702,7 @@ class FieldValuesQuery(InputValuesQuery): :param resource: Subscription containing information about the publisher/consumer and the current input values :type resource: object :param input_values: - :type input_values: list of :class:`FieldInputValues ` + :type input_values: list of :class:`FieldInputValues ` :param scope: :type scope: str """ @@ -1736,8 +1738,8 @@ def __init__(self, current_values=None, resource=None, input_values=None, scope= 'InputValues', 'InputValuesError', 'InputValuesQuery', - 'ISubscriptionFilter', 'ISubscriptionChannel', + 'ISubscriptionFilter', 'NotificationAdminSettings', 'NotificationAdminSettingsUpdateParameters', 'NotificationDiagnosticLogMessage', @@ -1763,11 +1765,11 @@ def __init__(self, current_values=None, resource=None, input_values=None, scope= 'OperatorConstraint', 'ReferenceLinks', 'SubscriptionAdminSettings', + 'SubscriptionChannelWithAddress', 'SubscriptionDiagnostics', 'SubscriptionEvaluationRequest', 'SubscriptionEvaluationResult', 'SubscriptionEvaluationSettings', - 'SubscriptionChannelWithAddress', 'SubscriptionManagement', 'SubscriptionQuery', 'SubscriptionQueryCondition', diff --git a/azure-devops/azure/devops/v7_0/notification/notification_client.py b/azure-devops/azure/devops/v7_2/notification/notification_client.py similarity index 79% rename from azure-devops/azure/devops/v7_0/notification/notification_client.py rename to azure-devops/azure/devops/v7_2/notification/notification_client.py index fd44a96e..c4ab0e65 100644 --- a/azure-devops/azure/devops/v7_0/notification/notification_client.py +++ b/azure-devops/azure/devops/v7_2/notification/notification_client.py @@ -27,7 +27,7 @@ def __init__(self, base_url=None, creds=None): def list_logs(self, source, entry_id=None, start_time=None, end_time=None): """ListLogs. - Get a list of diagnostic logs for this service. + [Preview API] Get a list of diagnostic logs for this service. :param str source: ID specifying which type of logs to check diagnostics for. :param str entry_id: The ID of the specific log to query for. :param datetime start_time: Start time for the time range to query in. @@ -46,32 +46,32 @@ def list_logs(self, source, entry_id=None, start_time=None, end_time=None): query_parameters['endTime'] = self._serialize.query('end_time', end_time, 'iso-8601') response = self._send(http_method='GET', location_id='991842f3-eb16-4aea-ac81-81353ef2b75c', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[INotificationDiagnosticLog]', self._unwrap_collection(response)) def get_subscription_diagnostics(self, subscription_id): """GetSubscriptionDiagnostics. - Get the diagnostics settings for a subscription. + [Preview API] Get the diagnostics settings for a subscription. :param str subscription_id: The id of the notifications subscription. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if subscription_id is not None: route_values['subscriptionId'] = self._serialize.url('subscription_id', subscription_id, 'str') response = self._send(http_method='GET', location_id='20f1929d-4be7-4c2e-a74e-d47640ff3418', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('SubscriptionDiagnostics', response) def update_subscription_diagnostics(self, update_parameters, subscription_id): """UpdateSubscriptionDiagnostics. - Update the diagnostics settings for a subscription. - :param :class:` ` update_parameters: + [Preview API] Update the diagnostics settings for a subscription. + :param :class:` ` update_parameters: :param str subscription_id: The id of the notifications subscription. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if subscription_id is not None: @@ -79,29 +79,29 @@ def update_subscription_diagnostics(self, update_parameters, subscription_id): content = self._serialize.body(update_parameters, 'UpdateSubscripitonDiagnosticsParameters') response = self._send(http_method='PUT', location_id='20f1929d-4be7-4c2e-a74e-d47640ff3418', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('SubscriptionDiagnostics', response) def get_event_type(self, event_type): """GetEventType. - Get a specific event type. + [Preview API] Get a specific event type. :param str event_type: The ID of the event type. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if event_type is not None: route_values['eventType'] = self._serialize.url('event_type', event_type, 'str') response = self._send(http_method='GET', location_id='cc84fb5f-6247-4c7a-aeae-e5a3c3fddb21', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('NotificationEventType', response) def list_event_types(self, publisher_id=None): """ListEventTypes. - List available event types for this service. Optionally filter by only event types for the specified publisher. + [Preview API] List available event types for this service. Optionally filter by only event types for the specified publisher. :param str publisher_id: Limit to event types for this publisher :rtype: [NotificationEventType] """ @@ -110,52 +110,54 @@ def list_event_types(self, publisher_id=None): query_parameters['publisherId'] = self._serialize.query('publisher_id', publisher_id, 'str') response = self._send(http_method='GET', location_id='cc84fb5f-6247-4c7a-aeae-e5a3c3fddb21', - version='7.0', + version='7.2-preview.1', query_parameters=query_parameters) return self._deserialize('[NotificationEventType]', self._unwrap_collection(response)) def get_settings(self): """GetSettings. - :rtype: :class:` ` + [Preview API] + :rtype: :class:` ` """ response = self._send(http_method='GET', location_id='cbe076d8-2803-45ff-8d8d-44653686ea2a', - version='7.0') + version='7.2-preview.1') return self._deserialize('NotificationAdminSettings', response) def update_settings(self, update_parameters): """UpdateSettings. - :param :class:` ` update_parameters: - :rtype: :class:` ` + [Preview API] + :param :class:` ` update_parameters: + :rtype: :class:` ` """ content = self._serialize.body(update_parameters, 'NotificationAdminSettingsUpdateParameters') response = self._send(http_method='PATCH', location_id='cbe076d8-2803-45ff-8d8d-44653686ea2a', - version='7.0', + version='7.2-preview.1', content=content) return self._deserialize('NotificationAdminSettings', response) def get_subscriber(self, subscriber_id): """GetSubscriber. - Get delivery preferences of a notifications subscriber. + [Preview API] Get delivery preferences of a notifications subscriber. :param str subscriber_id: ID of the user or group. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if subscriber_id is not None: route_values['subscriberId'] = self._serialize.url('subscriber_id', subscriber_id, 'str') response = self._send(http_method='GET', location_id='4d5caff1-25ba-430b-b808-7a1f352cc197', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('NotificationSubscriber', response) def update_subscriber(self, update_parameters, subscriber_id): """UpdateSubscriber. - Update delivery preferences of a notifications subscriber. - :param :class:` ` update_parameters: + [Preview API] Update delivery preferences of a notifications subscriber. + :param :class:` ` update_parameters: :param str subscriber_id: ID of the user or group. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if subscriber_id is not None: @@ -163,40 +165,40 @@ def update_subscriber(self, update_parameters, subscriber_id): content = self._serialize.body(update_parameters, 'NotificationSubscriberUpdateParameters') response = self._send(http_method='PATCH', location_id='4d5caff1-25ba-430b-b808-7a1f352cc197', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('NotificationSubscriber', response) def query_subscriptions(self, subscription_query): """QuerySubscriptions. - Query for subscriptions. A subscription is returned if it matches one or more of the specified conditions. - :param :class:` ` subscription_query: + [Preview API] Query for subscriptions. A subscription is returned if it matches one or more of the specified conditions. + :param :class:` ` subscription_query: :rtype: [NotificationSubscription] """ content = self._serialize.body(subscription_query, 'SubscriptionQuery') response = self._send(http_method='POST', location_id='6864db85-08c0-4006-8e8e-cc1bebe31675', - version='7.0', + version='7.2-preview.1', content=content) return self._deserialize('[NotificationSubscription]', self._unwrap_collection(response)) def create_subscription(self, create_parameters): """CreateSubscription. - Create a new subscription. - :param :class:` ` create_parameters: - :rtype: :class:` ` + [Preview API] Create a new subscription. + :param :class:` ` create_parameters: + :rtype: :class:` ` """ content = self._serialize.body(create_parameters, 'NotificationSubscriptionCreateParameters') response = self._send(http_method='POST', location_id='70f911d6-abac-488c-85b3-a206bf57e165', - version='7.0', + version='7.2-preview.1', content=content) return self._deserialize('NotificationSubscription', response) def delete_subscription(self, subscription_id): """DeleteSubscription. - Delete a subscription. + [Preview API] Delete a subscription. :param str subscription_id: """ route_values = {} @@ -204,15 +206,15 @@ def delete_subscription(self, subscription_id): route_values['subscriptionId'] = self._serialize.url('subscription_id', subscription_id, 'str') self._send(http_method='DELETE', location_id='70f911d6-abac-488c-85b3-a206bf57e165', - version='7.0', + version='7.2-preview.1', route_values=route_values) def get_subscription(self, subscription_id, query_flags=None): """GetSubscription. - Get a notification subscription by its ID. + [Preview API] Get a notification subscription by its ID. :param str subscription_id: :param str query_flags: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if subscription_id is not None: @@ -222,14 +224,14 @@ def get_subscription(self, subscription_id, query_flags=None): query_parameters['queryFlags'] = self._serialize.query('query_flags', query_flags, 'str') response = self._send(http_method='GET', location_id='70f911d6-abac-488c-85b3-a206bf57e165', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('NotificationSubscription', response) def list_subscriptions(self, target_id=None, ids=None, query_flags=None): """ListSubscriptions. - Get a list of notification subscriptions, either by subscription IDs or by all subscriptions for a given user or group. + [Preview API] Get a list of notification subscriptions, either by subscription IDs or by all subscriptions for a given user or group. :param str target_id: User or Group ID :param [str] ids: List of subscription IDs :param str query_flags: @@ -245,16 +247,16 @@ def list_subscriptions(self, target_id=None, ids=None, query_flags=None): query_parameters['queryFlags'] = self._serialize.query('query_flags', query_flags, 'str') response = self._send(http_method='GET', location_id='70f911d6-abac-488c-85b3-a206bf57e165', - version='7.0', + version='7.2-preview.1', query_parameters=query_parameters) return self._deserialize('[NotificationSubscription]', self._unwrap_collection(response)) def update_subscription(self, update_parameters, subscription_id): """UpdateSubscription. - Update an existing subscription. Depending on the type of subscription and permissions, the caller can update the description, filter settings, channel (delivery) settings and more. - :param :class:` ` update_parameters: + [Preview API] Update an existing subscription. Depending on the type of subscription and permissions, the caller can update the description, filter settings, channel (delivery) settings and more. + :param :class:` ` update_parameters: :param str subscription_id: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if subscription_id is not None: @@ -262,28 +264,28 @@ def update_subscription(self, update_parameters, subscription_id): content = self._serialize.body(update_parameters, 'NotificationSubscriptionUpdateParameters') response = self._send(http_method='PATCH', location_id='70f911d6-abac-488c-85b3-a206bf57e165', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('NotificationSubscription', response) def get_subscription_templates(self): """GetSubscriptionTemplates. - Get available subscription templates. + [Preview API] Get available subscription templates. :rtype: [NotificationSubscriptionTemplate] """ response = self._send(http_method='GET', location_id='fa5d24ba-7484-4f3d-888d-4ec6b1974082', - version='7.0') + version='7.2-preview.1') return self._deserialize('[NotificationSubscriptionTemplate]', self._unwrap_collection(response)) def update_subscription_user_settings(self, user_settings, subscription_id, user_id): """UpdateSubscriptionUserSettings. - Update the specified user's settings for the specified subscription. This API is typically used to opt in or out of a shared subscription. User settings can only be applied to shared subscriptions, like team subscriptions or default subscriptions. - :param :class:` ` user_settings: + [Preview API] Update the specified user's settings for the specified subscription. This API is typically used to opt in or out of a shared subscription. User settings can only be applied to shared subscriptions, like team subscriptions or default subscriptions. + :param :class:` ` user_settings: :param str subscription_id: :param str user_id: ID of the user - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if subscription_id is not None: @@ -293,7 +295,7 @@ def update_subscription_user_settings(self, user_settings, subscription_id, user content = self._serialize.body(user_settings, 'SubscriptionUserSettings') response = self._send(http_method='PUT', location_id='ed5a3dff-aeb5-41b1-b4f7-89e66e58b62e', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('SubscriptionUserSettings', response) diff --git a/azure-devops/azure/devops/v7_0/npm/__init__.py b/azure-devops/azure/devops/v7_2/npm/__init__.py similarity index 100% rename from azure-devops/azure/devops/v7_0/npm/__init__.py rename to azure-devops/azure/devops/v7_2/npm/__init__.py diff --git a/azure-devops/azure/devops/v7_0/npm/models.py b/azure-devops/azure/devops/v7_2/npm/models.py similarity index 97% rename from azure-devops/azure/devops/v7_0/npm/models.py rename to azure-devops/azure/devops/v7_2/npm/models.py index 3bf71816..d72cc612 100644 --- a/azure-devops/azure/devops/v7_0/npm/models.py +++ b/azure-devops/azure/devops/v7_2/npm/models.py @@ -77,11 +77,11 @@ class NpmPackagesBatchRequest(Model): A batch of operations to apply to package versions. :param data: Data required to perform the operation. This is optional based on type of operation. Use BatchPromoteData if performing a promote operation. - :type data: :class:`BatchOperationData ` + :type data: :class:`BatchOperationData ` :param operation: Type of operation that needs to be performed on packages. :type operation: object :param packages: The packages onto which the operation will be performed. - :type packages: list of :class:`MinimalPackageDetails ` + :type packages: list of :class:`MinimalPackageDetails ` """ _attribute_map = { @@ -142,7 +142,7 @@ class Package(Model): Package version metadata for an npm package :param _links: Related REST links. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param deprecate_message: Deprecated message, if any, for the package. :type deprecate_message: str :param id: Package Id. @@ -152,7 +152,7 @@ class Package(Model): :param permanently_deleted_date: If and when the package was permanently deleted. :type permanently_deleted_date: datetime :param source_chain: The history of upstream sources for this package. The first source in the list is the immediate source from which this package was saved. - :type source_chain: list of :class:`UpstreamSourceInfo ` + :type source_chain: list of :class:`UpstreamSourceInfo ` :param unpublished_date: If and when the package was deleted. :type unpublished_date: datetime :param version: The version of the package. @@ -187,7 +187,7 @@ class PackageVersionDetails(Model): :param deprecate_message: Indicates the deprecate message of a package version :type deprecate_message: str :param views: The view to which the package version will be added - :type views: :class:`JsonPatchOperation ` + :type views: :class:`JsonPatchOperation ` """ _attribute_map = { diff --git a/azure-devops/azure/devops/v7_0/npm/npm_client.py b/azure-devops/azure/devops/v7_2/npm/npm_client.py similarity index 85% rename from azure-devops/azure/devops/v7_0/npm/npm_client.py rename to azure-devops/azure/devops/v7_2/npm/npm_client.py index a700639c..27d9f844 100644 --- a/azure-devops/azure/devops/v7_0/npm/npm_client.py +++ b/azure-devops/azure/devops/v7_2/npm/npm_client.py @@ -27,10 +27,11 @@ def __init__(self, base_url=None, creds=None): def get_content_scoped_package(self, feed_id, package_scope, unscoped_package_name, package_version, project=None, **kwargs): """GetContentScopedPackage. - :param str feed_id: - :param str package_scope: - :param str unscoped_package_name: - :param str package_version: + [Preview API] Get scoped npm package. + :param str feed_id: Name or ID of the feed. + :param str package_scope: Scope of the npm package (the @scope portion of @scope/packageName). + :param str unscoped_package_name: Name of the package without the scope component. + :param str package_version: Version of the package. :param str project: Project ID or project name :rtype: object """ @@ -47,7 +48,7 @@ def get_content_scoped_package(self, feed_id, package_scope, unscoped_package_na route_values['packageVersion'] = self._serialize.url('package_version', package_version, 'str') response = self._send(http_method='GET', location_id='09a4eafd-123a-495c-979c-0eda7bdb9a14', - version='7.0', + version='7.2-preview.1', route_values=route_values, accept_media_type='application/octet-stream') if "callback" in kwargs: @@ -58,7 +59,7 @@ def get_content_scoped_package(self, feed_id, package_scope, unscoped_package_na def get_content_unscoped_package(self, feed_id, package_name, package_version, project=None, **kwargs): """GetContentUnscopedPackage. - Get an unscoped npm package. + [Preview API] Get an unscoped npm package. :param str feed_id: Name or ID of the feed. :param str package_name: Name of the package. :param str package_version: Version of the package. @@ -76,7 +77,7 @@ def get_content_unscoped_package(self, feed_id, package_name, package_version, p route_values['packageVersion'] = self._serialize.url('package_version', package_version, 'str') response = self._send(http_method='GET', location_id='75caa482-cb1e-47cd-9f2c-c048a4b7a43e', - version='7.0', + version='7.2-preview.1', route_values=route_values, accept_media_type='application/octet-stream') if "callback" in kwargs: @@ -87,8 +88,8 @@ def get_content_unscoped_package(self, feed_id, package_name, package_version, p def update_packages(self, batch_request, feed_id, project=None): """UpdatePackages. - Update several packages from a single feed in a single request. The updates to the packages do not happen atomically. - :param :class:` ` batch_request: Information about the packages to update, the operation to perform, and its associated data. + [Preview API] Update several packages from a single feed in a single request. The updates to the packages do not happen atomically. + :param :class:` ` batch_request: Information about the packages to update, the operation to perform, and its associated data. :param str feed_id: Name or ID of the feed. :param str project: Project ID or project name """ @@ -100,13 +101,13 @@ def update_packages(self, batch_request, feed_id, project=None): content = self._serialize.body(batch_request, 'NpmPackagesBatchRequest') self._send(http_method='POST', location_id='06f34005-bbb2-41f4-88f5-23e03a99bb12', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) def get_readme_scoped_package(self, feed_id, package_scope, unscoped_package_name, package_version, project=None, **kwargs): """GetReadmeScopedPackage. - Get the Readme for a package version with an npm scope. + [Preview API] Get the Readme for a package version with an npm scope. :param str feed_id: Name or ID of the feed. :param str package_scope: Scope of the package (the 'scope' part of @scope\name) :param str unscoped_package_name: Name of the package (the 'name' part of @scope\name) @@ -127,7 +128,7 @@ def get_readme_scoped_package(self, feed_id, package_scope, unscoped_package_nam route_values['packageVersion'] = self._serialize.url('package_version', package_version, 'str') response = self._send(http_method='GET', location_id='6d4db777-7e4a-43b2-afad-779a1d197301', - version='7.0', + version='7.2-preview.1', route_values=route_values, accept_media_type='text/plain') if "callback" in kwargs: @@ -138,7 +139,7 @@ def get_readme_scoped_package(self, feed_id, package_scope, unscoped_package_nam def get_readme_unscoped_package(self, feed_id, package_name, package_version, project=None, **kwargs): """GetReadmeUnscopedPackage. - Get the Readme for a package version that has no npm scope. + [Preview API] Get the Readme for a package version that has no npm scope. :param str feed_id: Name or ID of the feed. :param str package_name: Name of the package. :param str package_version: Version of the package. @@ -156,7 +157,7 @@ def get_readme_unscoped_package(self, feed_id, package_name, package_version, pr route_values['packageVersion'] = self._serialize.url('package_version', package_version, 'str') response = self._send(http_method='GET', location_id='1099a396-b310-41d4-a4b6-33d134ce3fcf', - version='7.0', + version='7.2-preview.1', route_values=route_values, accept_media_type='text/plain') if "callback" in kwargs: @@ -167,8 +168,8 @@ def get_readme_unscoped_package(self, feed_id, package_name, package_version, pr def update_recycle_bin_packages(self, batch_request, feed_id, project=None): """UpdateRecycleBinPackages. - Delete or restore several package versions from the recycle bin. - :param :class:` ` batch_request: Information about the packages to update, the operation to perform, and its associated data. + [Preview API] Delete or restore several package versions from the recycle bin. + :param :class:` ` batch_request: Information about the packages to update, the operation to perform, and its associated data. :param str feed_id: Name or ID of the feed. :param str project: Project ID or project name """ @@ -180,13 +181,13 @@ def update_recycle_bin_packages(self, batch_request, feed_id, project=None): content = self._serialize.body(batch_request, 'NpmPackagesBatchRequest') self._send(http_method='POST', location_id='eefe03ef-a6a2-4a7a-a0ec-2e65a5efd64c', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) def delete_scoped_package_version_from_recycle_bin(self, feed_id, package_scope, unscoped_package_name, package_version, project=None): """DeleteScopedPackageVersionFromRecycleBin. - Delete a package version with an npm scope from the recycle bin. + [Preview API] Delete a package version with an npm scope from the recycle bin. :param str feed_id: Name or ID of the feed. :param str package_scope: Scope of the package (the 'scope' part of @scope/name). :param str unscoped_package_name: Name of the package (the 'name' part of @scope/name). @@ -206,18 +207,18 @@ def delete_scoped_package_version_from_recycle_bin(self, feed_id, package_scope, route_values['packageVersion'] = self._serialize.url('package_version', package_version, 'str') self._send(http_method='DELETE', location_id='220f45eb-94a5-432c-902a-5b8c6372e415', - version='7.0', + version='7.2-preview.1', route_values=route_values) def get_scoped_package_version_metadata_from_recycle_bin(self, feed_id, package_scope, unscoped_package_name, package_version, project=None): """GetScopedPackageVersionMetadataFromRecycleBin. - Get information about a scoped package version in the recycle bin. + [Preview API] Get information about a scoped package version in the recycle bin. :param str feed_id: Name or ID of the feed. :param str package_scope: Scope of the package (the 'scope' part of @scope/name) :param str unscoped_package_name: Name of the package (the 'name' part of @scope/name). :param str package_version: Version of the package. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -232,14 +233,14 @@ def get_scoped_package_version_metadata_from_recycle_bin(self, feed_id, package_ route_values['packageVersion'] = self._serialize.url('package_version', package_version, 'str') response = self._send(http_method='GET', location_id='220f45eb-94a5-432c-902a-5b8c6372e415', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('NpmPackageVersionDeletionState', response) def restore_scoped_package_version_from_recycle_bin(self, package_version_details, feed_id, package_scope, unscoped_package_name, package_version, project=None): """RestoreScopedPackageVersionFromRecycleBin. - Restore a package version with an npm scope from the recycle bin to its feed. - :param :class:` ` package_version_details: + [Preview API] Restore a package version with an npm scope from the recycle bin to its feed. + :param :class:` ` package_version_details: :param str feed_id: Name or ID of the feed. :param str package_scope: Scope of the package (the 'scope' part of @scope/name). :param str unscoped_package_name: Name of the package (the 'name' part of @scope/name). @@ -260,13 +261,13 @@ def restore_scoped_package_version_from_recycle_bin(self, package_version_detail content = self._serialize.body(package_version_details, 'NpmRecycleBinPackageVersionDetails') self._send(http_method='PATCH', location_id='220f45eb-94a5-432c-902a-5b8c6372e415', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) def delete_package_version_from_recycle_bin(self, feed_id, package_name, package_version, project=None): """DeletePackageVersionFromRecycleBin. - Delete a package version without an npm scope from the recycle bin. + [Preview API] Delete a package version without an npm scope from the recycle bin. :param str feed_id: Name or ID of the feed. :param str package_name: Name of the package. :param str package_version: Version of the package. @@ -283,17 +284,17 @@ def delete_package_version_from_recycle_bin(self, feed_id, package_name, package route_values['packageVersion'] = self._serialize.url('package_version', package_version, 'str') self._send(http_method='DELETE', location_id='63a4f31f-e92b-4ee4-bf92-22d485e73bef', - version='7.0', + version='7.2-preview.1', route_values=route_values) def get_package_version_metadata_from_recycle_bin(self, feed_id, package_name, package_version, project=None): """GetPackageVersionMetadataFromRecycleBin. - Get information about an unscoped package version in the recycle bin. + [Preview API] Get information about an unscoped package version in the recycle bin. :param str feed_id: Name or ID of the feed. :param str package_name: Name of the package. :param str package_version: Version of the package. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -306,14 +307,14 @@ def get_package_version_metadata_from_recycle_bin(self, feed_id, package_name, p route_values['packageVersion'] = self._serialize.url('package_version', package_version, 'str') response = self._send(http_method='GET', location_id='63a4f31f-e92b-4ee4-bf92-22d485e73bef', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('NpmPackageVersionDeletionState', response) def restore_package_version_from_recycle_bin(self, package_version_details, feed_id, package_name, package_version, project=None): """RestorePackageVersionFromRecycleBin. - Restore a package version without an npm scope from the recycle bin to its feed. - :param :class:` ` package_version_details: + [Preview API] Restore a package version without an npm scope from the recycle bin to its feed. + :param :class:` ` package_version_details: :param str feed_id: Name or ID of the feed. :param str package_name: Name of the package. :param str package_version: Version of the package. @@ -331,18 +332,18 @@ def restore_package_version_from_recycle_bin(self, package_version_details, feed content = self._serialize.body(package_version_details, 'NpmRecycleBinPackageVersionDetails') self._send(http_method='PATCH', location_id='63a4f31f-e92b-4ee4-bf92-22d485e73bef', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) def get_scoped_upstreaming_behavior(self, feed_id, package_scope, unscoped_package_name, project=None): """GetScopedUpstreamingBehavior. - Get the upstreaming behavior of the (scoped) package within the context of a feed + [Preview API] Get the upstreaming behavior of the (scoped) package within the context of a feed :param str feed_id: The name or id of the feed :param str package_scope: The scope of the package :param str unscoped_package_name: The name of the scoped package :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -355,17 +356,17 @@ def get_scoped_upstreaming_behavior(self, feed_id, package_scope, unscoped_packa route_values['unscopedPackageName'] = self._serialize.url('unscoped_package_name', unscoped_package_name, 'str') response = self._send(http_method='GET', location_id='9859c187-f6ec-41b0-862d-8003b3b404e0', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('UpstreamingBehavior', response) def set_scoped_upstreaming_behavior(self, feed_id, package_scope, unscoped_package_name, behavior, project=None): """SetScopedUpstreamingBehavior. - Set the upstreaming behavior of a (scoped) package within the context of a feed + [Preview API] Set the upstreaming behavior of a (scoped) package within the context of a feed :param str feed_id: The name or id of the feed :param str package_scope: The scope of the package :param str unscoped_package_name: The name of the scoped package - :param :class:` ` behavior: The behavior to apply to the scoped package within the scope of the feed + :param :class:` ` behavior: The behavior to apply to the scoped package within the scope of the feed :param str project: Project ID or project name """ route_values = {} @@ -380,17 +381,17 @@ def set_scoped_upstreaming_behavior(self, feed_id, package_scope, unscoped_packa content = self._serialize.body(behavior, 'UpstreamingBehavior') self._send(http_method='PATCH', location_id='9859c187-f6ec-41b0-862d-8003b3b404e0', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) def get_upstreaming_behavior(self, feed_id, package_name, project=None): """GetUpstreamingBehavior. - Get the upstreaming behavior of the (unscoped) package within the context of a feed + [Preview API] Get the upstreaming behavior of the (unscoped) package within the context of a feed :param str feed_id: The name or id of the feed :param str package_name: The name of the package :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -401,16 +402,16 @@ def get_upstreaming_behavior(self, feed_id, package_name, project=None): route_values['packageName'] = self._serialize.url('package_name', package_name, 'str') response = self._send(http_method='GET', location_id='e27a45d3-711b-41cb-a47a-ae669b6e9076', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('UpstreamingBehavior', response) def set_upstreaming_behavior(self, feed_id, package_name, behavior, project=None): """SetUpstreamingBehavior. - Set the upstreaming behavior of a (scoped) package within the context of a feed + [Preview API] Set the upstreaming behavior of a (scoped) package within the context of a feed :param str feed_id: The name or id of the feed :param str package_name: The name of the package - :param :class:` ` behavior: The behavior to apply to the scoped package within the scope of the feed + :param :class:` ` behavior: The behavior to apply to the scoped package within the scope of the feed :param str project: Project ID or project name """ route_values = {} @@ -423,19 +424,19 @@ def set_upstreaming_behavior(self, feed_id, package_name, behavior, project=None content = self._serialize.body(behavior, 'UpstreamingBehavior') self._send(http_method='PATCH', location_id='e27a45d3-711b-41cb-a47a-ae669b6e9076', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) def get_scoped_package_info(self, feed_id, package_scope, unscoped_package_name, package_version, project=None): """GetScopedPackageInfo. - Get information about a scoped package version (such as @scope/name). + [Preview API] Get information about a scoped package version (such as @scope/name). :param str feed_id: Name or ID of the feed. :param str package_scope: Scope of the package (the 'scope' part of @scope/name). :param str unscoped_package_name: Name of the package (the 'name' part of @scope/name). :param str package_version: Version of the package. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -450,19 +451,19 @@ def get_scoped_package_info(self, feed_id, package_scope, unscoped_package_name, route_values['packageVersion'] = self._serialize.url('package_version', package_version, 'str') response = self._send(http_method='GET', location_id='e93d9ec3-4022-401e-96b0-83ea5d911e09', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('Package', response) def unpublish_scoped_package(self, feed_id, package_scope, unscoped_package_name, package_version, project=None): """UnpublishScopedPackage. - Unpublish a scoped package version (such as @scope/name). + [Preview API] Unpublish a scoped package version (such as @scope/name). :param str feed_id: Name or ID of the feed. :param str package_scope: Scope of the package (the 'scope' part of @scope/name). :param str unscoped_package_name: Name of the package (the 'name' part of @scope/name). :param str package_version: Version of the package. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -477,19 +478,20 @@ def unpublish_scoped_package(self, feed_id, package_scope, unscoped_package_name route_values['packageVersion'] = self._serialize.url('package_version', package_version, 'str') response = self._send(http_method='DELETE', location_id='e93d9ec3-4022-401e-96b0-83ea5d911e09', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('Package', response) def update_scoped_package(self, package_version_details, feed_id, package_scope, unscoped_package_name, package_version, project=None): """UpdateScopedPackage. - :param :class:` ` package_version_details: - :param str feed_id: + [Preview API] Update state for an npm scoped package version. + :param :class:` ` package_version_details: Updated state for the package version. + :param str feed_id: Name or ID of the feed. :param str package_scope: - :param str unscoped_package_name: - :param str package_version: + :param str unscoped_package_name: Name of the package (the 'name' part of @scope/name). + :param str package_version: Version of the package. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -505,19 +507,19 @@ def update_scoped_package(self, package_version_details, feed_id, package_scope, content = self._serialize.body(package_version_details, 'PackageVersionDetails') response = self._send(http_method='PATCH', location_id='e93d9ec3-4022-401e-96b0-83ea5d911e09', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('Package', response) def get_package_info(self, feed_id, package_name, package_version, project=None): """GetPackageInfo. - Get information about an unscoped package version. + [Preview API] Get information about an unscoped package version. :param str feed_id: Name or ID of the feed. :param str package_name: Name of the package. :param str package_version: Version of the package. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -530,18 +532,18 @@ def get_package_info(self, feed_id, package_name, package_version, project=None) route_values['packageVersion'] = self._serialize.url('package_version', package_version, 'str') response = self._send(http_method='GET', location_id='ed579d62-67c9-4271-be66-9b029af5bcf9', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('Package', response) def unpublish_package(self, feed_id, package_name, package_version, project=None): """UnpublishPackage. - Unpublish an unscoped package version. + [Preview API] Unpublish an unscoped package version. :param str feed_id: Name or ID of the feed. :param str package_name: Name of the package. :param str package_version: Version of the package. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -554,18 +556,19 @@ def unpublish_package(self, feed_id, package_name, package_version, project=None route_values['packageVersion'] = self._serialize.url('package_version', package_version, 'str') response = self._send(http_method='DELETE', location_id='ed579d62-67c9-4271-be66-9b029af5bcf9', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('Package', response) def update_package(self, package_version_details, feed_id, package_name, package_version, project=None): """UpdatePackage. - :param :class:` ` package_version_details: - :param str feed_id: - :param str package_name: - :param str package_version: + [Preview API] Update state for an unscoped package version. + :param :class:` ` package_version_details: Updated state for the package version. + :param str feed_id: Name or ID of the feed. + :param str package_name: Name of the package. + :param str package_version: Version of the package. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -579,7 +582,7 @@ def update_package(self, package_version_details, feed_id, package_name, package content = self._serialize.body(package_version_details, 'PackageVersionDetails') response = self._send(http_method='PATCH', location_id='ed579d62-67c9-4271-be66-9b029af5bcf9', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('Package', response) diff --git a/azure-devops/azure/devops/v7_0/nuget/__init__.py b/azure-devops/azure/devops/v7_2/nuget/__init__.py similarity index 100% rename from azure-devops/azure/devops/v7_0/nuget/__init__.py rename to azure-devops/azure/devops/v7_2/nuget/__init__.py diff --git a/azure-devops/azure/devops/v7_0/nuget/models.py b/azure-devops/azure/devops/v7_2/nuget/models.py similarity index 93% rename from azure-devops/azure/devops/v7_0/nuget/models.py rename to azure-devops/azure/devops/v7_2/nuget/models.py index 98fb8ac8..7b2042c4 100644 --- a/azure-devops/azure/devops/v7_0/nuget/models.py +++ b/azure-devops/azure/devops/v7_2/nuget/models.py @@ -77,11 +77,11 @@ class NuGetPackagesBatchRequest(Model): A batch of operations to apply to package versions. :param data: Data required to perform the operation. This is optional based on the type of the operation. Use BatchPromoteData if performing a promote operation. - :type data: :class:`BatchOperationData ` + :type data: :class:`BatchOperationData ` :param operation: Type of operation that needs to be performed on packages. :type operation: object :param packages: The packages onto which the operation will be performed. - :type packages: list of :class:`MinimalPackageDetails ` + :type packages: list of :class:`MinimalPackageDetails ` """ _attribute_map = { @@ -142,17 +142,19 @@ class Package(Model): Package version metadata for a NuGet package :param _links: Related REST links. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param deleted_date: If and when the package was deleted. :type deleted_date: datetime :param id: Package Id. :type id: str + :param listed: Indicates whether the package is marked as 'listed' within the NuGet protocol. If null or missing, the package's 'listed' state is unspecified. + :type listed: bool :param name: The display name of the package. :type name: str :param permanently_deleted_date: If and when the package was permanently deleted. :type permanently_deleted_date: datetime :param source_chain: The history of upstream sources for this package. The first source in the list is the immediate source from which this package was saved. - :type source_chain: list of :class:`UpstreamSourceInfo ` + :type source_chain: list of :class:`UpstreamSourceInfo ` :param version: The version of the package. :type version: str """ @@ -161,17 +163,19 @@ class Package(Model): '_links': {'key': '_links', 'type': 'ReferenceLinks'}, 'deleted_date': {'key': 'deletedDate', 'type': 'iso-8601'}, 'id': {'key': 'id', 'type': 'str'}, + 'listed': {'key': 'listed', 'type': 'bool'}, 'name': {'key': 'name', 'type': 'str'}, 'permanently_deleted_date': {'key': 'permanentlyDeletedDate', 'type': 'iso-8601'}, 'source_chain': {'key': 'sourceChain', 'type': '[UpstreamSourceInfo]'}, 'version': {'key': 'version', 'type': 'str'} } - def __init__(self, _links=None, deleted_date=None, id=None, name=None, permanently_deleted_date=None, source_chain=None, version=None): + def __init__(self, _links=None, deleted_date=None, id=None, listed=None, name=None, permanently_deleted_date=None, source_chain=None, version=None): super(Package, self).__init__() self._links = _links self.deleted_date = deleted_date self.id = id + self.listed = listed self.name = name self.permanently_deleted_date = permanently_deleted_date self.source_chain = source_chain @@ -183,7 +187,7 @@ class PackageVersionDetails(Model): :param listed: Indicates the listing state of a package :type listed: bool :param views: The view to which the package version will be added - :type views: :class:`JsonPatchOperation ` + :type views: :class:`JsonPatchOperation ` """ _attribute_map = { diff --git a/azure-devops/azure/devops/v7_0/nuget/nuget_client.py b/azure-devops/azure/devops/v7_2/nuget/nuget_client.py similarity index 90% rename from azure-devops/azure/devops/v7_0/nuget/nuget_client.py rename to azure-devops/azure/devops/v7_2/nuget/nuget_client.py index 6ecb0cde..dc04c8e8 100644 --- a/azure-devops/azure/devops/v7_0/nuget/nuget_client.py +++ b/azure-devops/azure/devops/v7_2/nuget/nuget_client.py @@ -49,7 +49,7 @@ def download_package(self, feed_id, package_name, package_version, project=None, query_parameters['sourceProtocolVersion'] = self._serialize.query('source_protocol_version', source_protocol_version, 'str') response = self._send(http_method='GET', location_id='6ea81b8c-7386-490b-a71f-6cf23c80b388', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters, accept_media_type='application/octet-stream') @@ -62,7 +62,7 @@ def download_package(self, feed_id, package_name, package_version, project=None, def update_package_versions(self, batch_request, feed_id, project=None): """UpdatePackageVersions. [Preview API] Update several packages from a single feed in a single request. The updates to the packages do not happen atomically. - :param :class:` ` batch_request: Information about the packages to update, the operation to perform, and its associated data. + :param :class:` ` batch_request: Information about the packages to update, the operation to perform, and its associated data. :param str feed_id: Name or ID of the feed. :param str project: Project ID or project name """ @@ -74,14 +74,14 @@ def update_package_versions(self, batch_request, feed_id, project=None): content = self._serialize.body(batch_request, 'NuGetPackagesBatchRequest') self._send(http_method='POST', location_id='00c58ea7-d55f-49de-b59f-983533ae11dc', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, content=content) def update_recycle_bin_package_versions(self, batch_request, feed_id, project=None): """UpdateRecycleBinPackageVersions. [Preview API] Delete or restore several package versions from the recycle bin. - :param :class:` ` batch_request: Information about the packages to update, the operation to perform, and its associated data. Operation must be PermanentDelete or RestoreToFeed + :param :class:` ` batch_request: Information about the packages to update, the operation to perform, and its associated data. Operation must be PermanentDelete or RestoreToFeed :param str feed_id: Name or ID of the feed. :param str project: Project ID or project name """ @@ -93,7 +93,7 @@ def update_recycle_bin_package_versions(self, batch_request, feed_id, project=No content = self._serialize.body(batch_request, 'NuGetPackagesBatchRequest') self._send(http_method='POST', location_id='6479ac16-32f4-40f7-aa96-9414de861352', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, content=content) @@ -116,7 +116,7 @@ def delete_package_version_from_recycle_bin(self, feed_id, package_name, package route_values['packageVersion'] = self._serialize.url('package_version', package_version, 'str') self._send(http_method='DELETE', location_id='07e88775-e3cb-4408-bbe1-628e036fac8c', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) def get_package_version_metadata_from_recycle_bin(self, feed_id, package_name, package_version, project=None): @@ -126,7 +126,7 @@ def get_package_version_metadata_from_recycle_bin(self, feed_id, package_name, p :param str package_name: Name of the package. :param str package_version: Version of the package. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -139,14 +139,14 @@ def get_package_version_metadata_from_recycle_bin(self, feed_id, package_name, p route_values['packageVersion'] = self._serialize.url('package_version', package_version, 'str') response = self._send(http_method='GET', location_id='07e88775-e3cb-4408-bbe1-628e036fac8c', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) return self._deserialize('NuGetPackageVersionDeletionState', response) def restore_package_version_from_recycle_bin(self, package_version_details, feed_id, package_name, package_version, project=None): """RestorePackageVersionFromRecycleBin. [Preview API] Restore a package version from a feed's recycle bin back into the active feed. - :param :class:` ` package_version_details: Set the 'Deleted' member to 'false' to apply the restore operation + :param :class:` ` package_version_details: Set the 'Deleted' member to 'false' to apply the restore operation :param str feed_id: Name or ID of the feed. :param str package_name: Name of the package. :param str package_version: Version of the package. @@ -164,17 +164,17 @@ def restore_package_version_from_recycle_bin(self, package_version_details, feed content = self._serialize.body(package_version_details, 'NuGetRecycleBinPackageVersionDetails') self._send(http_method='PATCH', location_id='07e88775-e3cb-4408-bbe1-628e036fac8c', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, content=content) def get_upstreaming_behavior(self, feed_id, package_name, project=None): """GetUpstreamingBehavior. - Get the upstreaming behavior of a package within the context of a feed + [Preview API] Get the upstreaming behavior of a package within the context of a feed :param str feed_id: The name or id of the feed :param str package_name: The name of the package :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -185,16 +185,16 @@ def get_upstreaming_behavior(self, feed_id, package_name, project=None): route_values['packageName'] = self._serialize.url('package_name', package_name, 'str') response = self._send(http_method='GET', location_id='b41eec47-6472-4efa-bcd5-a2c5607b66ec', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('UpstreamingBehavior', response) def set_upstreaming_behavior(self, feed_id, package_name, behavior, project=None): """SetUpstreamingBehavior. - Set the upstreaming behavior of a package within the context of a feed + [Preview API] Set the upstreaming behavior of a package within the context of a feed :param str feed_id: The name or id of the feed :param str package_name: The name of the package - :param :class:` ` behavior: The behavior to apply to the package within the scope of the feed + :param :class:` ` behavior: The behavior to apply to the package within the scope of the feed :param str project: Project ID or project name """ route_values = {} @@ -207,18 +207,18 @@ def set_upstreaming_behavior(self, feed_id, package_name, behavior, project=None content = self._serialize.body(behavior, 'UpstreamingBehavior') self._send(http_method='PATCH', location_id='b41eec47-6472-4efa-bcd5-a2c5607b66ec', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) def delete_package_version(self, feed_id, package_name, package_version, project=None): """DeletePackageVersion. - Send a package version from the feed to its paired recycle bin. + [Preview API] Send a package version from the feed to its paired recycle bin. :param str feed_id: Name or ID of the feed. :param str package_name: Name of the package to delete. :param str package_version: Version of the package to delete. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -231,19 +231,19 @@ def delete_package_version(self, feed_id, package_name, package_version, project route_values['packageVersion'] = self._serialize.url('package_version', package_version, 'str') response = self._send(http_method='DELETE', location_id='36c9353b-e250-4c57-b040-513c186c3905', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('Package', response) def get_package_version(self, feed_id, package_name, package_version, project=None, show_deleted=None): """GetPackageVersion. - Get information about a package version. + [Preview API] Get information about a package version. :param str feed_id: Name or ID of the feed. :param str package_name: Name of the package. :param str package_version: Version of the package. :param str project: Project ID or project name :param bool show_deleted: True to include deleted packages in the response. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -259,15 +259,15 @@ def get_package_version(self, feed_id, package_name, package_version, project=No query_parameters['showDeleted'] = self._serialize.query('show_deleted', show_deleted, 'bool') response = self._send(http_method='GET', location_id='36c9353b-e250-4c57-b040-513c186c3905', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('Package', response) def update_package_version(self, package_version_details, feed_id, package_name, package_version, project=None): """UpdatePackageVersion. - Set mutable state on a package version. - :param :class:` ` package_version_details: New state to apply to the referenced package. + [Preview API] Set mutable state on a package version. + :param :class:` ` package_version_details: New state to apply to the referenced package. :param str feed_id: Name or ID of the feed. :param str package_name: Name of the package to update. :param str package_version: Version of the package to update. @@ -285,7 +285,7 @@ def update_package_version(self, package_version_details, feed_id, package_name, content = self._serialize.body(package_version_details, 'PackageVersionDetails') self._send(http_method='PATCH', location_id='36c9353b-e250-4c57-b040-513c186c3905', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) diff --git a/azure-devops/azure/devops/v7_0/operations/__init__.py b/azure-devops/azure/devops/v7_2/operations/__init__.py similarity index 100% rename from azure-devops/azure/devops/v7_0/operations/__init__.py rename to azure-devops/azure/devops/v7_2/operations/__init__.py diff --git a/azure-devops/azure/devops/v7_0/operations/models.py b/azure-devops/azure/devops/v7_2/operations/models.py similarity index 97% rename from azure-devops/azure/devops/v7_0/operations/models.py rename to azure-devops/azure/devops/v7_2/operations/models.py index 5df3e331..6875be81 100644 --- a/azure-devops/azure/devops/v7_0/operations/models.py +++ b/azure-devops/azure/devops/v7_2/operations/models.py @@ -83,13 +83,13 @@ class Operation(OperationReference): :param url: URL to get the full operation object. :type url: str :param _links: Links to other related objects. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param detailed_message: Detailed messaged about the status of an operation. :type detailed_message: str :param result_message: Result message for an operation. :type result_message: str :param result_url: URL to the operation result. - :type result_url: :class:`OperationResultReference ` + :type result_url: :class:`OperationResultReference ` """ _attribute_map = { diff --git a/azure-devops/azure/devops/v7_0/operations/operations_client.py b/azure-devops/azure/devops/v7_2/operations/operations_client.py similarity index 90% rename from azure-devops/azure/devops/v7_0/operations/operations_client.py rename to azure-devops/azure/devops/v7_2/operations/operations_client.py index 34c69668..794d9f21 100644 --- a/azure-devops/azure/devops/v7_0/operations/operations_client.py +++ b/azure-devops/azure/devops/v7_2/operations/operations_client.py @@ -27,10 +27,10 @@ def __init__(self, base_url=None, creds=None): def get_operation(self, operation_id, plugin_id=None): """GetOperation. - Gets an operation from the the operationId using the given pluginId. + [Preview API] Gets an operation from the operationId using the given pluginId. :param str operation_id: The ID for the operation. :param str plugin_id: The ID for the plugin. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if operation_id is not None: @@ -40,7 +40,7 @@ def get_operation(self, operation_id, plugin_id=None): query_parameters['pluginId'] = self._serialize.query('plugin_id', plugin_id, 'str') response = self._send(http_method='GET', location_id='9a1b74b4-2ca8-4a9f-8470-c2f2e6fdc949', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('Operation', response) diff --git a/azure-devops/azure/devops/v7_0/pipeline_permissions/__init__.py b/azure-devops/azure/devops/v7_2/pipeline_permissions/__init__.py similarity index 100% rename from azure-devops/azure/devops/v7_0/pipeline_permissions/__init__.py rename to azure-devops/azure/devops/v7_2/pipeline_permissions/__init__.py diff --git a/azure-devops/azure/devops/v7_0/pipeline_permissions/models.py b/azure-devops/azure/devops/v7_2/pipeline_permissions/models.py similarity index 95% rename from azure-devops/azure/devops/v7_0/pipeline_permissions/models.py rename to azure-devops/azure/devops/v7_2/pipeline_permissions/models.py index e82fa882..6ed2496c 100644 --- a/azure-devops/azure/devops/v7_0/pipeline_permissions/models.py +++ b/azure-devops/azure/devops/v7_2/pipeline_permissions/models.py @@ -12,7 +12,7 @@ class GraphSubjectBase(Model): """ :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. :type descriptor: str :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. @@ -39,7 +39,7 @@ def __init__(self, _links=None, descriptor=None, display_name=None, url=None): class IdentityRef(GraphSubjectBase): """ :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. :type descriptor: str :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. @@ -100,7 +100,7 @@ class Permission(Model): :param authorized: :type authorized: bool :param authorized_by: - :type authorized_by: :class:`IdentityRef ` + :type authorized_by: :class:`IdentityRef ` :param authorized_on: :type authorized_on: datetime """ @@ -123,7 +123,7 @@ class PipelinePermission(Permission): :param authorized: :type authorized: bool :param authorized_by: - :type authorized_by: :class:`IdentityRef ` + :type authorized_by: :class:`IdentityRef ` :param authorized_on: :type authorized_on: datetime :param id: @@ -185,11 +185,11 @@ def __init__(self, id=None, name=None, type=None): class ResourcePipelinePermissions(Model): """ :param all_pipelines: - :type all_pipelines: :class:`Permission ` + :type all_pipelines: :class:`Permission ` :param pipelines: - :type pipelines: list of :class:`PipelinePermission ` + :type pipelines: list of :class:`PipelinePermission ` :param resource: - :type resource: :class:`Resource ` + :type resource: :class:`Resource ` """ _attribute_map = { diff --git a/azure-devops/azure/devops/v7_0/pipeline_permissions/pipeline_permissions_client.py b/azure-devops/azure/devops/v7_2/pipeline_permissions/pipeline_permissions_client.py similarity index 92% rename from azure-devops/azure/devops/v7_0/pipeline_permissions/pipeline_permissions_client.py rename to azure-devops/azure/devops/v7_2/pipeline_permissions/pipeline_permissions_client.py index 92194e0f..b01076a9 100644 --- a/azure-devops/azure/devops/v7_0/pipeline_permissions/pipeline_permissions_client.py +++ b/azure-devops/azure/devops/v7_2/pipeline_permissions/pipeline_permissions_client.py @@ -31,7 +31,7 @@ def get_pipeline_permissions_for_resource(self, project, resource_type, resource :param str project: Project ID or project name :param str resource_type: :param str resource_id: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -42,18 +42,18 @@ def get_pipeline_permissions_for_resource(self, project, resource_type, resource route_values['resourceId'] = self._serialize.url('resource_id', resource_id, 'str') response = self._send(http_method='GET', location_id='b5b9a4a4-e6cd-4096-853c-ab7d8b0c4eb2', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) return self._deserialize('ResourcePipelinePermissions', response) def update_pipeline_permisions_for_resource(self, resource_authorization, project, resource_type, resource_id): """UpdatePipelinePermisionsForResource. [Preview API] Authorizes/Unauthorizes a list of definitions for a given resource. - :param :class:` ` resource_authorization: + :param :class:` ` resource_authorization: :param str project: Project ID or project name :param str resource_type: :param str resource_id: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -65,7 +65,7 @@ def update_pipeline_permisions_for_resource(self, resource_authorization, projec content = self._serialize.body(resource_authorization, 'ResourcePipelinePermissions') response = self._send(http_method='PATCH', location_id='b5b9a4a4-e6cd-4096-853c-ab7d8b0c4eb2', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('ResourcePipelinePermissions', response) @@ -83,7 +83,7 @@ def update_pipeline_permisions_for_resources(self, resource_authorizations, proj content = self._serialize.body(resource_authorizations, '[ResourcePipelinePermissions]') response = self._send(http_method='PATCH', location_id='b5b9a4a4-e6cd-4096-853c-ab7d8b0c4eb2', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('[ResourcePipelinePermissions]', self._unwrap_collection(response)) diff --git a/azure-devops/azure/devops/v7_0/pipelines/__init__.py b/azure-devops/azure/devops/v7_2/pipelines/__init__.py similarity index 95% rename from azure-devops/azure/devops/v7_0/pipelines/__init__.py rename to azure-devops/azure/devops/v7_2/pipelines/__init__.py index 66e503f8..65f7f0f2 100644 --- a/azure-devops/azure/devops/v7_0/pipelines/__init__.py +++ b/azure-devops/azure/devops/v7_2/pipelines/__init__.py @@ -12,6 +12,8 @@ __all__ = [ 'Artifact', 'BuildResourceParameters', + 'Container', + 'ContainerResource', 'ContainerResourceParameters', 'CreatePipelineConfigurationParameters', 'CreatePipelineParameters', @@ -22,6 +24,7 @@ 'PipelineBase', 'PipelineConfiguration', 'PipelineReference', + 'PipelineResource', 'PipelineResourceParameters', 'PreviewRun', 'ReferenceLinks', diff --git a/azure-devops/azure/devops/v7_0/pipelines/models.py b/azure-devops/azure/devops/v7_2/pipelines/models.py similarity index 83% rename from azure-devops/azure/devops/v7_0/pipelines/models.py rename to azure-devops/azure/devops/v7_2/pipelines/models.py index 1e57413f..cfee7a84 100644 --- a/azure-devops/azure/devops/v7_0/pipelines/models.py +++ b/azure-devops/azure/devops/v7_2/pipelines/models.py @@ -16,7 +16,7 @@ class Artifact(Model): :param name: The name of the artifact. :type name: str :param signed_content: Signed url for downloading this artifact - :type signed_content: :class:`SignedUrl ` + :type signed_content: :class:`SignedUrl ` :param url: Self-referential url :type url: str """ @@ -49,6 +49,56 @@ def __init__(self, version=None): self.version = version +class Container(Model): + """ + :param environment: + :type environment: dict + :param image: + :type image: str + :param map_docker_socket: + :type map_docker_socket: bool + :param options: + :type options: str + :param ports: + :type ports: list of str + :param volumes: + :type volumes: list of str + """ + + _attribute_map = { + 'environment': {'key': 'environment', 'type': '{str}'}, + 'image': {'key': 'image', 'type': 'str'}, + 'map_docker_socket': {'key': 'mapDockerSocket', 'type': 'bool'}, + 'options': {'key': 'options', 'type': 'str'}, + 'ports': {'key': 'ports', 'type': '[str]'}, + 'volumes': {'key': 'volumes', 'type': '[str]'} + } + + def __init__(self, environment=None, image=None, map_docker_socket=None, options=None, ports=None, volumes=None): + super(Container, self).__init__() + self.environment = environment + self.image = image + self.map_docker_socket = map_docker_socket + self.options = options + self.ports = ports + self.volumes = volumes + + +class ContainerResource(Model): + """ + :param container: + :type container: :class:`Container ` + """ + + _attribute_map = { + 'container': {'key': 'container', 'type': 'Container'} + } + + def __init__(self, container=None): + super(ContainerResource, self).__init__() + self.container = container + + class ContainerResourceParameters(Model): """ :param version: @@ -86,7 +136,7 @@ class CreatePipelineParameters(Model): Parameters to create a pipeline. :param configuration: Configuration parameters of the pipeline. - :type configuration: :class:`CreatePipelineConfigurationParameters ` + :type configuration: :class:`CreatePipelineConfigurationParameters ` :param folder: Folder of the pipeline. :type folder: str :param name: Name of the pipeline. @@ -119,7 +169,7 @@ class Log(Model): :param line_count: The number of lines in the log. :type line_count: long :param signed_content: - :type signed_content: :class:`SignedUrl ` + :type signed_content: :class:`SignedUrl ` :param url: :type url: str """ @@ -148,9 +198,9 @@ class LogCollection(Model): A collection of logs. :param logs: The list of logs. - :type logs: list of :class:`Log ` + :type logs: list of :class:`Log ` :param signed_content: - :type signed_content: :class:`SignedUrl ` + :type signed_content: :class:`SignedUrl ` :param url: URL of the log. :type url: str """ @@ -254,6 +304,25 @@ def __init__(self, folder=None, id=None, name=None, revision=None, url=None): self.url = url +class PipelineResource(Model): + """ + :param pipeline: + :type pipeline: :class:`PipelineReference ` + :param version: + :type version: str + """ + + _attribute_map = { + 'pipeline': {'key': 'pipeline', 'type': 'PipelineReference'}, + 'version': {'key': 'version', 'type': 'str'} + } + + def __init__(self, pipeline=None, version=None): + super(PipelineResource, self).__init__() + self.pipeline = pipeline + self.version = version + + class PipelineResourceParameters(Model): """ :param version: @@ -321,7 +390,7 @@ class RepositoryResource(Model): :param ref_name: :type ref_name: str :param repository: - :type repository: :class:`Repository ` + :type repository: :class:`Repository ` :param version: :type version: str """ @@ -373,7 +442,7 @@ class RunPipelineParameters(Model): :param preview_run: If true, don't actually create a new run. Instead, return the final YAML document after parsing templates. :type preview_run: bool :param resources: The resources the run requires. - :type resources: :class:`RunResourcesParameters ` + :type resources: :class:`RunResourcesParameters ` :param stages_to_skip: :type stages_to_skip: list of str :param template_parameters: @@ -424,16 +493,24 @@ def __init__(self, id=None, name=None): class RunResources(Model): """ + :param containers: + :type containers: dict + :param pipelines: + :type pipelines: dict :param repositories: :type repositories: dict """ _attribute_map = { + 'containers': {'key': 'containers', 'type': '{ContainerResource}'}, + 'pipelines': {'key': 'pipelines', 'type': '{PipelineResource}'}, 'repositories': {'key': 'repositories', 'type': '{RepositoryResource}'} } - def __init__(self, repositories=None): + def __init__(self, containers=None, pipelines=None, repositories=None): super(RunResources, self).__init__() + self.containers = containers + self.pipelines = pipelines self.repositories = repositories @@ -471,7 +548,7 @@ def __init__(self, builds=None, containers=None, packages=None, pipelines=None, class SignalRConnection(Model): """ :param signed_content: - :type signed_content: :class:`SignedUrl ` + :type signed_content: :class:`SignedUrl ` """ _attribute_map = { @@ -536,9 +613,9 @@ class Pipeline(PipelineBase): :param revision: Revision number :type revision: int :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param configuration: - :type configuration: :class:`PipelineConfiguration ` + :type configuration: :class:`PipelineConfiguration ` :param url: URL of the pipeline :type url: str """ @@ -567,7 +644,7 @@ class Run(RunReference): :param name: :type name: str :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param created_date: :type created_date: datetime :param final_yaml: @@ -575,13 +652,15 @@ class Run(RunReference): :param finished_date: :type finished_date: datetime :param pipeline: - :type pipeline: :class:`PipelineReference ` + :type pipeline: :class:`PipelineReference ` :param resources: - :type resources: :class:`RunResources ` + :type resources: :class:`RunResources ` :param result: :type result: object :param state: :type state: object + :param template_parameters: + :type template_parameters: dict :param url: :type url: str :param variables: @@ -599,11 +678,12 @@ class Run(RunReference): 'resources': {'key': 'resources', 'type': 'RunResources'}, 'result': {'key': 'result', 'type': 'object'}, 'state': {'key': 'state', 'type': 'object'}, + 'template_parameters': {'key': 'templateParameters', 'type': '{object}'}, 'url': {'key': 'url', 'type': 'str'}, 'variables': {'key': 'variables', 'type': '{Variable}'} } - def __init__(self, id=None, name=None, _links=None, created_date=None, final_yaml=None, finished_date=None, pipeline=None, resources=None, result=None, state=None, url=None, variables=None): + def __init__(self, id=None, name=None, _links=None, created_date=None, final_yaml=None, finished_date=None, pipeline=None, resources=None, result=None, state=None, template_parameters=None, url=None, variables=None): super(Run, self).__init__(id=id, name=name) self._links = _links self.created_date = created_date @@ -613,6 +693,7 @@ def __init__(self, id=None, name=None, _links=None, created_date=None, final_yam self.resources = resources self.result = result self.state = state + self.template_parameters = template_parameters self.url = url self.variables = variables @@ -620,6 +701,8 @@ def __init__(self, id=None, name=None, _links=None, created_date=None, final_yam __all__ = [ 'Artifact', 'BuildResourceParameters', + 'Container', + 'ContainerResource', 'ContainerResourceParameters', 'CreatePipelineConfigurationParameters', 'CreatePipelineParameters', @@ -629,6 +712,7 @@ def __init__(self, id=None, name=None, _links=None, created_date=None, final_yam 'PipelineBase', 'PipelineConfiguration', 'PipelineReference', + 'PipelineResource', 'PipelineResourceParameters', 'PreviewRun', 'ReferenceLinks', diff --git a/azure-devops/azure/devops/v7_0/pipelines/pipelines_client.py b/azure-devops/azure/devops/v7_2/pipelines/pipelines_client.py similarity index 86% rename from azure-devops/azure/devops/v7_0/pipelines/pipelines_client.py rename to azure-devops/azure/devops/v7_2/pipelines/pipelines_client.py index 3eeb2e17..adda3284 100644 --- a/azure-devops/azure/devops/v7_0/pipelines/pipelines_client.py +++ b/azure-devops/azure/devops/v7_2/pipelines/pipelines_client.py @@ -27,13 +27,13 @@ def __init__(self, base_url=None, creds=None): def get_artifact(self, project, pipeline_id, run_id, artifact_name, expand=None): """GetArtifact. - Get a specific artifact from a pipeline run + [Preview API] Get a specific artifact from a pipeline run :param str project: Project ID or project name :param int pipeline_id: ID of the pipeline. :param int run_id: ID of the run of that pipeline. :param str artifact_name: Name of the artifact. :param str expand: Expand options. Default is None. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -49,20 +49,20 @@ def get_artifact(self, project, pipeline_id, run_id, artifact_name, expand=None) query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') response = self._send(http_method='GET', location_id='85023071-bd5e-4438-89b0-2a5bf362a19d', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('Artifact', response) def get_log(self, project, pipeline_id, run_id, log_id, expand=None): """GetLog. - Get a specific log from a pipeline run + [Preview API] Get a specific log from a pipeline run :param str project: Project ID or project name :param int pipeline_id: ID of the pipeline. :param int run_id: ID of the run of that pipeline. :param int log_id: ID of the log. :param str expand: Expand options. Default is None. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -78,19 +78,19 @@ def get_log(self, project, pipeline_id, run_id, log_id, expand=None): query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') response = self._send(http_method='GET', location_id='fb1b6d27-3957-43d5-a14b-a2d70403e545', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('Log', response) def list_logs(self, project, pipeline_id, run_id, expand=None): """ListLogs. - Get a list of logs from a pipeline run. + [Preview API] Get a list of logs from a pipeline run. :param str project: Project ID or project name :param int pipeline_id: ID of the pipeline. :param int run_id: ID of the run of that pipeline. :param str expand: Expand options. Default is None. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -104,17 +104,17 @@ def list_logs(self, project, pipeline_id, run_id, expand=None): query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') response = self._send(http_method='GET', location_id='fb1b6d27-3957-43d5-a14b-a2d70403e545', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('LogCollection', response) def create_pipeline(self, input_parameters, project): """CreatePipeline. - Create a pipeline. - :param :class:` ` input_parameters: Input parameters. + [Preview API] Create a pipeline. + :param :class:` ` input_parameters: Input parameters. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -122,18 +122,18 @@ def create_pipeline(self, input_parameters, project): content = self._serialize.body(input_parameters, 'CreatePipelineParameters') response = self._send(http_method='POST', location_id='28e1305e-2afe-47bf-abaf-cbb0e6a91988', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('Pipeline', response) def get_pipeline(self, project, pipeline_id, pipeline_version=None): """GetPipeline. - Gets a pipeline, optionally at the specified version + [Preview API] Gets a pipeline, optionally at the specified version :param str project: Project ID or project name :param int pipeline_id: The pipeline ID :param int pipeline_version: The pipeline version - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -145,14 +145,14 @@ def get_pipeline(self, project, pipeline_id, pipeline_version=None): query_parameters['pipelineVersion'] = self._serialize.query('pipeline_version', pipeline_version, 'int') response = self._send(http_method='GET', location_id='28e1305e-2afe-47bf-abaf-cbb0e6a91988', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('Pipeline', response) def list_pipelines(self, project, order_by=None, top=None, continuation_token=None): """ListPipelines. - Get a list of pipelines. + [Preview API] Get a list of pipelines. :param str project: Project ID or project name :param str order_by: A sort expression. Defaults to "name asc" :param int top: The maximum number of pipelines to return @@ -171,19 +171,19 @@ def list_pipelines(self, project, order_by=None, top=None, continuation_token=No query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'str') response = self._send(http_method='GET', location_id='28e1305e-2afe-47bf-abaf-cbb0e6a91988', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[Pipeline]', self._unwrap_collection(response)) def preview(self, run_parameters, project, pipeline_id, pipeline_version=None): """Preview. - Queues a dry run of the pipeline and returns an object containing the final yaml. - :param :class:` ` run_parameters: Optional additional parameters for this run. + [Preview API] Queues a dry run of the pipeline and returns an object containing the final yaml. + :param :class:` ` run_parameters: Optional additional parameters for this run. :param str project: Project ID or project name :param int pipeline_id: The pipeline ID. :param int pipeline_version: The pipeline version. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -196,7 +196,7 @@ def preview(self, run_parameters, project, pipeline_id, pipeline_version=None): content = self._serialize.body(run_parameters, 'RunPipelineParameters') response = self._send(http_method='POST', location_id='53df2d18-29ea-46a9-bee0-933540f80abf', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters, content=content) @@ -204,11 +204,11 @@ def preview(self, run_parameters, project, pipeline_id, pipeline_version=None): def get_run(self, project, pipeline_id, run_id): """GetRun. - Gets a run for a particular pipeline. + [Preview API] Gets a run for a particular pipeline. :param str project: Project ID or project name :param int pipeline_id: The pipeline id :param int run_id: The run id - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -219,13 +219,13 @@ def get_run(self, project, pipeline_id, run_id): route_values['runId'] = self._serialize.url('run_id', run_id, 'int') response = self._send(http_method='GET', location_id='7859261e-d2e9-4a68-b820-a5d84cc5bb3d', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('Run', response) def list_runs(self, project, pipeline_id): """ListRuns. - Gets top 10000 runs for a particular pipeline. + [Preview API] Gets top 10000 runs for a particular pipeline. :param str project: Project ID or project name :param int pipeline_id: The pipeline id :rtype: [Run] @@ -237,18 +237,18 @@ def list_runs(self, project, pipeline_id): route_values['pipelineId'] = self._serialize.url('pipeline_id', pipeline_id, 'int') response = self._send(http_method='GET', location_id='7859261e-d2e9-4a68-b820-a5d84cc5bb3d', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('[Run]', self._unwrap_collection(response)) def run_pipeline(self, run_parameters, project, pipeline_id, pipeline_version=None): """RunPipeline. - Runs a pipeline. - :param :class:` ` run_parameters: Optional additional parameters for this run. + [Preview API] Runs a pipeline. + :param :class:` ` run_parameters: Optional additional parameters for this run. :param str project: Project ID or project name :param int pipeline_id: The pipeline ID. :param int pipeline_version: The pipeline version. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -261,7 +261,7 @@ def run_pipeline(self, run_parameters, project, pipeline_id, pipeline_version=No content = self._serialize.body(run_parameters, 'RunPipelineParameters') response = self._send(http_method='POST', location_id='7859261e-d2e9-4a68-b820-a5d84cc5bb3d', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters, content=content) diff --git a/azure-devops/azure/devops/v7_0/pipelines_checks/__init__.py b/azure-devops/azure/devops/v7_2/pipelines_checks/__init__.py similarity index 90% rename from azure-devops/azure/devops/v7_0/pipelines_checks/__init__.py rename to azure-devops/azure/devops/v7_2/pipelines_checks/__init__.py index e297bb73..6c31c36b 100644 --- a/azure-devops/azure/devops/v7_0/pipelines_checks/__init__.py +++ b/azure-devops/azure/devops/v7_2/pipelines_checks/__init__.py @@ -10,17 +10,21 @@ from .pipelines_checks_client import PipelinesChecksClient __all__ = [ + 'ApprovalCheckDefinitionReference', 'ApprovalConfig', 'ApprovalConfigSettings', - 'GraphSubjectBase', 'CheckConfiguration', 'CheckConfigurationRef', + 'CheckIssue', 'CheckRun', 'CheckRunResult', + 'CheckRunUpdate', 'CheckSuite', 'CheckSuiteRef', 'CheckSuiteRequest', + 'CheckSuiteUpdateParameter', 'CheckType', + 'GraphSubjectBase', 'IdentityRef', 'ReferenceLinks', 'Resource', diff --git a/azure-devops/azure/devops/v7_0/pipelines_checks/models.py b/azure-devops/azure/devops/v7_2/pipelines_checks/models.py similarity index 70% rename from azure-devops/azure/devops/v7_0/pipelines_checks/models.py rename to azure-devops/azure/devops/v7_2/pipelines_checks/models.py index c0d911df..28f4c23c 100644 --- a/azure-devops/azure/devops/v7_0/pipelines_checks/models.py +++ b/azure-devops/azure/devops/v7_2/pipelines_checks/models.py @@ -9,14 +9,31 @@ from msrest.serialization import Model +class ApprovalCheckDefinitionReference(Model): + """ + :param id: + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'} + } + + def __init__(self, id=None): + super(ApprovalCheckDefinitionReference, self).__init__() + self.id = id + + class ApprovalConfig(Model): """ Config to create a new approval. :param approvers: Ordered list of approvers. - :type approvers: list of :class:`IdentityRef ` + :type approvers: list of :class:`IdentityRef ` :param blocked_approvers: Identities which are not allowed to approve. - :type blocked_approvers: list of :class:`IdentityRef ` + :type blocked_approvers: list of :class:`IdentityRef ` + :param definition_ref: Determines approval check type and its settings. + :type definition_ref: :class:`ApprovalCheckDefinitionReference ` :param execution_order: Order in which approvers will be actionable. :type execution_order: object :param instructions: Instructions for the approver. @@ -28,15 +45,17 @@ class ApprovalConfig(Model): _attribute_map = { 'approvers': {'key': 'approvers', 'type': '[IdentityRef]'}, 'blocked_approvers': {'key': 'blockedApprovers', 'type': '[IdentityRef]'}, + 'definition_ref': {'key': 'definitionRef', 'type': 'ApprovalCheckDefinitionReference'}, 'execution_order': {'key': 'executionOrder', 'type': 'object'}, 'instructions': {'key': 'instructions', 'type': 'str'}, 'min_required_approvers': {'key': 'minRequiredApprovers', 'type': 'int'} } - def __init__(self, approvers=None, blocked_approvers=None, execution_order=None, instructions=None, min_required_approvers=None): + def __init__(self, approvers=None, blocked_approvers=None, definition_ref=None, execution_order=None, instructions=None, min_required_approvers=None): super(ApprovalConfig, self).__init__() self.approvers = approvers self.blocked_approvers = blocked_approvers + self.definition_ref = definition_ref self.execution_order = execution_order self.instructions = instructions self.min_required_approvers = min_required_approvers @@ -47,9 +66,11 @@ class ApprovalConfigSettings(ApprovalConfig): Config to create a new approval. :param approvers: Ordered list of approvers. - :type approvers: list of :class:`IdentityRef ` + :type approvers: list of :class:`IdentityRef ` :param blocked_approvers: Identities which are not allowed to approve. - :type blocked_approvers: list of :class:`IdentityRef ` + :type blocked_approvers: list of :class:`IdentityRef ` + :param definition_ref: Determines approval check type and its settings. + :type definition_ref: :class:`ApprovalCheckDefinitionReference ` :param execution_order: Order in which approvers will be actionable. :type execution_order: object :param instructions: Instructions for the approver. @@ -63,52 +84,26 @@ class ApprovalConfigSettings(ApprovalConfig): _attribute_map = { 'approvers': {'key': 'approvers', 'type': '[IdentityRef]'}, 'blocked_approvers': {'key': 'blockedApprovers', 'type': '[IdentityRef]'}, + 'definition_ref': {'key': 'definitionRef', 'type': 'ApprovalCheckDefinitionReference'}, 'execution_order': {'key': 'executionOrder', 'type': 'object'}, 'instructions': {'key': 'instructions', 'type': 'str'}, 'min_required_approvers': {'key': 'minRequiredApprovers', 'type': 'int'}, 'requester_cannot_be_approver': {'key': 'requesterCannotBeApprover', 'type': 'bool'} } - def __init__(self, approvers=None, blocked_approvers=None, execution_order=None, instructions=None, min_required_approvers=None, requester_cannot_be_approver=None): - super(ApprovalConfigSettings, self).__init__(approvers=approvers, blocked_approvers=blocked_approvers, execution_order=execution_order, instructions=instructions, min_required_approvers=min_required_approvers) + def __init__(self, approvers=None, blocked_approvers=None, definition_ref=None, execution_order=None, instructions=None, min_required_approvers=None, requester_cannot_be_approver=None): + super(ApprovalConfigSettings, self).__init__(approvers=approvers, blocked_approvers=blocked_approvers, definition_ref=definition_ref, execution_order=execution_order, instructions=instructions, min_required_approvers=min_required_approvers) self.requester_cannot_be_approver = requester_cannot_be_approver -class GraphSubjectBase(Model): - """ - :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. - :type _links: :class:`ReferenceLinks ` - :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. - :type descriptor: str - :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. - :type display_name: str - :param url: This url is the full route to the source resource of this graph subject. - :type url: str - """ - - _attribute_map = { - '_links': {'key': '_links', 'type': 'ReferenceLinks'}, - 'descriptor': {'key': 'descriptor', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'url': {'key': 'url', 'type': 'str'} - } - - def __init__(self, _links=None, descriptor=None, display_name=None, url=None): - super(GraphSubjectBase, self).__init__() - self._links = _links - self.descriptor = descriptor - self.display_name = display_name - self.url = url - - class CheckConfigurationRef(Model): """ :param id: Check configuration id. :type id: int :param resource: Resource on which check get configured. - :type resource: :class:`Resource ` + :type resource: :class:`Resource ` :param type: Check configuration type - :type type: :class:`CheckType ` + :type type: :class:`CheckType ` :param url: The URL from which one can fetch the configured check. :type url: str """ @@ -128,8 +123,39 @@ def __init__(self, id=None, resource=None, type=None, url=None): self.url = url +class CheckIssue(Model): + """ + An issue (error, warning) associated with a check configuration. + + :param description: Short summary of the check - its name and resource. + :type description: str + :param detailed_message: A more detailed description of issue. + :type detailed_message: str + :param message: A description of issue. + :type message: str + :param type: The type (error, warning) of the issue. + :type type: object + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'detailed_message': {'key': 'detailedMessage', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'object'} + } + + def __init__(self, description=None, detailed_message=None, message=None, type=None): + super(CheckIssue, self).__init__() + self.description = description + self.detailed_message = detailed_message + self.message = message + self.type = type + + class CheckRunResult(Model): """ + :param modified_by: Identity of person who modified check result. + :type modified_by: :class:`IdentityRef ` :param result_message: :type result_message: str :param status: @@ -137,20 +163,53 @@ class CheckRunResult(Model): """ _attribute_map = { + 'modified_by': {'key': 'modifiedBy', 'type': 'IdentityRef'}, 'result_message': {'key': 'resultMessage', 'type': 'str'}, 'status': {'key': 'status', 'type': 'object'} } - def __init__(self, result_message=None, status=None): + def __init__(self, modified_by=None, result_message=None, status=None): super(CheckRunResult, self).__init__() + self.modified_by = modified_by self.result_message = result_message self.status = status +class CheckRunUpdate(Model): + """ + :param check_run_id: Check run id of modified check run. + :type check_run_id: str + :param check_suite_id: Check suite id of modified check run. + :type check_suite_id: str + :param modified_by: Identity of person who modified check result. + :type modified_by: :class:`IdentityRef ` + :param modified_on: Time of check run's result modification. + :type modified_on: datetime + :param status: New check run status introduced by result update. + :type status: object + """ + + _attribute_map = { + 'check_run_id': {'key': 'checkRunId', 'type': 'str'}, + 'check_suite_id': {'key': 'checkSuiteId', 'type': 'str'}, + 'modified_by': {'key': 'modifiedBy', 'type': 'IdentityRef'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'status': {'key': 'status', 'type': 'object'} + } + + def __init__(self, check_run_id=None, check_suite_id=None, modified_by=None, modified_on=None, status=None): + super(CheckRunUpdate, self).__init__() + self.check_run_id = check_run_id + self.check_suite_id = check_suite_id + self.modified_by = modified_by + self.modified_on = modified_on + self.status = status + + class CheckSuiteRef(Model): """ :param context: Evaluation context for the check suite request - :type context: :class:`object ` + :type context: :class:`object ` :param id: Unique suite id generated by the pipeline orchestrator for the pipeline check runs request on the list of resources Pipeline orchestrator will used this identifier to map the check requests on a stage :type id: str """ @@ -169,11 +228,11 @@ def __init__(self, context=None, id=None): class CheckSuiteRequest(Model): """ :param context: - :type context: :class:`object ` + :type context: :class:`object ` :param id: :type id: str :param resources: - :type resources: list of :class:`Resource ` + :type resources: list of :class:`Resource ` """ _attribute_map = { @@ -189,6 +248,25 @@ def __init__(self, context=None, id=None, resources=None): self.resources = resources +class CheckSuiteUpdateParameter(Model): + """ + :param action: Action that has to be taken for the specified check. + :type action: object + :param check_id: Check id of the check run to be updated. + :type check_id: str + """ + + _attribute_map = { + 'action': {'key': 'action', 'type': 'object'}, + 'check_id': {'key': 'checkId', 'type': 'str'} + } + + def __init__(self, action=None, check_id=None): + super(CheckSuiteUpdateParameter, self).__init__() + self.action = action + self.check_id = check_id + + class CheckType(Model): """ :param id: Gets or sets check type id. @@ -208,10 +286,37 @@ def __init__(self, id=None, name=None): self.name = name +class GraphSubjectBase(Model): + """ + :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. + :type _links: :class:`ReferenceLinks ` + :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. + :type descriptor: str + :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. + :type display_name: str + :param url: This url is the full route to the source resource of this graph subject. + :type url: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'descriptor': {'key': 'descriptor', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, _links=None, descriptor=None, display_name=None, url=None): + super(GraphSubjectBase, self).__init__() + self._links = _links + self.descriptor = descriptor + self.display_name = display_name + self.url = url + + class IdentityRef(GraphSubjectBase): """ :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. :type descriptor: str :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. @@ -312,7 +417,7 @@ class TaskCheckConfig(Model): Config to facilitate task check :param definition_ref: - :type definition_ref: :class:`TaskCheckDefinitionReference ` + :type definition_ref: :class:`TaskCheckDefinitionReference ` :param display_name: :type display_name: str :param inputs: @@ -368,19 +473,23 @@ class CheckConfiguration(CheckConfigurationRef): :param id: Check configuration id. :type id: int :param resource: Resource on which check get configured. - :type resource: :class:`Resource ` + :type resource: :class:`Resource ` :param type: Check configuration type - :type type: :class:`CheckType ` + :type type: :class:`CheckType ` :param url: The URL from which one can fetch the configured check. :type url: str :param _links: Reference links. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param created_by: Identity of person who configured check. - :type created_by: :class:`IdentityRef ` + :type created_by: :class:`IdentityRef ` :param created_on: Time when check got configured. :type created_on: datetime + :param is_disabled: Is check disabled. + :type is_disabled: bool + :param issue: Issue connected to check configuration. + :type issue: :class:`CheckIssue ` :param modified_by: Identity of person who modified the configured check. - :type modified_by: :class:`IdentityRef ` + :type modified_by: :class:`IdentityRef ` :param modified_on: Time when configured check was modified. :type modified_on: datetime :param timeout: Timeout in minutes for the check. @@ -395,16 +504,20 @@ class CheckConfiguration(CheckConfigurationRef): '_links': {'key': '_links', 'type': 'ReferenceLinks'}, 'created_by': {'key': 'createdBy', 'type': 'IdentityRef'}, 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'is_disabled': {'key': 'isDisabled', 'type': 'bool'}, + 'issue': {'key': 'issue', 'type': 'CheckIssue'}, 'modified_by': {'key': 'modifiedBy', 'type': 'IdentityRef'}, 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, 'timeout': {'key': 'timeout', 'type': 'int'} } - def __init__(self, id=None, resource=None, type=None, url=None, _links=None, created_by=None, created_on=None, modified_by=None, modified_on=None, timeout=None): + def __init__(self, id=None, resource=None, type=None, url=None, _links=None, created_by=None, created_on=None, is_disabled=None, issue=None, modified_by=None, modified_on=None, timeout=None): super(CheckConfiguration, self).__init__(id=id, resource=resource, type=type, url=url) self._links = _links self.created_by = created_by self.created_on = created_on + self.is_disabled = is_disabled + self.issue = issue self.modified_by = modified_by self.modified_on = modified_on self.timeout = timeout @@ -412,49 +525,60 @@ def __init__(self, id=None, resource=None, type=None, url=None, _links=None, cre class CheckRun(CheckRunResult): """ + :param modified_by: Identity of person who modified check result. + :type modified_by: :class:`IdentityRef ` :param result_message: :type result_message: str :param status: :type status: object + :param check_configuration_ref: + :type check_configuration_ref: :class:`CheckConfigurationRef ` :param completed_date: :type completed_date: datetime :param created_date: :type created_date: datetime - :param check_configuration_ref: - :type check_configuration_ref: :class:`CheckConfigurationRef ` + :param evaluation_order: + :type evaluation_order: object :param id: :type id: str + :param result_updates: List of check run result updates. + :type result_updates: list of :class:`CheckRunUpdate ` """ _attribute_map = { + 'modified_by': {'key': 'modifiedBy', 'type': 'IdentityRef'}, 'result_message': {'key': 'resultMessage', 'type': 'str'}, 'status': {'key': 'status', 'type': 'object'}, + 'check_configuration_ref': {'key': 'checkConfigurationRef', 'type': 'CheckConfigurationRef'}, 'completed_date': {'key': 'completedDate', 'type': 'iso-8601'}, 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, - 'check_configuration_ref': {'key': 'checkConfigurationRef', 'type': 'CheckConfigurationRef'}, - 'id': {'key': 'id', 'type': 'str'} + 'evaluation_order': {'key': 'evaluationOrder', 'type': 'object'}, + 'id': {'key': 'id', 'type': 'str'}, + 'result_updates': {'key': 'resultUpdates', 'type': '[CheckRunUpdate]'} } - def __init__(self, result_message=None, status=None, completed_date=None, created_date=None, check_configuration_ref=None, id=None): - super(CheckRun, self).__init__(result_message=result_message, status=status) + def __init__(self, modified_by=None, result_message=None, status=None, check_configuration_ref=None, completed_date=None, created_date=None, evaluation_order=None, id=None, result_updates=None): + super(CheckRun, self).__init__(modified_by=modified_by, result_message=result_message, status=status) + self.check_configuration_ref = check_configuration_ref self.completed_date = completed_date self.created_date = created_date - self.check_configuration_ref = check_configuration_ref + self.evaluation_order = evaluation_order self.id = id + self.result_updates = result_updates class CheckSuite(CheckSuiteRef): """ :param context: Evaluation context for the check suite request - :type context: :class:`object ` + :type context: :class:`object ` :param id: Unique suite id generated by the pipeline orchestrator for the pipeline check runs request on the list of resources Pipeline orchestrator will used this identifier to map the check requests on a stage :type id: str :param _links: Reference links. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` + :param check_runs: List of check runs associated with the given check suite request. + :type check_runs: list of :class:`CheckRun ` :param completed_date: Completed date of the given check suite request :type completed_date: datetime - :param check_runs: List of check runs associated with the given check suite request. - :type check_runs: list of :class:`CheckRun ` :param message: Optional message for the given check suite request :type message: str :param status: Overall check runs status for the given suite request. This is check suite status @@ -465,30 +589,34 @@ class CheckSuite(CheckSuiteRef): 'context': {'key': 'context', 'type': 'object'}, 'id': {'key': 'id', 'type': 'str'}, '_links': {'key': '_links', 'type': 'ReferenceLinks'}, - 'completed_date': {'key': 'completedDate', 'type': 'iso-8601'}, 'check_runs': {'key': 'checkRuns', 'type': '[CheckRun]'}, + 'completed_date': {'key': 'completedDate', 'type': 'iso-8601'}, 'message': {'key': 'message', 'type': 'str'}, 'status': {'key': 'status', 'type': 'object'} } - def __init__(self, context=None, id=None, _links=None, completed_date=None, check_runs=None, message=None, status=None): + def __init__(self, context=None, id=None, _links=None, check_runs=None, completed_date=None, message=None, status=None): super(CheckSuite, self).__init__(context=context, id=id) self._links = _links - self.completed_date = completed_date self.check_runs = check_runs + self.completed_date = completed_date self.message = message self.status = status __all__ = [ + 'ApprovalCheckDefinitionReference', 'ApprovalConfig', 'ApprovalConfigSettings', - 'GraphSubjectBase', 'CheckConfigurationRef', + 'CheckIssue', 'CheckRunResult', + 'CheckRunUpdate', 'CheckSuiteRef', 'CheckSuiteRequest', + 'CheckSuiteUpdateParameter', 'CheckType', + 'GraphSubjectBase', 'IdentityRef', 'ReferenceLinks', 'Resource', diff --git a/azure-devops/azure/devops/v7_0/pipelines_checks/pipelines_checks_client.py b/azure-devops/azure/devops/v7_2/pipelines_checks/pipelines_checks_client.py similarity index 79% rename from azure-devops/azure/devops/v7_0/pipelines_checks/pipelines_checks_client.py rename to azure-devops/azure/devops/v7_2/pipelines_checks/pipelines_checks_client.py index 99bbc195..c08923f0 100644 --- a/azure-devops/azure/devops/v7_0/pipelines_checks/pipelines_checks_client.py +++ b/azure-devops/azure/devops/v7_2/pipelines_checks/pipelines_checks_client.py @@ -28,9 +28,9 @@ def __init__(self, base_url=None, creds=None): def add_check_configuration(self, configuration, project): """AddCheckConfiguration. [Preview API] Add a check configuration - :param :class:` ` configuration: + :param :class:` ` configuration: :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -38,7 +38,7 @@ def add_check_configuration(self, configuration, project): content = self._serialize.body(configuration, 'CheckConfiguration') response = self._send(http_method='POST', location_id='86c8381e-5aee-4cde-8ae4-25c0c7f5eaea', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('CheckConfiguration', response) @@ -56,7 +56,7 @@ def delete_check_configuration(self, project, id): route_values['id'] = self._serialize.url('id', id, 'int') self._send(http_method='DELETE', location_id='86c8381e-5aee-4cde-8ae4-25c0c7f5eaea', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) def get_check_configuration(self, project, id, expand=None): @@ -65,7 +65,7 @@ def get_check_configuration(self, project, id, expand=None): :param str project: Project ID or project name :param int id: :param str expand: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -77,7 +77,7 @@ def get_check_configuration(self, project, id, expand=None): query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') response = self._send(http_method='GET', location_id='86c8381e-5aee-4cde-8ae4-25c0c7f5eaea', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('CheckConfiguration', response) @@ -103,7 +103,7 @@ def get_check_configurations_on_resource(self, project, resource_type=None, reso query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') response = self._send(http_method='GET', location_id='86c8381e-5aee-4cde-8ae4-25c0c7f5eaea', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[CheckConfiguration]', self._unwrap_collection(response)) @@ -111,10 +111,10 @@ def get_check_configurations_on_resource(self, project, resource_type=None, reso def update_check_configuration(self, configuration, project, id): """UpdateCheckConfiguration. [Preview API] Update check configuration - :param :class:` ` configuration: check configuration + :param :class:` ` configuration: check configuration :param str project: Project ID or project name :param int id: check configuration id - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -124,7 +124,7 @@ def update_check_configuration(self, configuration, project, id): content = self._serialize.body(configuration, 'CheckConfiguration') response = self._send(http_method='PATCH', location_id='86c8381e-5aee-4cde-8ae4-25c0c7f5eaea', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('CheckConfiguration', response) @@ -146,7 +146,7 @@ def query_check_configurations_on_resources(self, resources, project, expand=Non content = self._serialize.body(resources, '[Resource]') response = self._send(http_method='POST', location_id='5f3d0e64-f943-4584-8811-77eb495e831e', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters, content=content) @@ -155,10 +155,10 @@ def query_check_configurations_on_resources(self, resources, project, expand=Non def evaluate_check_suite(self, request, project, expand=None): """EvaluateCheckSuite. [Preview API] Initiate an evaluation for a check in a pipeline - :param :class:` ` request: + :param :class:` ` request: :param str project: Project ID or project name :param str expand: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -169,7 +169,7 @@ def evaluate_check_suite(self, request, project, expand=None): content = self._serialize.body(request, 'CheckSuiteRequest') response = self._send(http_method='POST', location_id='91282c1d-c183-444f-9554-1485bfb3879d', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters, content=content) @@ -181,7 +181,7 @@ def get_check_suite(self, project, check_suite_id, expand=None): :param str project: Project ID or project name :param str check_suite_id: :param str expand: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -193,8 +193,34 @@ def get_check_suite(self, project, check_suite_id, expand=None): query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') response = self._send(http_method='GET', location_id='91282c1d-c183-444f-9554-1485bfb3879d', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('CheckSuite', response) + def update_check_suite(self, request, project, check_suite_id, expand=None): + """UpdateCheckSuite. + [Preview API] Update a check run of a check suite + :param :class:` ` request: + :param str project: Project ID or project name + :param str check_suite_id: + :param str expand: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if check_suite_id is not None: + route_values['checkSuiteId'] = self._serialize.url('check_suite_id', check_suite_id, 'str') + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') + content = self._serialize.body(request, 'CheckSuiteUpdateParameter') + response = self._send(http_method='PATCH', + location_id='91282c1d-c183-444f-9554-1485bfb3879d', + version='7.2-preview.1', + route_values=route_values, + query_parameters=query_parameters, + content=content) + return self._deserialize('CheckSuite', response) + diff --git a/azure-devops/azure/devops/v7_0/policy/__init__.py b/azure-devops/azure/devops/v7_2/policy/__init__.py similarity index 100% rename from azure-devops/azure/devops/v7_0/policy/__init__.py rename to azure-devops/azure/devops/v7_2/policy/__init__.py diff --git a/azure-devops/azure/devops/v7_0/policy/models.py b/azure-devops/azure/devops/v7_2/policy/models.py similarity index 95% rename from azure-devops/azure/devops/v7_0/policy/models.py rename to azure-devops/azure/devops/v7_2/policy/models.py index 8d7ff992..97bdb69e 100644 --- a/azure-devops/azure/devops/v7_0/policy/models.py +++ b/azure-devops/azure/devops/v7_2/policy/models.py @@ -12,7 +12,7 @@ class GraphSubjectBase(Model): """ :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. :type descriptor: str :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. @@ -39,7 +39,7 @@ def __init__(self, _links=None, descriptor=None, display_name=None, url=None): class IdentityRef(GraphSubjectBase): """ :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. :type descriptor: str :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. @@ -102,7 +102,7 @@ class PolicyConfigurationRef(Model): :param id: The policy configuration ID. :type id: int :param type: The policy configuration type. - :type type: :class:`PolicyTypeRef ` + :type type: :class:`PolicyTypeRef ` :param url: The URL where the policy configuration can be retrieved. :type url: str """ @@ -125,15 +125,15 @@ class PolicyEvaluationRecord(Model): This record encapsulates the current state of a policy as it applies to one specific pull request. Each pull request has a unique PolicyEvaluationRecord for each pull request which the policy applies to. :param _links: Links to other related objects - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param artifact_id: A string which uniquely identifies the target of a policy evaluation. :type artifact_id: str :param completed_date: Time when this policy finished evaluating on this pull request. :type completed_date: datetime :param configuration: Contains all configuration data for the policy which is being evaluated. - :type configuration: :class:`PolicyConfiguration ` + :type configuration: :class:`PolicyConfiguration ` :param context: Internal context data of this policy evaluation. - :type context: :class:`object ` + :type context: :class:`object ` :param evaluation_id: Guid which uniquely identifies this evaluation record (one policy running on one pull request). :type evaluation_id: str :param started_date: Time when this policy was first evaluated on this pull request. @@ -214,7 +214,7 @@ class VersionedPolicyConfigurationRef(PolicyConfigurationRef): :param id: The policy configuration ID. :type id: int :param type: The policy configuration type. - :type type: :class:`PolicyTypeRef ` + :type type: :class:`PolicyTypeRef ` :param url: The URL where the policy configuration can be retrieved. :type url: str :param revision: The policy configuration revision ID. @@ -240,15 +240,15 @@ class PolicyConfiguration(VersionedPolicyConfigurationRef): :param id: The policy configuration ID. :type id: int :param type: The policy configuration type. - :type type: :class:`PolicyTypeRef ` + :type type: :class:`PolicyTypeRef ` :param url: The URL where the policy configuration can be retrieved. :type url: str :param revision: The policy configuration revision ID. :type revision: int :param _links: The links to other objects related to this object. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param created_by: A reference to the identity that created the policy. - :type created_by: :class:`IdentityRef ` + :type created_by: :class:`IdentityRef ` :param created_date: The date and time when the policy was created. :type created_date: datetime :param is_blocking: Indicates whether the policy is blocking. @@ -260,7 +260,7 @@ class PolicyConfiguration(VersionedPolicyConfigurationRef): :param is_enterprise_managed: If set, this policy requires "Manage Enterprise Policies" permission to create, edit, or delete. :type is_enterprise_managed: bool :param settings: The policy configuration settings. - :type settings: :class:`object ` + :type settings: :class:`object ` """ _attribute_map = { @@ -301,7 +301,7 @@ class PolicyType(PolicyTypeRef): :param url: The URL where the policy type can be retrieved. :type url: str :param _links: The links to other objects related to this object. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param description: Detailed description of the policy type. :type description: str """ diff --git a/azure-devops/azure/devops/v7_0/policy/policy_client.py b/azure-devops/azure/devops/v7_2/policy/policy_client.py similarity index 88% rename from azure-devops/azure/devops/v7_0/policy/policy_client.py rename to azure-devops/azure/devops/v7_2/policy/policy_client.py index f08c95ba..1d87d41e 100644 --- a/azure-devops/azure/devops/v7_0/policy/policy_client.py +++ b/azure-devops/azure/devops/v7_2/policy/policy_client.py @@ -25,30 +25,27 @@ def __init__(self, base_url=None, creds=None): resource_area_identifier = 'fb13a388-40dd-4a04-b530-013a739c72ef' - def create_policy_configuration(self, configuration, project, configuration_id=None): + def create_policy_configuration(self, configuration, project): """CreatePolicyConfiguration. - Create a policy configuration of a given policy type. - :param :class:` ` configuration: The policy configuration to create. + [Preview API] Create a policy configuration of a given policy type. + :param :class:` ` configuration: The policy configuration to create. :param str project: Project ID or project name - :param int configuration_id: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') - if configuration_id is not None: - route_values['configurationId'] = self._serialize.url('configuration_id', configuration_id, 'int') content = self._serialize.body(configuration, 'PolicyConfiguration') response = self._send(http_method='POST', location_id='dad91cbe-d183-45f8-9c6e-9c1164472121', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('PolicyConfiguration', response) def delete_policy_configuration(self, project, configuration_id): """DeletePolicyConfiguration. - Delete a policy configuration by its ID. + [Preview API] Delete a policy configuration by its ID. :param str project: Project ID or project name :param int configuration_id: ID of the policy configuration to delete. """ @@ -59,15 +56,15 @@ def delete_policy_configuration(self, project, configuration_id): route_values['configurationId'] = self._serialize.url('configuration_id', configuration_id, 'int') self._send(http_method='DELETE', location_id='dad91cbe-d183-45f8-9c6e-9c1164472121', - version='7.0', + version='7.2-preview.1', route_values=route_values) def get_policy_configuration(self, project, configuration_id): """GetPolicyConfiguration. - Get a policy configuration by its ID. + [Preview API] Get a policy configuration by its ID. :param str project: Project ID or project name :param int configuration_id: ID of the policy configuration - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -76,19 +73,19 @@ def get_policy_configuration(self, project, configuration_id): route_values['configurationId'] = self._serialize.url('configuration_id', configuration_id, 'int') response = self._send(http_method='GET', location_id='dad91cbe-d183-45f8-9c6e-9c1164472121', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('PolicyConfiguration', response) def get_policy_configurations(self, project, scope=None, top=None, continuation_token=None, policy_type=None): """GetPolicyConfigurations. - Get a list of policy configurations in a project. + [Preview API] Get a list of policy configurations in a project. :param str project: Project ID or project name :param str scope: [Provided for legacy reasons] The scope on which a subset of policies is defined. :param int top: Maximum number of policies to return. :param str continuation_token: The continuation token used for pagination. :param str policy_type: Filter returned policies to only this type - :rtype: :class:`<[PolicyConfiguration]> ` + :rtype: :class:`<[PolicyConfiguration]> ` """ route_values = {} if project is not None: @@ -104,18 +101,18 @@ def get_policy_configurations(self, project, scope=None, top=None, continuation_ query_parameters['policyType'] = self._serialize.query('policy_type', policy_type, 'str') response = self._send(http_method='GET', location_id='dad91cbe-d183-45f8-9c6e-9c1164472121', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[PolicyConfiguration]', self._unwrap_collection(response)) def update_policy_configuration(self, configuration, project, configuration_id): """UpdatePolicyConfiguration. - Update a policy configuration by its ID. - :param :class:` ` configuration: The policy configuration to update. + [Preview API] Update a policy configuration by its ID. + :param :class:` ` configuration: The policy configuration to update. :param str project: Project ID or project name :param int configuration_id: ID of the existing policy configuration to be updated. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -125,7 +122,7 @@ def update_policy_configuration(self, configuration, project, configuration_id): content = self._serialize.body(configuration, 'PolicyConfiguration') response = self._send(http_method='PUT', location_id='dad91cbe-d183-45f8-9c6e-9c1164472121', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('PolicyConfiguration', response) @@ -135,7 +132,7 @@ def get_policy_evaluation(self, project, evaluation_id): [Preview API] Gets the present evaluation state of a policy. :param str project: Project ID or project name :param str evaluation_id: ID of the policy evaluation to be retrieved. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -144,7 +141,7 @@ def get_policy_evaluation(self, project, evaluation_id): route_values['evaluationId'] = self._serialize.url('evaluation_id', evaluation_id, 'str') response = self._send(http_method='GET', location_id='46aecb7a-5d2c-4647-897b-0209505a9fe4', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) return self._deserialize('PolicyEvaluationRecord', response) @@ -153,7 +150,7 @@ def requeue_policy_evaluation(self, project, evaluation_id): [Preview API] Requeue the policy evaluation. :param str project: Project ID or project name :param str evaluation_id: ID of the policy evaluation to be retrieved. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -162,7 +159,7 @@ def requeue_policy_evaluation(self, project, evaluation_id): route_values['evaluationId'] = self._serialize.url('evaluation_id', evaluation_id, 'str') response = self._send(http_method='PATCH', location_id='46aecb7a-5d2c-4647-897b-0209505a9fe4', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) return self._deserialize('PolicyEvaluationRecord', response) @@ -190,18 +187,18 @@ def get_policy_evaluations(self, project, artifact_id, include_not_applicable=No query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') response = self._send(http_method='GET', location_id='c23ddff5-229c-4d04-a80b-0fdce9f360c8', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[PolicyEvaluationRecord]', self._unwrap_collection(response)) def get_policy_configuration_revision(self, project, configuration_id, revision_id): """GetPolicyConfigurationRevision. - Retrieve a specific revision of a given policy by ID. + [Preview API] Retrieve a specific revision of a given policy by ID. :param str project: Project ID or project name :param int configuration_id: The policy configuration ID. :param int revision_id: The revision ID. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -212,13 +209,13 @@ def get_policy_configuration_revision(self, project, configuration_id, revision_ route_values['revisionId'] = self._serialize.url('revision_id', revision_id, 'int') response = self._send(http_method='GET', location_id='fe1e68a2-60d3-43cb-855b-85e41ae97c95', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('PolicyConfiguration', response) def get_policy_configuration_revisions(self, project, configuration_id, top=None, skip=None): """GetPolicyConfigurationRevisions. - Retrieve all revisions for a given policy. + [Preview API] Retrieve all revisions for a given policy. :param str project: Project ID or project name :param int configuration_id: The policy configuration ID. :param int top: The number of revisions to retrieve. @@ -237,17 +234,17 @@ def get_policy_configuration_revisions(self, project, configuration_id, top=None query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') response = self._send(http_method='GET', location_id='fe1e68a2-60d3-43cb-855b-85e41ae97c95', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[PolicyConfiguration]', self._unwrap_collection(response)) def get_policy_type(self, project, type_id): """GetPolicyType. - Retrieve a specific policy type by ID. + [Preview API] Retrieve a specific policy type by ID. :param str project: Project ID or project name :param str type_id: The policy ID. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -256,13 +253,13 @@ def get_policy_type(self, project, type_id): route_values['typeId'] = self._serialize.url('type_id', type_id, 'str') response = self._send(http_method='GET', location_id='44096322-2d3d-466a-bb30-d1b7de69f61f', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('PolicyType', response) def get_policy_types(self, project): """GetPolicyTypes. - Retrieve all available policy types. + [Preview API] Retrieve all available policy types. :param str project: Project ID or project name :rtype: [PolicyType] """ @@ -271,7 +268,7 @@ def get_policy_types(self, project): route_values['project'] = self._serialize.url('project', project, 'str') response = self._send(http_method='GET', location_id='44096322-2d3d-466a-bb30-d1b7de69f61f', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('[PolicyType]', self._unwrap_collection(response)) diff --git a/azure-devops/azure/devops/v7_0/profile/__init__.py b/azure-devops/azure/devops/v7_2/profile/__init__.py similarity index 100% rename from azure-devops/azure/devops/v7_0/profile/__init__.py rename to azure-devops/azure/devops/v7_2/profile/__init__.py diff --git a/azure-devops/azure/devops/v7_0/profile/models.py b/azure-devops/azure/devops/v7_2/profile/models.py similarity index 98% rename from azure-devops/azure/devops/v7_0/profile/models.py rename to azure-devops/azure/devops/v7_2/profile/models.py index e10bf059..a8e2889c 100644 --- a/azure-devops/azure/devops/v7_0/profile/models.py +++ b/azure-devops/azure/devops/v7_2/profile/models.py @@ -149,7 +149,7 @@ class Profile(Model): A user profile. :param application_container: The attributes of this profile. - :type application_container: :class:`AttributesContainer ` + :type application_container: :class:`AttributesContainer ` :param core_attributes: The core attributes of this profile. :type core_attributes: dict :param core_revision: The maximum revision number of any attribute. @@ -188,7 +188,7 @@ def __init__(self, application_container=None, core_attributes=None, core_revisi class ProfileAttributeBase(Model): """ :param descriptor: The descriptor of the attribute. - :type descriptor: :class:`AttributeDescriptor ` + :type descriptor: :class:`AttributeDescriptor ` :param revision: The revision number of the attribute. :type revision: int :param time_stamp: The time the attribute was last changed. @@ -242,7 +242,7 @@ class ProfileRegions(Model): :param opt_out_contact_consent_requirement_regions: List of country/region code with contact consent requirement type of opt-out :type opt_out_contact_consent_requirement_regions: list of str :param regions: List of country/regions - :type regions: list of :class:`ProfileRegion ` + :type regions: list of :class:`ProfileRegion ` """ _attribute_map = { diff --git a/azure-devops/azure/devops/v7_0/profile/profile_client.py b/azure-devops/azure/devops/v7_2/profile/profile_client.py similarity index 95% rename from azure-devops/azure/devops/v7_0/profile/profile_client.py rename to azure-devops/azure/devops/v7_2/profile/profile_client.py index cb3cc767..e249b274 100644 --- a/azure-devops/azure/devops/v7_0/profile/profile_client.py +++ b/azure-devops/azure/devops/v7_2/profile/profile_client.py @@ -27,14 +27,14 @@ def __init__(self, base_url=None, creds=None): def get_profile(self, id, details=None, with_attributes=None, partition=None, core_attributes=None, force_refresh=None): """GetProfile. - Gets a user profile. + [Preview API] Gets a user profile. :param str id: The ID of the target user profile within the same organization, or 'me' to get the profile of the current authenticated user. :param bool details: Return public profile information such as display name, email address, country, etc. If false, the withAttributes parameter is ignored. :param bool with_attributes: If true, gets the attributes (named key-value pairs of arbitrary data) associated with the profile. The partition parameter must also have a value. :param str partition: The partition (named group) of attributes to return. :param str core_attributes: A comma-delimited list of core profile attributes to return. Valid values are Email, Avatar, DisplayName, and ContactWithOffers. :param bool force_refresh: Not used in this version of the API. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if id is not None: @@ -52,7 +52,7 @@ def get_profile(self, id, details=None, with_attributes=None, partition=None, co query_parameters['forceRefresh'] = self._serialize.query('force_refresh', force_refresh, 'bool') response = self._send(http_method='GET', location_id='f83735dc-483f-4238-a291-d45f6080a9af', - version='7.0', + version='7.2-preview.3', route_values=route_values, query_parameters=query_parameters) return self._deserialize('Profile', response) diff --git a/azure-devops/azure/devops/v7_0/profile_regions/__init__.py b/azure-devops/azure/devops/v7_2/profile_regions/__init__.py similarity index 100% rename from azure-devops/azure/devops/v7_0/profile_regions/__init__.py rename to azure-devops/azure/devops/v7_2/profile_regions/__init__.py diff --git a/azure-devops/azure/devops/v7_0/profile_regions/models.py b/azure-devops/azure/devops/v7_2/profile_regions/models.py similarity index 98% rename from azure-devops/azure/devops/v7_0/profile_regions/models.py rename to azure-devops/azure/devops/v7_2/profile_regions/models.py index 5c2f3a97..09df31fd 100644 --- a/azure-devops/azure/devops/v7_0/profile_regions/models.py +++ b/azure-devops/azure/devops/v7_2/profile_regions/models.py @@ -54,7 +54,7 @@ class ProfileRegions(Model): :param opt_out_contact_consent_requirement_regions: List of country/region code with contact consent requirement type of opt-out :type opt_out_contact_consent_requirement_regions: list of str :param regions: List of country/regions - :type regions: list of :class:`ProfileRegion ` + :type regions: list of :class:`ProfileRegion ` """ _attribute_map = { diff --git a/azure-devops/azure/devops/v7_0/profile_regions/profile_regions_client.py b/azure-devops/azure/devops/v7_2/profile_regions/profile_regions_client.py similarity index 89% rename from azure-devops/azure/devops/v7_0/profile_regions/profile_regions_client.py rename to azure-devops/azure/devops/v7_2/profile_regions/profile_regions_client.py index fd49c2b9..546495e3 100644 --- a/azure-devops/azure/devops/v7_0/profile_regions/profile_regions_client.py +++ b/azure-devops/azure/devops/v7_2/profile_regions/profile_regions_client.py @@ -29,24 +29,24 @@ def get_geo_region(self, ip): """GetGeoRegion. [Preview API] Lookup up country/region based on provided IPv4, null if using the remote IPv4 address. :param str ip: - :rtype: :class:` ` + :rtype: :class:` ` """ query_parameters = {} if ip is not None: query_parameters['ip'] = self._serialize.query('ip', ip, 'str') response = self._send(http_method='GET', location_id='35b3ff1d-ab4c-4d1c-98bb-f6ea21d86bd9', - version='7.0-preview.1', + version='7.2-preview.1', query_parameters=query_parameters) return self._deserialize('GeoRegion', response) def get_regions(self): """GetRegions. [Preview API] - :rtype: :class:` ` + :rtype: :class:` ` """ response = self._send(http_method='GET', location_id='b129ca90-999d-47bb-ab37-0dcf784ee633', - version='7.0-preview.1') + version='7.2-preview.1') return self._deserialize('ProfileRegions', response) diff --git a/azure-devops/azure/devops/v7_0/project_analysis/__init__.py b/azure-devops/azure/devops/v7_2/project_analysis/__init__.py similarity index 100% rename from azure-devops/azure/devops/v7_0/project_analysis/__init__.py rename to azure-devops/azure/devops/v7_2/project_analysis/__init__.py diff --git a/azure-devops/azure/devops/v7_0/project_analysis/models.py b/azure-devops/azure/devops/v7_2/project_analysis/models.py similarity index 96% rename from azure-devops/azure/devops/v7_0/project_analysis/models.py rename to azure-devops/azure/devops/v7_2/project_analysis/models.py index e8f63dea..de305317 100644 --- a/azure-devops/azure/devops/v7_0/project_analysis/models.py +++ b/azure-devops/azure/devops/v7_2/project_analysis/models.py @@ -98,7 +98,7 @@ class ProjectActivityMetrics(Model): :param code_changes_count: :type code_changes_count: int :param code_changes_trend: - :type code_changes_trend: list of :class:`CodeChangeTrendItem ` + :type code_changes_trend: list of :class:`CodeChangeTrendItem ` :param project_id: :type project_id: str :param pull_requests_completed_count: @@ -137,9 +137,9 @@ class ProjectLanguageAnalytics(LanguageMetricsSecuredObject): :param id: :type id: str :param language_breakdown: - :type language_breakdown: list of :class:`LanguageStatistics ` + :type language_breakdown: list of :class:`LanguageStatistics ` :param repository_language_analytics: - :type repository_language_analytics: list of :class:`RepositoryLanguageAnalytics ` + :type repository_language_analytics: list of :class:`RepositoryLanguageAnalytics ` :param result_phase: :type result_phase: object :param url: @@ -171,7 +171,7 @@ class RepositoryActivityMetrics(Model): :param code_changes_count: :type code_changes_count: int :param code_changes_trend: - :type code_changes_trend: list of :class:`CodeChangeTrendItem ` + :type code_changes_trend: list of :class:`CodeChangeTrendItem ` :param repository_id: :type repository_id: str """ @@ -200,7 +200,7 @@ class RepositoryLanguageAnalytics(LanguageMetricsSecuredObject): :param id: :type id: str :param language_breakdown: - :type language_breakdown: list of :class:`LanguageStatistics ` + :type language_breakdown: list of :class:`LanguageStatistics ` :param name: :type name: str :param result_phase: diff --git a/azure-devops/azure/devops/v7_0/project_analysis/project_analysis_client.py b/azure-devops/azure/devops/v7_2/project_analysis/project_analysis_client.py similarity index 91% rename from azure-devops/azure/devops/v7_0/project_analysis/project_analysis_client.py rename to azure-devops/azure/devops/v7_2/project_analysis/project_analysis_client.py index 333e0a65..51a2c36c 100644 --- a/azure-devops/azure/devops/v7_0/project_analysis/project_analysis_client.py +++ b/azure-devops/azure/devops/v7_2/project_analysis/project_analysis_client.py @@ -27,24 +27,26 @@ def __init__(self, base_url=None, creds=None): def get_project_language_analytics(self, project): """GetProjectLanguageAnalytics. + [Preview API] :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') response = self._send(http_method='GET', location_id='5b02a779-1867-433f-90b7-d23ed5e33e57', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('ProjectLanguageAnalytics', response) def get_project_activity_metrics(self, project, from_date, aggregation_type): """GetProjectActivityMetrics. + [Preview API] :param str project: Project ID or project name :param datetime from_date: :param str aggregation_type: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -56,14 +58,14 @@ def get_project_activity_metrics(self, project, from_date, aggregation_type): query_parameters['aggregationType'] = self._serialize.query('aggregation_type', aggregation_type, 'str') response = self._send(http_method='GET', location_id='e40ae584-9ea6-4f06-a7c7-6284651b466b', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('ProjectActivityMetrics', response) def get_git_repositories_activity_metrics(self, project, from_date, aggregation_type, skip, top): """GetGitRepositoriesActivityMetrics. - Retrieves git activity metrics for repositories matching a specified criteria. + [Preview API] Retrieves git activity metrics for repositories matching a specified criteria. :param str project: Project ID or project name :param datetime from_date: Date from which, the trends are to be fetched. :param str aggregation_type: Bucket size on which, trends are to be aggregated. @@ -85,18 +87,19 @@ def get_git_repositories_activity_metrics(self, project, from_date, aggregation_ query_parameters['$top'] = self._serialize.query('top', top, 'int') response = self._send(http_method='GET', location_id='df7fbbca-630a-40e3-8aa3-7a3faf66947e', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[RepositoryActivityMetrics]', self._unwrap_collection(response)) def get_repository_activity_metrics(self, project, repository_id, from_date, aggregation_type): """GetRepositoryActivityMetrics. + [Preview API] :param str project: Project ID or project name :param str repository_id: :param datetime from_date: :param str aggregation_type: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -110,7 +113,7 @@ def get_repository_activity_metrics(self, project, repository_id, from_date, agg query_parameters['aggregationType'] = self._serialize.query('aggregation_type', aggregation_type, 'str') response = self._send(http_method='GET', location_id='df7fbbca-630a-40e3-8aa3-7a3faf66947e', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('RepositoryActivityMetrics', response) diff --git a/azure-devops/azure/devops/v7_0/provenance/__init__.py b/azure-devops/azure/devops/v7_2/provenance/__init__.py similarity index 100% rename from azure-devops/azure/devops/v7_0/provenance/__init__.py rename to azure-devops/azure/devops/v7_2/provenance/__init__.py diff --git a/azure-devops/azure/devops/v7_0/provenance/models.py b/azure-devops/azure/devops/v7_2/provenance/models.py similarity index 100% rename from azure-devops/azure/devops/v7_0/provenance/models.py rename to azure-devops/azure/devops/v7_2/provenance/models.py diff --git a/azure-devops/azure/devops/v7_0/provenance/provenance_client.py b/azure-devops/azure/devops/v7_2/provenance/provenance_client.py similarity index 92% rename from azure-devops/azure/devops/v7_0/provenance/provenance_client.py rename to azure-devops/azure/devops/v7_2/provenance/provenance_client.py index 69baa5d0..17ef7fa8 100644 --- a/azure-devops/azure/devops/v7_0/provenance/provenance_client.py +++ b/azure-devops/azure/devops/v7_2/provenance/provenance_client.py @@ -28,10 +28,10 @@ def __init__(self, base_url=None, creds=None): def create_session(self, session_request, protocol, project=None): """CreateSession. [Preview API] Creates a session, a wrapper around a feed that can store additional metadata on the packages published to it. - :param :class:` ` session_request: The feed and metadata for the session + :param :class:` ` session_request: The feed and metadata for the session :param str protocol: The protocol that the session will target :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -41,7 +41,7 @@ def create_session(self, session_request, protocol, project=None): content = self._serialize.body(session_request, 'SessionRequest') response = self._send(http_method='POST', location_id='503b4e54-ebf4-4d04-8eee-21c00823c2ac', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('SessionResponse', response) diff --git a/azure-devops/azure/devops/v7_0/py_pi_api/__init__.py b/azure-devops/azure/devops/v7_2/py_pi_api/__init__.py similarity index 100% rename from azure-devops/azure/devops/v7_0/py_pi_api/__init__.py rename to azure-devops/azure/devops/v7_2/py_pi_api/__init__.py diff --git a/azure-devops/azure/devops/v7_0/py_pi_api/models.py b/azure-devops/azure/devops/v7_2/py_pi_api/models.py similarity index 97% rename from azure-devops/azure/devops/v7_0/py_pi_api/models.py rename to azure-devops/azure/devops/v7_2/py_pi_api/models.py index d28208d9..c72c8ce6 100644 --- a/azure-devops/azure/devops/v7_0/py_pi_api/models.py +++ b/azure-devops/azure/devops/v7_2/py_pi_api/models.py @@ -77,7 +77,7 @@ class Package(Model): Package version metadata for a Python package :param _links: Related REST links. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param deleted_date: If and when the package was deleted. :type deleted_date: datetime :param id: Package Id. @@ -87,7 +87,7 @@ class Package(Model): :param permanently_deleted_date: If and when the package was permanently deleted. :type permanently_deleted_date: datetime :param source_chain: The history of upstream sources for this package. The first source in the list is the immediate source from which this package was saved. - :type source_chain: list of :class:`UpstreamSourceInfo ` + :type source_chain: list of :class:`UpstreamSourceInfo ` :param version: The version of the package. :type version: str """ @@ -116,7 +116,7 @@ def __init__(self, _links=None, deleted_date=None, id=None, name=None, permanent class PackageVersionDetails(Model): """ :param views: The view to which the package version will be added - :type views: :class:`JsonPatchOperation ` + :type views: :class:`JsonPatchOperation ` """ _attribute_map = { @@ -133,11 +133,11 @@ class PyPiPackagesBatchRequest(Model): A batch of operations to apply to package versions. :param data: Data required to perform the operation. This is optional based on the type of the operation. Use BatchPromoteData if performing a promote operation. - :type data: :class:`BatchOperationData ` + :type data: :class:`BatchOperationData ` :param operation: Type of operation that needs to be performed on packages. :type operation: object :param packages: The packages onto which the operation will be performed. - :type packages: list of :class:`MinimalPackageDetails ` + :type packages: list of :class:`MinimalPackageDetails ` """ _attribute_map = { diff --git a/azure-devops/azure/devops/v7_0/py_pi_api/py_pi_api_client.py b/azure-devops/azure/devops/v7_2/py_pi_api/py_pi_api_client.py similarity index 93% rename from azure-devops/azure/devops/v7_0/py_pi_api/py_pi_api_client.py rename to azure-devops/azure/devops/v7_2/py_pi_api/py_pi_api_client.py index 1ea6ee28..fb1bd51e 100644 --- a/azure-devops/azure/devops/v7_0/py_pi_api/py_pi_api_client.py +++ b/azure-devops/azure/devops/v7_2/py_pi_api/py_pi_api_client.py @@ -48,7 +48,7 @@ def download_package(self, feed_id, package_name, package_version, file_name, pr route_values['fileName'] = self._serialize.url('file_name', file_name, 'str') response = self._send(http_method='GET', location_id='97218bae-a64d-4381-9257-b5b7951f0b98', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, accept_media_type='application/octet-stream') if "callback" in kwargs: @@ -60,7 +60,7 @@ def download_package(self, feed_id, package_name, package_version, file_name, pr def update_package_versions(self, batch_request, feed_id, project=None): """UpdatePackageVersions. [Preview API] Update several packages from a single feed in a single request. The updates to the packages do not happen atomically. - :param :class:` ` batch_request: Information about the packages to update, the operation to perform, and its associated data. + :param :class:` ` batch_request: Information about the packages to update, the operation to perform, and its associated data. :param str feed_id: Name or ID of the feed. :param str project: Project ID or project name """ @@ -72,14 +72,14 @@ def update_package_versions(self, batch_request, feed_id, project=None): content = self._serialize.body(batch_request, 'PyPiPackagesBatchRequest') self._send(http_method='POST', location_id='4e53d561-70c1-4c98-b937-0f22acb27b0b', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, content=content) def update_recycle_bin_package_versions(self, batch_request, feed_id, project=None): """UpdateRecycleBinPackageVersions. [Preview API] Delete or restore several package versions from the recycle bin. - :param :class:` ` batch_request: Information about the packages to update, the operation to perform, and its associated data. Operation must be PermanentDelete or RestoreToFeed + :param :class:` ` batch_request: Information about the packages to update, the operation to perform, and its associated data. Operation must be PermanentDelete or RestoreToFeed :param str feed_id: Feed which contains the packages to update. :param str project: Project ID or project name """ @@ -91,7 +91,7 @@ def update_recycle_bin_package_versions(self, batch_request, feed_id, project=No content = self._serialize.body(batch_request, 'PyPiPackagesBatchRequest') self._send(http_method='POST', location_id='d2d89918-c69e-4ef4-b357-1c3ccb4d28d2', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, content=content) @@ -114,7 +114,7 @@ def delete_package_version_from_recycle_bin(self, feed_id, package_name, package route_values['packageVersion'] = self._serialize.url('package_version', package_version, 'str') self._send(http_method='DELETE', location_id='07143752-3d94-45fd-86c2-0c77ed87847b', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) def get_package_version_metadata_from_recycle_bin(self, feed_id, package_name, package_version, project=None): @@ -124,7 +124,7 @@ def get_package_version_metadata_from_recycle_bin(self, feed_id, package_name, p :param str package_name: Name of the package. :param str package_version: Version of the package. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -137,14 +137,14 @@ def get_package_version_metadata_from_recycle_bin(self, feed_id, package_name, p route_values['packageVersion'] = self._serialize.url('package_version', package_version, 'str') response = self._send(http_method='GET', location_id='07143752-3d94-45fd-86c2-0c77ed87847b', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) return self._deserialize('PyPiPackageVersionDeletionState', response) def restore_package_version_from_recycle_bin(self, package_version_details, feed_id, package_name, package_version, project=None): """RestorePackageVersionFromRecycleBin. [Preview API] Restore a package version from the recycle bin to its associated feed. - :param :class:` ` package_version_details: Set the 'Deleted' state to 'false' to restore the package to its feed. + :param :class:` ` package_version_details: Set the 'Deleted' state to 'false' to restore the package to its feed. :param str feed_id: Name or ID of the feed. :param str package_name: Name of the package. :param str package_version: Version of the package. @@ -162,7 +162,7 @@ def restore_package_version_from_recycle_bin(self, package_version_details, feed content = self._serialize.body(package_version_details, 'PyPiRecycleBinPackageVersionDetails') self._send(http_method='PATCH', location_id='07143752-3d94-45fd-86c2-0c77ed87847b', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, content=content) @@ -172,7 +172,7 @@ def get_upstreaming_behavior(self, feed_id, package_name, project=None): :param str feed_id: The name or id of the feed :param str package_name: The name of the package :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -183,7 +183,7 @@ def get_upstreaming_behavior(self, feed_id, package_name, project=None): route_values['packageName'] = self._serialize.url('package_name', package_name, 'str') response = self._send(http_method='GET', location_id='21b8c9a7-7080-45be-a5ba-e50bb4c18130', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) return self._deserialize('UpstreamingBehavior', response) @@ -192,7 +192,7 @@ def set_upstreaming_behavior(self, feed_id, package_name, behavior, project=None [Preview API] Set the upstreaming behavior of a package within the context of a feed :param str feed_id: The name or id of the feed :param str package_name: The name of the package - :param :class:` ` behavior: The behavior to apply to the package within the scope of the feed + :param :class:` ` behavior: The behavior to apply to the package within the scope of the feed :param str project: Project ID or project name """ route_values = {} @@ -205,7 +205,7 @@ def set_upstreaming_behavior(self, feed_id, package_name, behavior, project=None content = self._serialize.body(behavior, 'UpstreamingBehavior') self._send(http_method='PATCH', location_id='21b8c9a7-7080-45be-a5ba-e50bb4c18130', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, content=content) @@ -216,7 +216,7 @@ def delete_package_version(self, feed_id, package_name, package_version, project :param str package_name: Name of the package. :param str package_version: Version of the package. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -229,7 +229,7 @@ def delete_package_version(self, feed_id, package_name, package_version, project route_values['packageVersion'] = self._serialize.url('package_version', package_version, 'str') response = self._send(http_method='DELETE', location_id='d146ac7e-9e3f-4448-b956-f9bb3bdf9b2e', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) return self._deserialize('Package', response) @@ -241,7 +241,7 @@ def get_package_version(self, feed_id, package_name, package_version, project=No :param str package_version: Version of the package. :param str project: Project ID or project name :param bool show_deleted: True to show information for deleted package versions. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -257,7 +257,7 @@ def get_package_version(self, feed_id, package_name, package_version, project=No query_parameters['showDeleted'] = self._serialize.query('show_deleted', show_deleted, 'bool') response = self._send(http_method='GET', location_id='d146ac7e-9e3f-4448-b956-f9bb3bdf9b2e', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('Package', response) @@ -265,7 +265,7 @@ def get_package_version(self, feed_id, package_name, package_version, project=No def update_package_version(self, package_version_details, feed_id, package_name, package_version, project=None): """UpdatePackageVersion. [Preview API] Update state for a package version. - :param :class:` ` package_version_details: Details to be updated. + :param :class:` ` package_version_details: Details to be updated. :param str feed_id: Name or ID of the feed. :param str package_name: Name of the package. :param str package_version: Version of the package. @@ -283,7 +283,7 @@ def update_package_version(self, package_version_details, feed_id, package_name, content = self._serialize.body(package_version_details, 'PackageVersionDetails') self._send(http_method='PATCH', location_id='d146ac7e-9e3f-4448-b956-f9bb3bdf9b2e', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, content=content) diff --git a/azure-devops/azure/devops/v7_0/release/__init__.py b/azure-devops/azure/devops/v7_2/release/__init__.py similarity index 100% rename from azure-devops/azure/devops/v7_0/release/__init__.py rename to azure-devops/azure/devops/v7_2/release/__init__.py index e4dc0746..d22fe74a 100644 --- a/azure-devops/azure/devops/v7_0/release/__init__.py +++ b/azure-devops/azure/devops/v7_2/release/__init__.py @@ -22,6 +22,7 @@ 'AuthorizationHeader', 'AutoTriggerIssue', 'BuildVersion', + 'Change', 'ComplianceSettings', 'Condition', 'ConfigurationVariableValue', @@ -40,7 +41,6 @@ 'Folder', 'GateUpdateMetadata', 'GraphSubjectBase', - 'Change', 'IdentityRef', 'IgnoredGate', 'InputDescriptor', @@ -89,9 +89,9 @@ 'ReleaseGates', 'ReleaseReference', 'ReleaseRevision', + 'ReleaseSchedule', 'ReleaseSettings', 'ReleaseShallowReference', - 'ReleaseSchedule', 'ReleaseStartEnvironmentMetadata', 'ReleaseStartMetadata', 'ReleaseTask', diff --git a/azure-devops/azure/devops/v7_0/release/models.py b/azure-devops/azure/devops/v7_2/release/models.py similarity index 94% rename from azure-devops/azure/devops/v7_0/release/models.py rename to azure-devops/azure/devops/v7_2/release/models.py index 7051b420..85919c9e 100644 --- a/azure-devops/azure/devops/v7_0/release/models.py +++ b/azure-devops/azure/devops/v7_2/release/models.py @@ -115,7 +115,7 @@ class ArtifactMetadata(Model): :param alias: Sets alias of artifact. :type alias: str :param instance_reference: Sets instance reference of artifact. e.g. for build artifact it is build number. - :type instance_reference: :class:`BuildVersion ` + :type instance_reference: :class:`BuildVersion ` """ _attribute_map = { @@ -186,7 +186,7 @@ def __init__(self, is_trigger_supported=None, is_trigger_supported_only_in_hoste class ArtifactTypeDefinition(Model): """ :param artifact_trigger_configuration: Gets or sets the artifact trigger configuration of artifact type definition. - :type artifact_trigger_configuration: :class:`ArtifactTriggerConfiguration ` + :type artifact_trigger_configuration: :class:`ArtifactTriggerConfiguration ` :param artifact_type: Gets or sets the artifact type of artifact type definition. Valid values are 'Build', 'Package', 'Source' or 'ContainerImage'. :type artifact_type: str :param display_name: Gets or sets the display name of artifact type definition. @@ -194,7 +194,7 @@ class ArtifactTypeDefinition(Model): :param endpoint_type_id: Gets or sets the endpoint type id of artifact type definition. :type endpoint_type_id: str :param input_descriptors: Gets or sets the input descriptors of artifact type definition. - :type input_descriptors: list of :class:`InputDescriptor ` + :type input_descriptors: list of :class:`InputDescriptor ` :param is_commits_traceability_supported: Gets or sets the is commits tracebility supported value of artifact type defintion. :type is_commits_traceability_supported: bool :param is_workitems_traceability_supported: Gets or sets the is workitems tracebility supported value of artifact type defintion. @@ -235,13 +235,13 @@ class ArtifactVersion(Model): :param alias: Gets or sets the alias of artifact. :type alias: str :param default_version: Gets or sets the default version of artifact. - :type default_version: :class:`BuildVersion ` + :type default_version: :class:`BuildVersion ` :param error_message: Gets or sets the error message encountered during querying of versions for artifact. :type error_message: str :param source_id: :type source_id: str :param versions: Gets or sets the list of build versions of artifact. - :type versions: list of :class:`BuildVersion ` + :type versions: list of :class:`BuildVersion ` """ _attribute_map = { @@ -264,7 +264,7 @@ def __init__(self, alias=None, default_version=None, error_message=None, source_ class ArtifactVersionQueryResult(Model): """ :param artifact_versions: Gets or sets the list for artifact versions of artifact version query result. - :type artifact_versions: list of :class:`ArtifactVersion ` + :type artifact_versions: list of :class:`ArtifactVersion ` """ _attribute_map = { @@ -298,13 +298,13 @@ def __init__(self, name=None, value=None): class AutoTriggerIssue(Model): """ :param issue: - :type issue: :class:`Issue ` + :type issue: :class:`Issue ` :param issue_source: :type issue_source: object :param project: - :type project: :class:`ProjectReference ` + :type project: :class:`ProjectReference ` :param release_definition_reference: - :type release_definition_reference: :class:`ReleaseDefinitionShallowReference ` + :type release_definition_reference: :class:`ReleaseDefinitionShallowReference ` :param release_trigger_type: :type release_trigger_type: object """ @@ -343,7 +343,7 @@ class BuildVersion(Model): :param source_branch: Gets or sets the source branch for the artifact. :type source_branch: str :param source_pull_request_version: Gets or sets the source pull request version for the artifact. - :type source_pull_request_version: :class:`SourcePullRequestVersion ` + :type source_pull_request_version: :class:`SourcePullRequestVersion ` :param source_repository_id: Gets or sets the repository id for the artifact. :type source_repository_id: str :param source_repository_type: Gets or sets the repository type for the artifact. @@ -381,6 +381,55 @@ def __init__(self, commit_message=None, definition_id=None, definition_name=None self.source_version = source_version +class Change(Model): + """ + Represents a change associated with a build. + + :param author: The author of the change. + :type author: :class:`IdentityRef ` + :param change_type: The type of source. "TfsVersionControl", "TfsGit", etc. + :type change_type: str + :param display_uri: The location of a user-friendly representation of the resource. + :type display_uri: str + :param id: Something that identifies the change. For a commit, this would be the SHA1. For a TFVC changeset, this would be the changeset id. + :type id: str + :param location: The location of the full representation of the resource. + :type location: str + :param message: A description of the change. This might be a commit message or changeset description. + :type message: str + :param pushed_by: The person or process that pushed the change. + :type pushed_by: :class:`IdentityRef ` + :param pusher: The person or process that pushed the change. + :type pusher: str + :param timestamp: A timestamp for the change. + :type timestamp: datetime + """ + + _attribute_map = { + 'author': {'key': 'author', 'type': 'IdentityRef'}, + 'change_type': {'key': 'changeType', 'type': 'str'}, + 'display_uri': {'key': 'displayUri', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'pushed_by': {'key': 'pushedBy', 'type': 'IdentityRef'}, + 'pusher': {'key': 'pusher', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'} + } + + def __init__(self, author=None, change_type=None, display_uri=None, id=None, location=None, message=None, pushed_by=None, pusher=None, timestamp=None): + super(Change, self).__init__() + self.author = author + self.change_type = change_type + self.display_uri = display_uri + self.id = id + self.location = location + self.message = message + self.pushed_by = pushed_by + self.pusher = pusher + self.timestamp = timestamp + + class ComplianceSettings(Model): """ :param check_for_credentials_and_other_secrets: Scan the release definition for secrets @@ -402,6 +451,8 @@ class Condition(Model): :type condition_type: object :param name: Gets or sets the name of the condition. e.g. 'ReleaseStarted'. :type name: str + :param result: The release condition result. + :type result: bool :param value: Gets or set value of the condition. :type value: str """ @@ -409,13 +460,15 @@ class Condition(Model): _attribute_map = { 'condition_type': {'key': 'conditionType', 'type': 'object'}, 'name': {'key': 'name', 'type': 'str'}, + 'result': {'key': 'result', 'type': 'bool'}, 'value': {'key': 'value', 'type': 'str'} } - def __init__(self, condition_type=None, name=None, value=None): + def __init__(self, condition_type=None, name=None, result=None, value=None): super(Condition, self).__init__() self.condition_type = condition_type self.name = name + self.result = result self.value = value @@ -457,7 +510,7 @@ class DataSourceBindingBase(Model): :param endpoint_url: Gets or sets the url of the service endpoint. :type endpoint_url: str :param headers: Gets or sets the authorization headers. - :type headers: list of :class:`AuthorizationHeader ` + :type headers: list of :class:`AuthorizationHeader ` :param initial_context_template: Defines the initial value of the query params :type initial_context_template: str :param parameters: Gets or sets the parameters for the data source. @@ -537,13 +590,13 @@ def __init__(self, definition_environment_id=None, definition_environment_name=N class Deployment(Model): """ :param _links: Gets links to access the deployment. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param attempt: Gets attempt number. :type attempt: int :param completed_on: Gets the date on which deployment is complete. :type completed_on: datetime :param conditions: Gets the list of condition associated with deployment. - :type conditions: list of :class:`Condition ` + :type conditions: list of :class:`Condition ` :param definition_environment_id: Gets release definition environment id. :type definition_environment_id: int :param deployment_status: Gets status of the deployment. @@ -551,31 +604,31 @@ class Deployment(Model): :param id: Gets the unique identifier for deployment. :type id: int :param last_modified_by: Gets the identity who last modified the deployment. - :type last_modified_by: :class:`IdentityRef ` + :type last_modified_by: :class:`IdentityRef ` :param last_modified_on: Gets the date on which deployment is last modified. :type last_modified_on: datetime :param operation_status: Gets operation status of deployment. :type operation_status: object :param post_deploy_approvals: Gets list of PostDeployApprovals. - :type post_deploy_approvals: list of :class:`ReleaseApproval ` + :type post_deploy_approvals: list of :class:`ReleaseApproval ` :param pre_deploy_approvals: Gets list of PreDeployApprovals. - :type pre_deploy_approvals: list of :class:`ReleaseApproval ` + :type pre_deploy_approvals: list of :class:`ReleaseApproval ` :param project_reference: Gets or sets project reference. - :type project_reference: :class:`ProjectReference ` + :type project_reference: :class:`ProjectReference ` :param queued_on: Gets the date on which deployment is queued. :type queued_on: datetime :param reason: Gets reason of deployment. :type reason: object :param release: Gets the reference of release. - :type release: :class:`ReleaseReference ` + :type release: :class:`ReleaseReference ` :param release_definition: Gets releaseDefinitionReference which specifies the reference of the release definition to which the deployment is associated. - :type release_definition: :class:`ReleaseDefinitionShallowReference ` + :type release_definition: :class:`ReleaseDefinitionShallowReference ` :param release_environment: Gets releaseEnvironmentReference which specifies the reference of the release environment to which the deployment is associated. - :type release_environment: :class:`ReleaseEnvironmentShallowReference ` + :type release_environment: :class:`ReleaseEnvironmentShallowReference ` :param requested_by: Gets the identity who requested. - :type requested_by: :class:`IdentityRef ` + :type requested_by: :class:`IdentityRef ` :param requested_for: Gets the identity for whom deployment is requested. - :type requested_for: :class:`IdentityRef ` + :type requested_for: :class:`IdentityRef ` :param scheduled_deployment_time: Gets the date on which deployment is scheduled. :type scheduled_deployment_time: datetime :param started_on: Gets the date on which deployment is started. @@ -646,35 +699,35 @@ class DeploymentAttempt(Model): :param id: ID of deployment. :type id: int :param issues: All the issues related to the deployment. - :type issues: list of :class:`Issue ` + :type issues: list of :class:`Issue ` :param job: - :type job: :class:`ReleaseTask ` + :type job: :class:`ReleaseTask ` :param last_modified_by: Identity who last modified this deployment. - :type last_modified_by: :class:`IdentityRef ` + :type last_modified_by: :class:`IdentityRef ` :param last_modified_on: Time when this deployment last modified. :type last_modified_on: datetime :param operation_status: Deployment operation status. :type operation_status: object :param post_deployment_gates: Post deployment gates that executed in this deployment. - :type post_deployment_gates: :class:`ReleaseGates ` + :type post_deployment_gates: :class:`ReleaseGates ` :param pre_deployment_gates: Pre deployment gates that executed in this deployment. - :type pre_deployment_gates: :class:`ReleaseGates ` + :type pre_deployment_gates: :class:`ReleaseGates ` :param queued_on: When this deployment queued on. :type queued_on: datetime :param reason: Reason for the deployment. :type reason: object :param release_deploy_phases: List of release deployphases executed in this deployment. - :type release_deploy_phases: list of :class:`ReleaseDeployPhase ` + :type release_deploy_phases: list of :class:`ReleaseDeployPhase ` :param requested_by: Identity who requested this deployment. - :type requested_by: :class:`IdentityRef ` + :type requested_by: :class:`IdentityRef ` :param requested_for: Identity for this deployment requested. - :type requested_for: :class:`IdentityRef ` + :type requested_for: :class:`IdentityRef ` :param run_plan_id: :type run_plan_id: str :param status: status of the deployment. :type status: object :param tasks: - :type tasks: list of :class:`ReleaseTask ` + :type tasks: list of :class:`ReleaseTask ` """ _attribute_map = { @@ -727,9 +780,9 @@ def __init__(self, attempt=None, deployment_id=None, error_log=None, has_started class DeploymentJob(Model): """ :param job: Parent task of all executed tasks. - :type job: :class:`ReleaseTask ` + :type job: :class:`ReleaseTask ` :param tasks: List of executed tasks with in job. - :type tasks: list of :class:`ReleaseTask ` + :type tasks: list of :class:`ReleaseTask ` """ _attribute_map = { @@ -756,7 +809,7 @@ class DeploymentQueryParameters(Model): :param deployment_status: Query deployment based on deployment status. :type deployment_status: object :param environments: Query deployments of specified environments. - :type environments: list of :class:`DefinitionEnvironmentReference ` + :type environments: list of :class:`DefinitionEnvironmentReference ` :param expands: Query deployments based specified expands. :type expands: object :param is_deleted: Specify deleted deployments should return or not. @@ -961,7 +1014,7 @@ class FavoriteItem(Model): :param data: Application specific data for the entry. :type data: str - :param id: Unique Id of the the entry. + :param id: Unique Id of the entry. :type id: str :param name: Display text for favorite entry. :type name: str @@ -987,13 +1040,13 @@ def __init__(self, data=None, id=None, name=None, type=None): class Folder(Model): """ :param created_by: Identity who created this folder. - :type created_by: :class:`IdentityRef ` + :type created_by: :class:`IdentityRef ` :param created_on: Time when this folder created. :type created_on: datetime :param description: Description of the folder. :type description: str :param last_changed_by: Identity who last changed this folder. - :type last_changed_by: :class:`IdentityRef ` + :type last_changed_by: :class:`IdentityRef ` :param last_changed_date: Time when this folder last changed. :type last_changed_date: datetime :param path: path of the folder. @@ -1041,7 +1094,7 @@ def __init__(self, comment=None, gates_to_ignore=None): class GraphSubjectBase(Model): """ :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. :type descriptor: str :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. @@ -1065,59 +1118,10 @@ def __init__(self, _links=None, descriptor=None, display_name=None, url=None): self.url = url -class Change(Model): - """ - Represents a change associated with a build. - - :param author: The author of the change. - :type author: :class:`IdentityRef ` - :param display_uri: The location of a user-friendly representation of the resource. - :type display_uri: str - :param change_type: The type of source. "TfsVersionControl", "TfsGit", etc. - :type change_type: str - :param id: Something that identifies the change. For a commit, this would be the SHA1. For a TFVC changeset, this would be the changeset id. - :type id: str - :param location: The location of the full representation of the resource. - :type location: str - :param message: A description of the change. This might be a commit message or changeset description. - :type message: str - :param pushed_by: The person or process that pushed the change. - :type pushed_by: :class:`IdentityRef ` - :param pusher: The person or process that pushed the change. - :type pusher: str - :param timestamp: A timestamp for the change. - :type timestamp: datetime - """ - - _attribute_map = { - 'author': {'key': 'author', 'type': 'IdentityRef'}, - 'display_uri': {'key': 'displayUri', 'type': 'str'}, - 'change_type': {'key': 'changeType', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'pushed_by': {'key': 'pushedBy', 'type': 'IdentityRef'}, - 'pusher': {'key': 'pusher', 'type': 'str'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'} - } - - def __init__(self, author=None, display_uri=None, change_type=None, id=None, location=None, message=None, pushed_by=None, pusher=None, timestamp=None): - super(Change, self).__init__() - self.author = author - self.display_uri = display_uri - self.change_type = change_type - self.id = id - self.location = location - self.message = message - self.pushed_by = pushed_by - self.pusher = pusher - self.timestamp = timestamp - - class IdentityRef(GraphSubjectBase): """ :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. :type descriptor: str :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. @@ -1219,11 +1223,11 @@ class InputDescriptor(Model): :param use_in_default_description: Gets whether this input is included in the default generated action description. :type use_in_default_description: bool :param validation: Information to use to validate this input's value - :type validation: :class:`InputValidation ` + :type validation: :class:`InputValidation ` :param value_hint: A hint for input value. It can be used in the UI as the input placeholder. :type value_hint: str :param values: Information about possible values for this input - :type values: :class:`InputValues ` + :type values: :class:`InputValues ` """ _attribute_map = { @@ -1265,7 +1269,7 @@ class InputValidation(Model): """ Describes what values are valid for a subscription input - :param data_type: Gets or sets the data data type to validate. + :param data_type: Gets or sets the data type to validate. :type data_type: object :param is_required: Gets or sets if this is a required field. :type is_required: bool @@ -1338,7 +1342,7 @@ class InputValues(Model): :param default_value: The default value to use for this input :type default_value: str :param error: Errors encountered while computing dynamic values. - :type error: :class:`InputValuesError ` + :type error: :class:`InputValuesError ` :param input_id: The id of the input :type input_id: str :param is_disabled: Should this input be disabled @@ -1348,7 +1352,7 @@ class InputValues(Model): :param is_read_only: Should this input be made read-only :type is_read_only: bool :param possible_values: Possible values that this input can take - :type possible_values: list of :class:`InputValue ` + :type possible_values: list of :class:`InputValue ` """ _attribute_map = { @@ -1394,7 +1398,7 @@ class InputValuesQuery(Model): :param current_values: :type current_values: dict :param input_values: The input values to return on input, and the result from the consumer on output. - :type input_values: list of :class:`InputValues ` + :type input_values: list of :class:`InputValues ` :param resource: Subscription containing information about the publisher/consumer and the current input values :type resource: object """ @@ -1440,7 +1444,7 @@ class MailMessage(Model): :param body: Body of mail. :type body: str :param cc: Mail CC recipients. - :type cc: :class:`EmailRecipients ` + :type cc: :class:`EmailRecipients ` :param in_reply_to: Reply to. :type in_reply_to: str :param message_id: Message ID of the mail. @@ -1448,7 +1452,7 @@ class MailMessage(Model): :param reply_by: Data when should be replied to mail. :type reply_by: datetime :param reply_to: Reply to Email recipients. - :type reply_to: :class:`EmailRecipients ` + :type reply_to: :class:`EmailRecipients ` :param sections: List of mail section types. :type sections: list of MailSectionType :param sender_type: Mail sender type. @@ -1456,7 +1460,7 @@ class MailMessage(Model): :param subject: Subject of the mail. :type subject: str :param to: Mail To recipients. - :type to: :class:`EmailRecipients ` + :type to: :class:`EmailRecipients ` """ _attribute_map = { @@ -1489,7 +1493,7 @@ def __init__(self, body=None, cc=None, in_reply_to=None, message_id=None, reply_ class ManualIntervention(Model): """ :param approver: Gets or sets the identity who should approve. - :type approver: :class:`IdentityRef ` + :type approver: :class:`IdentityRef ` :param comments: Gets or sets comments for approval. :type comments: str :param created_on: Gets date on which it got created. @@ -1503,11 +1507,11 @@ class ManualIntervention(Model): :param name: Gets or sets the name. :type name: str :param release: Gets releaseReference for manual intervention. - :type release: :class:`ReleaseShallowReference ` + :type release: :class:`ReleaseShallowReference ` :param release_definition: Gets releaseDefinitionReference for manual intervention. - :type release_definition: :class:`ReleaseDefinitionShallowReference ` + :type release_definition: :class:`ReleaseDefinitionShallowReference ` :param release_environment: Gets releaseEnvironmentReference for manual intervention. - :type release_environment: :class:`ReleaseEnvironmentShallowReference ` + :type release_environment: :class:`ReleaseEnvironmentShallowReference ` :param status: Gets or sets the status of the manual intervention. :type status: object :param task_instance_id: Get task instance identifier. @@ -1639,11 +1643,11 @@ def __init__(self, type=None): class ProcessParameters(Model): """ :param data_source_bindings: - :type data_source_bindings: list of :class:`DataSourceBindingBase ` + :type data_source_bindings: list of :class:`DataSourceBindingBase ` :param inputs: - :type inputs: list of :class:`TaskInputDefinitionBase ` + :type inputs: list of :class:`TaskInputDefinitionBase ` :param source_definitions: - :type source_definitions: list of :class:`TaskSourceDefinitionBase ` + :type source_definitions: list of :class:`TaskSourceDefinitionBase ` """ _attribute_map = { @@ -1763,15 +1767,15 @@ def __init__(self, links=None): class Release(Model): """ :param _links: Gets links to access the release. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param artifacts: Gets or sets the list of artifacts. - :type artifacts: list of :class:`Artifact ` + :type artifacts: list of :class:`Artifact ` :param comment: Gets or sets comment. :type comment: str :param created_by: Gets or sets the identity who created. - :type created_by: :class:`IdentityRef ` + :type created_by: :class:`IdentityRef ` :param created_for: Gets or sets the identity for whom release was created. - :type created_for: :class:`IdentityRef ` + :type created_for: :class:`IdentityRef ` :param created_on: Gets date on which it got created. :type created_on: datetime :param definition_snapshot_revision: Gets revision number of definition snapshot. @@ -1779,7 +1783,7 @@ class Release(Model): :param description: Gets or sets description of release. :type description: str :param environments: Gets list of environments. - :type environments: list of :class:`ReleaseEnvironment ` + :type environments: list of :class:`ReleaseEnvironment ` :param id: Gets the unique identifier of this field. :type id: int :param keep_forever: Whether to exclude the release from retention policies. @@ -1787,7 +1791,7 @@ class Release(Model): :param logs_container_url: Gets logs container url. :type logs_container_url: str :param modified_by: Gets or sets the identity who modified. - :type modified_by: :class:`IdentityRef ` + :type modified_by: :class:`IdentityRef ` :param modified_on: Gets date on which it got modified. :type modified_on: datetime :param name: Gets name. @@ -1795,13 +1799,13 @@ class Release(Model): :param pool_name: Gets pool name. :type pool_name: str :param project_reference: Gets or sets project reference. - :type project_reference: :class:`ProjectReference ` + :type project_reference: :class:`ProjectReference ` :param properties: - :type properties: :class:`object ` + :type properties: :class:`object ` :param reason: Gets reason of release. :type reason: object :param release_definition: Gets releaseDefinitionReference which specifies the reference of the release definition to which this release is associated. - :type release_definition: :class:`ReleaseDefinitionShallowReference ` + :type release_definition: :class:`ReleaseDefinitionShallowReference ` :param release_definition_revision: Gets or sets the release definition revision. :type release_definition_revision: int :param release_name_format: Gets release name format. @@ -1815,7 +1819,7 @@ class Release(Model): :param url: :type url: str :param variable_groups: Gets the list of variable groups. - :type variable_groups: list of :class:`VariableGroup ` + :type variable_groups: list of :class:`VariableGroup ` :param variables: Gets or sets the dictionary of variables. :type variables: dict """ @@ -1888,9 +1892,9 @@ class ReleaseApproval(Model): :param approval_type: Gets or sets the type of approval. :type approval_type: object :param approved_by: Gets the identity who approved. - :type approved_by: :class:`IdentityRef ` + :type approved_by: :class:`IdentityRef ` :param approver: Gets or sets the identity who should approve. - :type approver: :class:`IdentityRef ` + :type approver: :class:`IdentityRef ` :param attempt: Gets or sets attempt which specifies as which deployment attempt it belongs. :type attempt: int :param comments: Gets or sets comments for approval. @@ -1898,7 +1902,7 @@ class ReleaseApproval(Model): :param created_on: Gets date on which it got created. :type created_on: datetime :param history: Gets history which specifies all approvals associated with this approval. - :type history: list of :class:`ReleaseApprovalHistory ` + :type history: list of :class:`ReleaseApprovalHistory ` :param id: Gets the unique identifier of this field. :type id: int :param is_automated: Gets or sets as approval is automated or not. @@ -1910,11 +1914,11 @@ class ReleaseApproval(Model): :param rank: Gets or sets rank which specifies the order of the approval. e.g. Same rank denotes parallel approval. :type rank: int :param release: Gets releaseReference which specifies the reference of the release to which this approval is associated. - :type release: :class:`ReleaseShallowReference ` + :type release: :class:`ReleaseShallowReference ` :param release_definition: Gets releaseDefinitionReference which specifies the reference of the release definition to which this approval is associated. - :type release_definition: :class:`ReleaseDefinitionShallowReference ` + :type release_definition: :class:`ReleaseDefinitionShallowReference ` :param release_environment: Gets releaseEnvironmentReference which specifies the reference of the release environment to which this approval is associated. - :type release_environment: :class:`ReleaseEnvironmentShallowReference ` + :type release_environment: :class:`ReleaseEnvironmentShallowReference ` :param revision: Gets the revision number. :type revision: int :param status: Gets or sets the status of the approval. @@ -1973,13 +1977,13 @@ def __init__(self, approval_type=None, approved_by=None, approver=None, attempt= class ReleaseApprovalHistory(Model): """ :param approver: Identity of the approver. - :type approver: :class:`IdentityRef ` + :type approver: :class:`IdentityRef ` + :param changed_by: Identity of the object who changed approval. + :type changed_by: :class:`IdentityRef ` :param comments: Approval history comments. :type comments: str :param created_on: Time when this approval created. :type created_on: datetime - :param changed_by: Identity of the object who changed approval. - :type changed_by: :class:`IdentityRef ` :param modified_on: Time when this approval modified. :type modified_on: datetime :param revision: Approval history revision. @@ -1988,19 +1992,19 @@ class ReleaseApprovalHistory(Model): _attribute_map = { 'approver': {'key': 'approver', 'type': 'IdentityRef'}, + 'changed_by': {'key': 'changedBy', 'type': 'IdentityRef'}, 'comments': {'key': 'comments', 'type': 'str'}, 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, - 'changed_by': {'key': 'changedBy', 'type': 'IdentityRef'}, 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, 'revision': {'key': 'revision', 'type': 'int'} } - def __init__(self, approver=None, comments=None, created_on=None, changed_by=None, modified_on=None, revision=None): + def __init__(self, approver=None, changed_by=None, comments=None, created_on=None, modified_on=None, revision=None): super(ReleaseApprovalHistory, self).__init__() self.approver = approver + self.changed_by = changed_by self.comments = comments self.created_on = created_on - self.changed_by = changed_by self.modified_on = modified_on self.revision = revision @@ -2011,30 +2015,29 @@ class ReleaseCondition(Condition): :type condition_type: object :param name: Gets or sets the name of the condition. e.g. 'ReleaseStarted'. :type name: str - :param value: Gets or set value of the condition. - :type value: str :param result: The release condition result. :type result: bool + :param value: Gets or set value of the condition. + :type value: str """ _attribute_map = { 'condition_type': {'key': 'conditionType', 'type': 'object'}, 'name': {'key': 'name', 'type': 'str'}, + 'result': {'key': 'result', 'type': 'bool'}, 'value': {'key': 'value', 'type': 'str'}, - 'result': {'key': 'result', 'type': 'bool'} } - def __init__(self, condition_type=None, name=None, value=None, result=None): - super(ReleaseCondition, self).__init__(condition_type=condition_type, name=name, value=value) - self.result = result + def __init__(self, condition_type=None, name=None, result=None, value=None): + super(ReleaseCondition, self).__init__(condition_type=condition_type, name=name, result=result, value=value) class ReleaseDefinitionApprovals(Model): """ :param approval_options: Gets or sets the approval options. - :type approval_options: :class:`ApprovalOptions ` + :type approval_options: :class:`ApprovalOptions ` :param approvals: Gets or sets the approvals. - :type approvals: list of :class:`ReleaseDefinitionApprovalStep ` + :type approvals: list of :class:`ReleaseDefinitionApprovalStep ` """ _attribute_map = { @@ -2053,49 +2056,49 @@ class ReleaseDefinitionEnvironment(Model): :param badge_url: Gets or sets the BadgeUrl. BadgeUrl will be used when Badge will be enabled in Release Definition Environment. :type badge_url: str :param conditions: Gets or sets the environment conditions. - :type conditions: list of :class:`Condition ` + :type conditions: list of :class:`Condition ` :param current_release: Gets or sets the current release reference. - :type current_release: :class:`ReleaseShallowReference ` + :type current_release: :class:`ReleaseShallowReference ` :param demands: Gets or sets the demands. - :type demands: list of :class:`object ` + :type demands: list of :class:`object ` :param deploy_phases: Gets or sets the deploy phases of environment. - :type deploy_phases: list of :class:`object ` + :type deploy_phases: list of :class:`object ` :param deploy_step: Gets or sets the deploystep. - :type deploy_step: :class:`ReleaseDefinitionDeployStep ` + :type deploy_step: :class:`ReleaseDefinitionDeployStep ` :param environment_options: Gets or sets the environment options. - :type environment_options: :class:`EnvironmentOptions ` + :type environment_options: :class:`EnvironmentOptions ` :param environment_triggers: Gets or sets the triggers on environment. - :type environment_triggers: list of :class:`EnvironmentTrigger ` + :type environment_triggers: list of :class:`EnvironmentTrigger ` :param execution_policy: Gets or sets the environment execution policy. - :type execution_policy: :class:`EnvironmentExecutionPolicy ` + :type execution_policy: :class:`EnvironmentExecutionPolicy ` :param id: Gets and sets the ID of the ReleaseDefinitionEnvironment. :type id: int :param name: Gets and sets the name of the ReleaseDefinitionEnvironment. :type name: str :param owner: Gets and sets the Owner of the ReleaseDefinitionEnvironment. - :type owner: :class:`IdentityRef ` + :type owner: :class:`IdentityRef ` :param post_deploy_approvals: Gets or sets the post deployment approvals. - :type post_deploy_approvals: :class:`ReleaseDefinitionApprovals ` + :type post_deploy_approvals: :class:`ReleaseDefinitionApprovals ` :param post_deployment_gates: Gets or sets the post deployment gates. - :type post_deployment_gates: :class:`ReleaseDefinitionGatesStep ` + :type post_deployment_gates: :class:`ReleaseDefinitionGatesStep ` :param pre_deploy_approvals: Gets or sets the pre deployment approvals. - :type pre_deploy_approvals: :class:`ReleaseDefinitionApprovals ` + :type pre_deploy_approvals: :class:`ReleaseDefinitionApprovals ` :param pre_deployment_gates: Gets or sets the pre deployment gates. - :type pre_deployment_gates: :class:`ReleaseDefinitionGatesStep ` + :type pre_deployment_gates: :class:`ReleaseDefinitionGatesStep ` :param process_parameters: Gets or sets the environment process parameters. - :type process_parameters: :class:`ProcessParameters ` + :type process_parameters: :class:`ProcessParameters ` :param properties: Gets or sets the properties on environment. - :type properties: :class:`object ` + :type properties: :class:`object ` :param queue_id: Gets or sets the queue ID. :type queue_id: int :param rank: Gets and sets the rank of the ReleaseDefinitionEnvironment. :type rank: int :param retention_policy: Gets or sets the environment retention policy. - :type retention_policy: :class:`EnvironmentRetentionPolicy ` + :type retention_policy: :class:`EnvironmentRetentionPolicy ` :param run_options: :type run_options: dict :param schedules: Gets or sets the schedules - :type schedules: list of :class:`ReleaseSchedule ` + :type schedules: list of :class:`ReleaseSchedule ` :param variable_groups: Gets or sets the variable groups. :type variable_groups: list of int :param variables: Gets and sets the variables. @@ -2179,7 +2182,7 @@ class ReleaseDefinitionEnvironmentSummary(Model): :param id: ID of ReleaseDefinition environment summary. :type id: int :param last_releases: List of release shallow reference deployed using this ReleaseDefinition. - :type last_releases: list of :class:`ReleaseShallowReference ` + :type last_releases: list of :class:`ReleaseShallowReference ` :param name: Name of ReleaseDefinition environment summary. :type name: str """ @@ -2206,7 +2209,7 @@ class ReleaseDefinitionEnvironmentTemplate(Model): :param description: Description of the ReleaseDefinition environment template. :type description: str :param environment: ReleaseDefinition environment data which used to create this template. - :type environment: :class:`ReleaseDefinitionEnvironment ` + :type environment: :class:`ReleaseDefinitionEnvironment ` :param icon_task_id: ID of the task which used to display icon used for this template. :type icon_task_id: str :param icon_uri: Icon uri of the template. @@ -2247,7 +2250,7 @@ def __init__(self, can_delete=None, category=None, description=None, environment class ReleaseDefinitionGate(Model): """ :param tasks: Gets or sets the gates workflow. - :type tasks: list of :class:`WorkflowTask ` + :type tasks: list of :class:`WorkflowTask ` """ _attribute_map = { @@ -2293,9 +2296,9 @@ def __init__(self, is_enabled=None, minimum_success_duration=None, sampling_inte class ReleaseDefinitionGatesStep(Model): """ :param gates: Gets or sets the gates. - :type gates: list of :class:`ReleaseDefinitionGate ` + :type gates: list of :class:`ReleaseDefinitionGate ` :param gates_options: Gets or sets the gate options. - :type gates_options: :class:`ReleaseDefinitionGatesOptions ` + :type gates_options: :class:`ReleaseDefinitionGatesOptions ` :param id: ID of the ReleaseDefinitionGateStep. :type id: int """ @@ -2317,49 +2320,49 @@ class ReleaseDefinitionRevision(Model): """ :param api_version: Gets api-version for revision object. :type api_version: str + :param changed_by: Gets the identity who did change. + :type changed_by: :class:`IdentityRef ` + :param changed_date: Gets date on which ReleaseDefinition changed. + :type changed_date: datetime + :param change_type: Gets type of change. + :type change_type: object :param comment: Gets comments for revision. :type comment: str :param definition_id: Get id of the definition. :type definition_id: int :param definition_url: Gets definition URL. :type definition_url: str - :param changed_by: Gets the identity who did change. - :type changed_by: :class:`IdentityRef ` - :param changed_date: Gets date on which ReleaseDefinition changed. - :type changed_date: datetime - :param change_type: Gets type of change. - :type change_type: object :param revision: Get revision number of the definition. :type revision: int """ _attribute_map = { 'api_version': {'key': 'apiVersion', 'type': 'str'}, - 'comment': {'key': 'comment', 'type': 'str'}, - 'definition_id': {'key': 'definitionId', 'type': 'int'}, - 'definition_url': {'key': 'definitionUrl', 'type': 'str'}, 'changed_by': {'key': 'changedBy', 'type': 'IdentityRef'}, 'changed_date': {'key': 'changedDate', 'type': 'iso-8601'}, 'change_type': {'key': 'changeType', 'type': 'object'}, + 'comment': {'key': 'comment', 'type': 'str'}, + 'definition_id': {'key': 'definitionId', 'type': 'int'}, + 'definition_url': {'key': 'definitionUrl', 'type': 'str'}, 'revision': {'key': 'revision', 'type': 'int'} } - def __init__(self, api_version=None, comment=None, definition_id=None, definition_url=None, changed_by=None, changed_date=None, change_type=None, revision=None): + def __init__(self, api_version=None, changed_by=None, changed_date=None, change_type=None, comment=None, definition_id=None, definition_url=None, revision=None): super(ReleaseDefinitionRevision, self).__init__() self.api_version = api_version - self.comment = comment - self.definition_id = definition_id - self.definition_url = definition_url self.changed_by = changed_by self.changed_date = changed_date self.change_type = change_type + self.comment = comment + self.definition_id = definition_id + self.definition_url = definition_url self.revision = revision class ReleaseDefinitionShallowReference(Model): """ :param _links: Gets the links to related resources, APIs, and views for the release definition. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param id: Gets the unique identifier of release definition. :type id: int :param name: Gets or sets the name of the release definition. @@ -2367,7 +2370,7 @@ class ReleaseDefinitionShallowReference(Model): :param path: Gets or sets the path of the release definition. :type path: str :param project_reference: Gets or sets project reference. - :type project_reference: :class:`ProjectReference ` + :type project_reference: :class:`ProjectReference ` :param url: Gets the REST API url to access the release definition. :type url: str """ @@ -2394,11 +2397,11 @@ def __init__(self, _links=None, id=None, name=None, path=None, project_reference class ReleaseDefinitionSummary(Model): """ :param environments: List of Release Definition environment summary. - :type environments: list of :class:`ReleaseDefinitionEnvironmentSummary ` + :type environments: list of :class:`ReleaseDefinitionEnvironmentSummary ` :param release_definition: Release Definition reference. - :type release_definition: :class:`ReleaseDefinitionShallowReference ` + :type release_definition: :class:`ReleaseDefinitionShallowReference ` :param releases: List of releases deployed using this Release Definition. - :type releases: list of :class:`Release ` + :type releases: list of :class:`Release ` """ _attribute_map = { @@ -2432,13 +2435,13 @@ def __init__(self, comment=None): class ReleaseDeployPhase(Model): """ :param deployment_jobs: Deployment jobs of the phase. - :type deployment_jobs: list of :class:`DeploymentJob ` + :type deployment_jobs: list of :class:`DeploymentJob ` :param error_log: Phase execution error logs. :type error_log: str :param id: ID of the phase. :type id: int :param manual_interventions: List of manual intervention tasks execution information in phase. - :type manual_interventions: list of :class:`ManualIntervention ` + :type manual_interventions: list of :class:`ManualIntervention ` :param name: Name of the phase. :type name: str :param phase_id: ID of the phase. @@ -2487,19 +2490,19 @@ def __init__(self, deployment_jobs=None, error_log=None, id=None, manual_interve class ReleaseEnvironment(Model): """ :param conditions: Gets list of conditions. - :type conditions: list of :class:`ReleaseCondition ` + :type conditions: list of :class:`ReleaseCondition ` :param created_on: Gets date on which it got created. :type created_on: datetime :param definition_environment_id: Gets definition environment id. :type definition_environment_id: int :param demands: Gets demands. - :type demands: list of :class:`object ` + :type demands: list of :class:`object ` :param deploy_phases_snapshot: Gets list of deploy phases snapshot. - :type deploy_phases_snapshot: list of :class:`object ` + :type deploy_phases_snapshot: list of :class:`object ` :param deploy_steps: Gets deploy steps. - :type deploy_steps: list of :class:`DeploymentAttempt ` + :type deploy_steps: list of :class:`DeploymentAttempt ` :param environment_options: Gets environment options. - :type environment_options: :class:`EnvironmentOptions ` + :type environment_options: :class:`EnvironmentOptions ` :param id: Gets the unique identifier of this field. :type id: int :param modified_on: Gets date on which it got modified. @@ -2509,31 +2512,31 @@ class ReleaseEnvironment(Model): :param next_scheduled_utc_time: Gets next scheduled UTC time. :type next_scheduled_utc_time: datetime :param owner: Gets the identity who is owner for release environment. - :type owner: :class:`IdentityRef ` + :type owner: :class:`IdentityRef ` :param post_approvals_snapshot: Gets list of post deploy approvals snapshot. - :type post_approvals_snapshot: :class:`ReleaseDefinitionApprovals ` + :type post_approvals_snapshot: :class:`ReleaseDefinitionApprovals ` :param post_deploy_approvals: Gets list of post deploy approvals. - :type post_deploy_approvals: list of :class:`ReleaseApproval ` + :type post_deploy_approvals: list of :class:`ReleaseApproval ` :param post_deployment_gates_snapshot: Post deployment gates snapshot data. - :type post_deployment_gates_snapshot: :class:`ReleaseDefinitionGatesStep ` + :type post_deployment_gates_snapshot: :class:`ReleaseDefinitionGatesStep ` :param pre_approvals_snapshot: Gets list of pre deploy approvals snapshot. - :type pre_approvals_snapshot: :class:`ReleaseDefinitionApprovals ` + :type pre_approvals_snapshot: :class:`ReleaseDefinitionApprovals ` :param pre_deploy_approvals: Gets list of pre deploy approvals. - :type pre_deploy_approvals: list of :class:`ReleaseApproval ` + :type pre_deploy_approvals: list of :class:`ReleaseApproval ` :param pre_deployment_gates_snapshot: Pre deployment gates snapshot data. - :type pre_deployment_gates_snapshot: :class:`ReleaseDefinitionGatesStep ` + :type pre_deployment_gates_snapshot: :class:`ReleaseDefinitionGatesStep ` :param process_parameters: Gets process parameters. - :type process_parameters: :class:`ProcessParameters ` + :type process_parameters: :class:`ProcessParameters ` :param queue_id: Gets queue id. :type queue_id: int :param rank: Gets rank. :type rank: int :param release: Gets release reference which specifies the reference of the release to which this release environment is associated. - :type release: :class:`ReleaseShallowReference ` + :type release: :class:`ReleaseShallowReference ` :param release_created_by: Gets the identity who created release. - :type release_created_by: :class:`IdentityRef ` + :type release_created_by: :class:`IdentityRef ` :param release_definition: Gets releaseDefinitionReference which specifies the reference of the release definition to which this release environment is associated. - :type release_definition: :class:`ReleaseDefinitionShallowReference ` + :type release_definition: :class:`ReleaseDefinitionShallowReference ` :param release_description: Gets release description. :type release_description: str :param release_id: Gets release id. @@ -2541,7 +2544,7 @@ class ReleaseEnvironment(Model): :param scheduled_deployment_time: Gets schedule deployment time of release environment. :type scheduled_deployment_time: datetime :param schedules: Gets list of schedules. - :type schedules: list of :class:`ReleaseSchedule ` + :type schedules: list of :class:`ReleaseSchedule ` :param status: Gets environment status. :type status: object :param time_to_deploy: Gets time to deploy. @@ -2549,11 +2552,11 @@ class ReleaseEnvironment(Model): :param trigger_reason: Gets trigger reason. :type trigger_reason: str :param variable_groups: Gets the list of variable groups. - :type variable_groups: list of :class:`VariableGroup ` + :type variable_groups: list of :class:`VariableGroup ` :param variables: Gets the dictionary of variables. :type variables: dict :param workflow_tasks: Gets list of workflow tasks. - :type workflow_tasks: list of :class:`WorkflowTask ` + :type workflow_tasks: list of :class:`WorkflowTask ` """ _attribute_map = { @@ -2634,7 +2637,7 @@ def __init__(self, conditions=None, created_on=None, definition_environment_id=N class ReleaseEnvironmentShallowReference(Model): """ :param _links: Gets the links to related resources, APIs, and views for the release environment. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param id: Gets the unique identifier of release environment. :type id: int :param name: Gets or sets the name of the release environment. @@ -2688,11 +2691,11 @@ def __init__(self, comment=None, scheduled_deployment_time=None, status=None, va class ReleaseGates(Model): """ :param deployment_jobs: Contains the gates job details of each evaluation. - :type deployment_jobs: list of :class:`DeploymentJob ` + :type deployment_jobs: list of :class:`DeploymentJob ` :param id: ID of release gates. :type id: int :param ignored_gates: List of ignored gates. - :type ignored_gates: list of :class:`IgnoredGate ` + :type ignored_gates: list of :class:`IgnoredGate ` :param last_modified_on: Gates last modified time. :type last_modified_on: datetime :param run_plan_id: Run plan ID of the gates. @@ -2735,11 +2738,11 @@ def __init__(self, deployment_jobs=None, id=None, ignored_gates=None, last_modif class ReleaseReference(Model): """ :param _links: Gets links to access the release. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param artifacts: Gets list of artifacts. - :type artifacts: list of :class:`Artifact ` + :type artifacts: list of :class:`Artifact ` :param created_by: Gets the identity who created release. - :type created_by: :class:`IdentityRef ` + :type created_by: :class:`IdentityRef ` :param created_on: Gets date on when this release created. :type created_on: datetime :param description: Gets description. @@ -2747,13 +2750,13 @@ class ReleaseReference(Model): :param id: ID of the Release. :type id: int :param modified_by: Gets the identity who modified release. - :type modified_by: :class:`IdentityRef ` + :type modified_by: :class:`IdentityRef ` :param name: Gets name of release. :type name: str :param reason: Gets reason for release. :type reason: object :param release_definition: Gets release definition shallow reference. - :type release_definition: :class:`ReleaseDefinitionShallowReference ` + :type release_definition: :class:`ReleaseDefinitionShallowReference ` :param url: :type url: str :param web_access_uri: @@ -2793,49 +2796,84 @@ def __init__(self, _links=None, artifacts=None, created_by=None, created_on=None class ReleaseRevision(Model): """ - :param comment: Comment of the revision. - :type comment: str - :param definition_snapshot_revision: Release ID of which this revision belongs. - :type definition_snapshot_revision: int :param changed_by: Gets or sets the identity who changed. - :type changed_by: :class:`IdentityRef ` + :type changed_by: :class:`IdentityRef ` :param changed_date: Change date of the revision. :type changed_date: datetime :param change_details: Change details of the revision. :type change_details: str :param change_type: Change details of the revision. Typically ChangeDetails values are Add and Update. :type change_type: str + :param comment: Comment of the revision. + :type comment: str + :param definition_snapshot_revision: Release ID of which this revision belongs. + :type definition_snapshot_revision: int :param release_id: Gets or sets the release ID of which this revision belongs. :type release_id: int """ _attribute_map = { - 'comment': {'key': 'comment', 'type': 'str'}, - 'definition_snapshot_revision': {'key': 'definitionSnapshotRevision', 'type': 'int'}, 'changed_by': {'key': 'changedBy', 'type': 'IdentityRef'}, 'changed_date': {'key': 'changedDate', 'type': 'iso-8601'}, 'change_details': {'key': 'changeDetails', 'type': 'str'}, 'change_type': {'key': 'changeType', 'type': 'str'}, + 'comment': {'key': 'comment', 'type': 'str'}, + 'definition_snapshot_revision': {'key': 'definitionSnapshotRevision', 'type': 'int'}, 'release_id': {'key': 'releaseId', 'type': 'int'} } - def __init__(self, comment=None, definition_snapshot_revision=None, changed_by=None, changed_date=None, change_details=None, change_type=None, release_id=None): + def __init__(self, changed_by=None, changed_date=None, change_details=None, change_type=None, comment=None, definition_snapshot_revision=None, release_id=None): super(ReleaseRevision, self).__init__() - self.comment = comment - self.definition_snapshot_revision = definition_snapshot_revision self.changed_by = changed_by self.changed_date = changed_date self.change_details = change_details self.change_type = change_type + self.comment = comment + self.definition_snapshot_revision = definition_snapshot_revision self.release_id = release_id +class ReleaseSchedule(Model): + """ + :param days_to_release: Days of the week to release. + :type days_to_release: object + :param job_id: Team Foundation Job Definition Job Id. + :type job_id: str + :param schedule_only_with_changes: Flag to determine if this schedule should only release if the associated artifact has been changed or release definition changed. + :type schedule_only_with_changes: bool + :param start_hours: Local time zone hour to start. + :type start_hours: int + :param start_minutes: Local time zone minute to start. + :type start_minutes: int + :param time_zone_id: Time zone Id of release schedule, such as 'UTC'. + :type time_zone_id: str + """ + + _attribute_map = { + 'days_to_release': {'key': 'daysToRelease', 'type': 'object'}, + 'job_id': {'key': 'jobId', 'type': 'str'}, + 'schedule_only_with_changes': {'key': 'scheduleOnlyWithChanges', 'type': 'bool'}, + 'start_hours': {'key': 'startHours', 'type': 'int'}, + 'start_minutes': {'key': 'startMinutes', 'type': 'int'}, + 'time_zone_id': {'key': 'timeZoneId', 'type': 'str'} + } + + def __init__(self, days_to_release=None, job_id=None, schedule_only_with_changes=None, start_hours=None, start_minutes=None, time_zone_id=None): + super(ReleaseSchedule, self).__init__() + self.days_to_release = days_to_release + self.job_id = job_id + self.schedule_only_with_changes = schedule_only_with_changes + self.start_hours = start_hours + self.start_minutes = start_minutes + self.time_zone_id = time_zone_id + + class ReleaseSettings(Model): """ :param compliance_settings: Release Compliance settings. - :type compliance_settings: :class:`ComplianceSettings ` + :type compliance_settings: :class:`ComplianceSettings ` :param retention_settings: Release retention settings. - :type retention_settings: :class:`RetentionSettings ` + :type retention_settings: :class:`RetentionSettings ` """ _attribute_map = { @@ -2852,7 +2890,7 @@ def __init__(self, compliance_settings=None, retention_settings=None): class ReleaseShallowReference(Model): """ :param _links: Gets the links to related resources, APIs, and views for the release. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param id: Gets the unique identifier of release. :type id: int :param name: Gets or sets the name of the release. @@ -2876,41 +2914,6 @@ def __init__(self, _links=None, id=None, name=None, url=None): self.url = url -class ReleaseSchedule(Model): - """ - :param days_to_release: Days of the week to release. - :type days_to_release: object - :param job_id: Team Foundation Job Definition Job Id. - :type job_id: str - :param schedule_only_with_changes: Flag to determine if this schedule should only release if the associated artifact has been changed or release definition changed. - :type schedule_only_with_changes: bool - :param start_hours: Local time zone hour to start. - :type start_hours: int - :param start_minutes: Local time zone minute to start. - :type start_minutes: int - :param time_zone_id: Time zone Id of release schedule, such as 'UTC'. - :type time_zone_id: str - """ - - _attribute_map = { - 'days_to_release': {'key': 'daysToRelease', 'type': 'object'}, - 'job_id': {'key': 'jobId', 'type': 'str'}, - 'schedule_only_with_changes': {'key': 'scheduleOnlyWithChanges', 'type': 'bool'}, - 'start_hours': {'key': 'startHours', 'type': 'int'}, - 'start_minutes': {'key': 'startMinutes', 'type': 'int'}, - 'time_zone_id': {'key': 'timeZoneId', 'type': 'str'} - } - - def __init__(self, days_to_release=None, job_id=None, schedule_only_with_changes=None, start_hours=None, start_minutes=None, time_zone_id=None): - super(ReleaseSchedule, self).__init__() - self.days_to_release = days_to_release - self.job_id = job_id - self.schedule_only_with_changes = schedule_only_with_changes - self.start_hours = start_hours - self.start_minutes = start_minutes - self.time_zone_id = time_zone_id - - class ReleaseStartEnvironmentMetadata(Model): """ :param definition_environment_id: Sets release definition environment id. @@ -2933,7 +2936,7 @@ def __init__(self, definition_environment_id=None, variables=None): class ReleaseStartMetadata(Model): """ :param artifacts: Sets list of artifact to create a release. - :type artifacts: list of :class:`ArtifactMetadata ` + :type artifacts: list of :class:`ArtifactMetadata ` :param created_for: Optionally provide a requestor identity :type created_for: str :param definition_id: Sets definition Id to create a release. @@ -2941,13 +2944,13 @@ class ReleaseStartMetadata(Model): :param description: Sets description to create a release. :type description: str :param environments_metadata: Sets list of environments meta data. - :type environments_metadata: list of :class:`ReleaseStartEnvironmentMetadata ` + :type environments_metadata: list of :class:`ReleaseStartEnvironmentMetadata ` :param is_draft: Sets 'true' to create release in draft mode, 'false' otherwise. :type is_draft: bool :param manual_environments: Sets list of environments to manual as condition. :type manual_environments: list of str :param properties: - :type properties: :class:`object ` + :type properties: :class:`object ` :param reason: Sets reason to create a release. :type reason: object :param variables: Sets list of release variables to be overridden at deployment time. @@ -2994,7 +2997,7 @@ class ReleaseTask(Model): :param id: ID of the release task. :type id: int :param issues: List of issues occurred while execution of task. - :type issues: list of :class:`Issue ` + :type issues: list of :class:`Issue ` :param line_count: Number of lines log release task has. :type line_count: long :param log_url: Log URL of the task. @@ -3012,7 +3015,7 @@ class ReleaseTask(Model): :param status: Status of release task. :type status: object :param task: Workflow task reference. - :type task: :class:`WorkflowTaskReference ` + :type task: :class:`WorkflowTaskReference ` :param timeline_record_id: Timeline record ID of the release task. :type timeline_record_id: str """ @@ -3059,11 +3062,11 @@ def __init__(self, agent_name=None, date_ended=None, date_started=None, finish_t class ReleaseTaskAttachment(Model): """ :param _links: Reference links of task. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param created_on: Data and time when it created. :type created_on: datetime :param modified_by: Identity who modified. - :type modified_by: :class:`IdentityRef ` + :type modified_by: :class:`IdentityRef ` :param modified_on: Data and time when modified. :type modified_on: datetime :param name: Name of the task attachment. @@ -3189,9 +3192,9 @@ class RetentionSettings(Model): :param days_to_keep_deleted_releases: Number of days to keep deleted releases. :type days_to_keep_deleted_releases: int :param default_environment_retention_policy: Specifies the default environment retention policy. - :type default_environment_retention_policy: :class:`EnvironmentRetentionPolicy ` + :type default_environment_retention_policy: :class:`EnvironmentRetentionPolicy ` :param maximum_environment_retention_policy: Specifies the maximum environment retention policy. - :type maximum_environment_retention_policy: :class:`EnvironmentRetentionPolicy ` + :type maximum_environment_retention_policy: :class:`EnvironmentRetentionPolicy ` """ _attribute_map = { @@ -3292,7 +3295,7 @@ class TaskInputDefinitionBase(Model): :param type: :type type: str :param validation: - :type validation: :class:`TaskInputValidation ` + :type validation: :class:`TaskInputValidation ` :param visible_rule: :type visible_rule: str """ @@ -3381,7 +3384,7 @@ def __init__(self, auth_key=None, endpoint=None, key_selector=None, selector=Non class VariableGroup(Model): """ :param created_by: Gets or sets the identity who created. - :type created_by: :class:`IdentityRef ` + :type created_by: :class:`IdentityRef ` :param created_on: Gets date on which it got created. :type created_on: datetime :param description: Gets or sets description. @@ -3391,17 +3394,17 @@ class VariableGroup(Model): :param is_shared: Denotes if a variable group is shared with other project or not. :type is_shared: bool :param modified_by: Gets or sets the identity who modified. - :type modified_by: :class:`IdentityRef ` + :type modified_by: :class:`IdentityRef ` :param modified_on: Gets date on which it got modified. :type modified_on: datetime :param name: Gets or sets name. :type name: str :param provider_data: Gets or sets provider data. - :type provider_data: :class:`VariableGroupProviderData ` + :type provider_data: :class:`VariableGroupProviderData ` :param type: Gets or sets type. :type type: str :param variable_group_project_references: all project references where the variable group is shared with other projects. - :type variable_group_project_references: list of :class:`VariableGroupProjectReference ` + :type variable_group_project_references: list of :class:`VariableGroupProjectReference ` :param variables: Gets and sets the dictionary of variables. :type variables: dict """ @@ -3446,7 +3449,7 @@ class VariableGroupProjectReference(Model): :param name: Gets or sets name of the variable group. :type name: str :param project_reference: Gets or sets project reference of the variable group. - :type project_reference: :class:`ProjectReference ` + :type project_reference: :class:`ProjectReference ` """ _attribute_map = { @@ -3589,7 +3592,7 @@ def __init__(self, id=None, name=None, version=None): class ReleaseDefinition(ReleaseDefinitionShallowReference): """ :param _links: Gets the links to related resources, APIs, and views for the release definition. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param id: Gets the unique identifier of release definition. :type id: int :param name: Gets or sets the name of the release definition. @@ -3597,37 +3600,37 @@ class ReleaseDefinition(ReleaseDefinitionShallowReference): :param path: Gets or sets the path of the release definition. :type path: str :param project_reference: Gets or sets project reference. - :type project_reference: :class:`ProjectReference ` + :type project_reference: :class:`ProjectReference ` :param url: Gets the REST API url to access the release definition. :type url: str :param artifacts: Gets or sets the list of artifacts. - :type artifacts: list of :class:`Artifact ` + :type artifacts: list of :class:`Artifact ` :param comment: Gets or sets comment. :type comment: str :param created_by: Gets or sets the identity who created. - :type created_by: :class:`IdentityRef ` + :type created_by: :class:`IdentityRef ` :param created_on: Gets date on which it got created. :type created_on: datetime :param description: Gets or sets the description. :type description: str :param environments: Gets or sets the list of environments. - :type environments: list of :class:`ReleaseDefinitionEnvironment ` + :type environments: list of :class:`ReleaseDefinitionEnvironment ` :param is_deleted: Whether release definition is deleted. :type is_deleted: bool :param last_release: Gets the reference of last release. - :type last_release: :class:`ReleaseReference ` + :type last_release: :class:`ReleaseReference ` :param modified_by: Gets or sets the identity who modified. - :type modified_by: :class:`IdentityRef ` + :type modified_by: :class:`IdentityRef ` :param modified_on: Gets date on which it got modified. :type modified_on: datetime :param pipeline_process: Gets or sets pipeline process. - :type pipeline_process: :class:`PipelineProcess ` + :type pipeline_process: :class:`PipelineProcess ` :param properties: Gets or sets properties. - :type properties: :class:`object ` + :type properties: :class:`object ` :param release_name_format: Gets or sets the release name format. :type release_name_format: str :param retention_policy: - :type retention_policy: :class:`RetentionPolicy ` + :type retention_policy: :class:`RetentionPolicy ` :param revision: Gets the revision number. :type revision: int :param source: Gets or sets source of release definition. @@ -3635,7 +3638,7 @@ class ReleaseDefinition(ReleaseDefinitionShallowReference): :param tags: Gets or sets list of tags. :type tags: list of str :param triggers: Gets or sets the list of triggers. - :type triggers: list of :class:`object ` + :type triggers: list of :class:`object ` :param variable_groups: Gets or sets the list of variable groups. :type variable_groups: list of int :param variables: Gets or sets the dictionary of variables. @@ -3700,7 +3703,7 @@ class ReleaseDefinitionApprovalStep(ReleaseDefinitionEnvironmentStep): :param id: ID of the approval or deploy step. :type id: int :param approver: Gets and sets the approver. - :type approver: :class:`IdentityRef ` + :type approver: :class:`IdentityRef ` :param is_automated: Indicates whether the approval automated. :type is_automated: bool :param is_notification_on: Indicates whether the approval notification set. @@ -3730,7 +3733,7 @@ class ReleaseDefinitionDeployStep(ReleaseDefinitionEnvironmentStep): :param id: ID of the approval or deploy step. :type id: int :param tasks: The list of steps for this definition. - :type tasks: list of :class:`WorkflowTask ` + :type tasks: list of :class:`WorkflowTask ` """ _attribute_map = { @@ -3756,6 +3759,7 @@ def __init__(self, id=None, tasks=None): 'AuthorizationHeader', 'AutoTriggerIssue', 'BuildVersion', + 'Change', 'ComplianceSettings', 'Condition', 'ConfigurationVariableValue', @@ -3774,7 +3778,6 @@ def __init__(self, id=None, tasks=None): 'Folder', 'GateUpdateMetadata', 'GraphSubjectBase', - 'Change', 'IdentityRef', 'IgnoredGate', 'InputDescriptor', @@ -3820,9 +3823,9 @@ def __init__(self, id=None, tasks=None): 'ReleaseGates', 'ReleaseReference', 'ReleaseRevision', + 'ReleaseSchedule', 'ReleaseSettings', 'ReleaseShallowReference', - 'ReleaseSchedule', 'ReleaseStartEnvironmentMetadata', 'ReleaseStartMetadata', 'ReleaseTask', diff --git a/azure-devops/azure/devops/v7_0/release/release_client.py b/azure-devops/azure/devops/v7_2/release/release_client.py similarity index 88% rename from azure-devops/azure/devops/v7_0/release/release_client.py rename to azure-devops/azure/devops/v7_2/release/release_client.py index f65c0f3b..d488b2bb 100644 --- a/azure-devops/azure/devops/v7_0/release/release_client.py +++ b/azure-devops/azure/devops/v7_2/release/release_client.py @@ -27,7 +27,7 @@ def __init__(self, base_url=None, creds=None): def get_approvals(self, project, assigned_to_filter=None, status_filter=None, release_ids_filter=None, type_filter=None, top=None, continuation_token=None, query_order=None, include_my_group_approvals=None): """GetApprovals. - Get a list of approvals + [Preview API] Get a list of approvals :param str project: Project ID or project name :param str assigned_to_filter: Approvals assigned to this user. :param str status_filter: Approvals with this status. Default is 'pending'. @@ -37,7 +37,7 @@ def get_approvals(self, project, assigned_to_filter=None, status_filter=None, re :param int continuation_token: Gets the approvals after the continuation token provided. :param str query_order: Gets the results in the defined order of created approvals. Default is 'descending'. :param bool include_my_group_approvals: 'true' to include my group approvals. Default is 'false'. - :rtype: :class:`<[ReleaseApproval]> ` + :rtype: :class:`<[ReleaseApproval]> ` """ route_values = {} if project is not None: @@ -62,18 +62,18 @@ def get_approvals(self, project, assigned_to_filter=None, status_filter=None, re query_parameters['includeMyGroupApprovals'] = self._serialize.query('include_my_group_approvals', include_my_group_approvals, 'bool') response = self._send(http_method='GET', location_id='b47c6458-e73b-47cb-a770-4df1e8813a91', - version='7.0', + version='7.2-preview.3', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[ReleaseApproval]', self._unwrap_collection(response)) def update_release_approval(self, approval, project, approval_id): """UpdateReleaseApproval. - Update status of an approval - :param :class:` ` approval: ReleaseApproval object having status, approver and comments. + [Preview API] Update status of an approval + :param :class:` ` approval: ReleaseApproval object having status, approver and comments. :param str project: Project ID or project name :param int approval_id: Id of the approval. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -83,14 +83,14 @@ def update_release_approval(self, approval, project, approval_id): content = self._serialize.body(approval, 'ReleaseApproval') response = self._send(http_method='PATCH', location_id='9328e074-59fb-465a-89d9-b09c82ee5109', - version='7.0', + version='7.2-preview.3', route_values=route_values, content=content) return self._deserialize('ReleaseApproval', response) def get_release_task_attachment_content(self, project, release_id, environment_id, attempt_id, plan_id, timeline_id, record_id, type, name, **kwargs): """GetReleaseTaskAttachmentContent. - Get a release task attachment. + [Preview API] Get a release task attachment. :param str project: Project ID or project name :param int release_id: Id of the release. :param int environment_id: Id of the release environment. @@ -123,7 +123,7 @@ def get_release_task_attachment_content(self, project, release_id, environment_i route_values['name'] = self._serialize.url('name', name, 'str') response = self._send(http_method='GET', location_id='60b86efb-7b8c-4853-8f9f-aa142b77b479', - version='7.0', + version='7.2-preview.1', route_values=route_values, accept_media_type='application/octet-stream') if "callback" in kwargs: @@ -134,7 +134,7 @@ def get_release_task_attachment_content(self, project, release_id, environment_i def get_release_task_attachments(self, project, release_id, environment_id, attempt_id, plan_id, type): """GetReleaseTaskAttachments. - Get the release task attachments. + [Preview API] Get the release task attachments. :param str project: Project ID or project name :param int release_id: Id of the release. :param int environment_id: Id of the release environment. @@ -158,16 +158,16 @@ def get_release_task_attachments(self, project, release_id, environment_id, atte route_values['type'] = self._serialize.url('type', type, 'str') response = self._send(http_method='GET', location_id='a4d06688-0dfa-4895-82a5-f43ec9452306', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('[ReleaseTaskAttachment]', self._unwrap_collection(response)) def create_release_definition(self, release_definition, project): """CreateReleaseDefinition. - Create a release definition - :param :class:` ` release_definition: release definition object to create. + [Preview API] Create a release definition + :param :class:` ` release_definition: release definition object to create. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -175,14 +175,14 @@ def create_release_definition(self, release_definition, project): content = self._serialize.body(release_definition, 'ReleaseDefinition') response = self._send(http_method='POST', location_id='d8f96f24-8ea7-4cb6-baab-2df8fc515665', - version='7.0', + version='7.2-preview.4', route_values=route_values, content=content) return self._deserialize('ReleaseDefinition', response) def delete_release_definition(self, project, definition_id, comment=None, force_delete=None): """DeleteReleaseDefinition. - Delete a release definition. + [Preview API] Delete a release definition. :param str project: Project ID or project name :param int definition_id: Id of the release definition. :param str comment: Comment for deleting a release definition. @@ -200,17 +200,17 @@ def delete_release_definition(self, project, definition_id, comment=None, force_ query_parameters['forceDelete'] = self._serialize.query('force_delete', force_delete, 'bool') self._send(http_method='DELETE', location_id='d8f96f24-8ea7-4cb6-baab-2df8fc515665', - version='7.0', + version='7.2-preview.4', route_values=route_values, query_parameters=query_parameters) def get_release_definition(self, project, definition_id, property_filters=None): """GetReleaseDefinition. - Get a release definition. + [Preview API] Get a release definition. :param str project: Project ID or project name :param int definition_id: Id of the release definition. :param [str] property_filters: A comma-delimited list of extended properties to be retrieved. If set, the returned Release Definition will contain values for the specified property Ids (if they exist). If not set, properties will not be included. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -223,14 +223,14 @@ def get_release_definition(self, project, definition_id, property_filters=None): query_parameters['propertyFilters'] = self._serialize.query('property_filters', property_filters, 'str') response = self._send(http_method='GET', location_id='d8f96f24-8ea7-4cb6-baab-2df8fc515665', - version='7.0', + version='7.2-preview.4', route_values=route_values, query_parameters=query_parameters) return self._deserialize('ReleaseDefinition', response) def get_release_definitions(self, project, search_text=None, expand=None, artifact_type=None, artifact_source_id=None, top=None, continuation_token=None, query_order=None, path=None, is_exact_name_match=None, tag_filter=None, property_filters=None, definition_id_filter=None, is_deleted=None, search_text_contains_folder_name=None): """GetReleaseDefinitions. - Get a list of release definitions. + [Preview API] Get a list of release definitions. :param str project: Project ID or project name :param str search_text: Get release definitions with names containing searchText. :param str expand: The properties that should be expanded in the list of Release definitions. @@ -246,7 +246,7 @@ def get_release_definitions(self, project, search_text=None, expand=None, artifa :param [str] definition_id_filter: A comma-delimited list of release definitions to retrieve. :param bool is_deleted: 'true' to get release definitions that has been deleted. Default is 'false' :param bool search_text_contains_folder_name: 'true' to get the release definitions under the folder with name as specified in searchText. Default is 'false'. - :rtype: :class:`<[ReleaseDefinition]> ` + :rtype: :class:`<[ReleaseDefinition]> ` """ route_values = {} if project is not None: @@ -285,17 +285,17 @@ def get_release_definitions(self, project, search_text=None, expand=None, artifa query_parameters['searchTextContainsFolderName'] = self._serialize.query('search_text_contains_folder_name', search_text_contains_folder_name, 'bool') response = self._send(http_method='GET', location_id='d8f96f24-8ea7-4cb6-baab-2df8fc515665', - version='7.0', + version='7.2-preview.4', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[ReleaseDefinition]', self._unwrap_collection(response)) def update_release_definition(self, release_definition, project): """UpdateReleaseDefinition. - Update a release definition. - :param :class:` ` release_definition: Release definition object to update. + [Preview API] Update a release definition. + :param :class:` ` release_definition: Release definition object to update. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -303,30 +303,31 @@ def update_release_definition(self, release_definition, project): content = self._serialize.body(release_definition, 'ReleaseDefinition') response = self._send(http_method='PUT', location_id='d8f96f24-8ea7-4cb6-baab-2df8fc515665', - version='7.0', + version='7.2-preview.4', route_values=route_values, content=content) return self._deserialize('ReleaseDefinition', response) def get_deployments(self, project, definition_id=None, definition_environment_id=None, created_by=None, min_modified_time=None, max_modified_time=None, deployment_status=None, operation_status=None, latest_attempts_only=None, query_order=None, top=None, continuation_token=None, created_for=None, min_started_time=None, max_started_time=None, source_branch=None): """GetDeployments. + [Preview API] Get a list of deployments :param str project: Project ID or project name - :param int definition_id: - :param int definition_environment_id: - :param str created_by: - :param datetime min_modified_time: - :param datetime max_modified_time: - :param str deployment_status: - :param str operation_status: - :param bool latest_attempts_only: - :param str query_order: - :param int top: - :param int continuation_token: - :param str created_for: - :param datetime min_started_time: - :param datetime max_started_time: - :param str source_branch: - :rtype: :class:`<[Deployment]> ` + :param int definition_id: List the deployments for a given definition id. + :param int definition_environment_id: List the deployments for a given definition environment id. + :param str created_by: List the deployments for which deployments are created as identity specified. + :param datetime min_modified_time: List the deployments with LastModified time >= minModifiedTime. + :param datetime max_modified_time: List the deployments with LastModified time <= maxModifiedTime. + :param str deployment_status: List the deployments with given deployment status. Defult is 'All'. + :param str operation_status: List the deployments with given operation status. Default is 'All'. + :param bool latest_attempts_only: 'true' to include deployments with latest attempt only. Default is 'false'. + :param str query_order: List the deployments with given query order. Default is 'Descending'. + :param int top: List the deployments with given top. Default top is '50' and Max top is '100'. + :param int continuation_token: List the deployments with deployment id >= continuationToken. + :param str created_for: List the deployments for which deployments are requested as identity specified. + :param datetime min_started_time: List the deployments with StartedOn time >= minStartedTime. + :param datetime max_started_time: List the deployments with StartedOn time <= maxStartedTime. + :param str source_branch: List the deployments that are deployed from given branch name. + :rtype: :class:`<[Deployment]> ` """ route_values = {} if project is not None: @@ -364,19 +365,19 @@ def get_deployments(self, project, definition_id=None, definition_environment_id query_parameters['sourceBranch'] = self._serialize.query('source_branch', source_branch, 'str') response = self._send(http_method='GET', location_id='b005ef73-cddc-448e-9ba2-5193bf36b19f', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[Deployment]', self._unwrap_collection(response)) def get_release_environment(self, project, release_id, environment_id, expand=None): """GetReleaseEnvironment. - Get a release environment. + [Preview API] Get a release environment. :param str project: Project ID or project name :param int release_id: Id of the release. :param int environment_id: Id of the release environment. :param str expand: A property that should be expanded in the environment. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -390,19 +391,19 @@ def get_release_environment(self, project, release_id, environment_id, expand=No query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') response = self._send(http_method='GET', location_id='a7e426b1-03dc-48af-9dfe-c98bac612dcb', - version='7.0', + version='7.2-preview.7', route_values=route_values, query_parameters=query_parameters) return self._deserialize('ReleaseEnvironment', response) def update_release_environment(self, environment_update_data, project, release_id, environment_id): """UpdateReleaseEnvironment. - Update the status of a release environment - :param :class:` ` environment_update_data: Environment update meta data. + [Preview API] Update the status of a release environment + :param :class:` ` environment_update_data: Environment update meta data. :param str project: Project ID or project name :param int release_id: Id of the release. :param int environment_id: Id of release environment. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -414,14 +415,14 @@ def update_release_environment(self, environment_update_data, project, release_i content = self._serialize.body(environment_update_data, 'ReleaseEnvironmentUpdateMetadata') response = self._send(http_method='PATCH', location_id='a7e426b1-03dc-48af-9dfe-c98bac612dcb', - version='7.0', + version='7.2-preview.7', route_values=route_values, content=content) return self._deserialize('ReleaseEnvironment', response) def delete_folder(self, project, path): """DeleteFolder. - Deletes a definition folder for given folder name and path and all it's existing definitions. + [Preview API] Deletes a definition folder for given folder name and path and all it's existing definitions. :param str project: Project ID or project name :param str path: Path of the folder to delete. """ @@ -432,12 +433,12 @@ def delete_folder(self, project, path): route_values['path'] = self._serialize.url('path', path, 'str') self._send(http_method='DELETE', location_id='f7ddf76d-ce0c-4d68-94ff-becaec5d9dea', - version='7.0', + version='7.2-preview.2', route_values=route_values) def get_folders(self, project, path=None, query_order=None): """GetFolders. - Gets folders. + [Preview API] Gets folders. :param str project: Project ID or project name :param str path: Path of the folder. :param str query_order: Gets the results in the defined order. Default is 'None'. @@ -453,18 +454,18 @@ def get_folders(self, project, path=None, query_order=None): query_parameters['queryOrder'] = self._serialize.query('query_order', query_order, 'str') response = self._send(http_method='GET', location_id='f7ddf76d-ce0c-4d68-94ff-becaec5d9dea', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[Folder]', self._unwrap_collection(response)) def update_folder(self, folder, project, path): """UpdateFolder. - Updates an existing folder at given existing path. - :param :class:` ` folder: folder. + [Preview API] Updates an existing folder at given existing path. + :param :class:` ` folder: folder. :param str project: Project ID or project name :param str path: Path of the folder to update. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -474,18 +475,18 @@ def update_folder(self, folder, project, path): content = self._serialize.body(folder, 'Folder') response = self._send(http_method='PATCH', location_id='f7ddf76d-ce0c-4d68-94ff-becaec5d9dea', - version='7.0', + version='7.2-preview.2', route_values=route_values, content=content) return self._deserialize('Folder', response) def update_gates(self, gate_update_metadata, project, gate_step_id): """UpdateGates. - Updates the gate for a deployment. - :param :class:` ` gate_update_metadata: Metadata to patch the Release Gates. + [Preview API] Updates the gate for a deployment. + :param :class:` ` gate_update_metadata: Metadata to patch the Release Gates. :param str project: Project ID or project name :param int gate_step_id: Gate step Id. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -495,14 +496,14 @@ def update_gates(self, gate_update_metadata, project, gate_step_id): content = self._serialize.body(gate_update_metadata, 'GateUpdateMetadata') response = self._send(http_method='PATCH', location_id='2666a539-2001-4f80-bcc7-0379956749d4', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('ReleaseGates', response) def get_logs(self, project, release_id, **kwargs): """GetLogs. - Get logs for a release Id. + [Preview API] Get logs for a release Id. :param str project: Project ID or project name :param int release_id: Id of the release. :rtype: object @@ -514,7 +515,7 @@ def get_logs(self, project, release_id, **kwargs): route_values['releaseId'] = self._serialize.url('release_id', release_id, 'int') response = self._send(http_method='GET', location_id='c37fbab5-214b-48e4-a55b-cb6b4f6e4038', - version='7.0', + version='7.2-preview.2', route_values=route_values, accept_media_type='application/zip') if "callback" in kwargs: @@ -525,7 +526,7 @@ def get_logs(self, project, release_id, **kwargs): def get_task_log(self, project, release_id, environment_id, release_deploy_phase_id, task_id, start_line=None, end_line=None, **kwargs): """GetTaskLog. - Gets the task log of a release as a plain text file. + [Preview API] Gets the task log of a release as a plain text file. :param str project: Project ID or project name :param int release_id: Id of the release. :param int environment_id: Id of release environment. @@ -553,7 +554,7 @@ def get_task_log(self, project, release_id, environment_id, release_deploy_phase query_parameters['endLine'] = self._serialize.query('end_line', end_line, 'long') response = self._send(http_method='GET', location_id='17c91af7-09fd-4256-bff1-c24ee4f73bc0', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters, accept_media_type='text/plain') @@ -565,11 +566,11 @@ def get_task_log(self, project, release_id, environment_id, release_deploy_phase def get_manual_intervention(self, project, release_id, manual_intervention_id): """GetManualIntervention. - Get manual intervention for a given release and manual intervention id. + [Preview API] Get manual intervention for a given release and manual intervention id. :param str project: Project ID or project name :param int release_id: Id of the release. :param int manual_intervention_id: Id of the manual intervention. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -580,13 +581,13 @@ def get_manual_intervention(self, project, release_id, manual_intervention_id): route_values['manualInterventionId'] = self._serialize.url('manual_intervention_id', manual_intervention_id, 'int') response = self._send(http_method='GET', location_id='616c46e4-f370-4456-adaa-fbaf79c7b79e', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('ManualIntervention', response) def get_manual_interventions(self, project, release_id): """GetManualInterventions. - List all manual interventions for a given release. + [Preview API] List all manual interventions for a given release. :param str project: Project ID or project name :param int release_id: Id of the release. :rtype: [ManualIntervention] @@ -598,18 +599,18 @@ def get_manual_interventions(self, project, release_id): route_values['releaseId'] = self._serialize.url('release_id', release_id, 'int') response = self._send(http_method='GET', location_id='616c46e4-f370-4456-adaa-fbaf79c7b79e', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('[ManualIntervention]', self._unwrap_collection(response)) def update_manual_intervention(self, manual_intervention_update_metadata, project, release_id, manual_intervention_id): """UpdateManualIntervention. - Update manual intervention. - :param :class:` ` manual_intervention_update_metadata: Meta data to update manual intervention. + [Preview API] Update manual intervention. + :param :class:` ` manual_intervention_update_metadata: Meta data to update manual intervention. :param str project: Project ID or project name :param int release_id: Id of the release. :param int manual_intervention_id: Id of the manual intervention. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -621,14 +622,14 @@ def update_manual_intervention(self, manual_intervention_update_metadata, projec content = self._serialize.body(manual_intervention_update_metadata, 'ManualInterventionUpdateMetadata') response = self._send(http_method='PATCH', location_id='616c46e4-f370-4456-adaa-fbaf79c7b79e', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('ManualIntervention', response) def get_releases(self, project=None, definition_id=None, definition_environment_id=None, search_text=None, created_by=None, status_filter=None, environment_status_filter=None, min_created_time=None, max_created_time=None, query_order=None, top=None, continuation_token=None, expand=None, artifact_type_id=None, source_id=None, artifact_version_id=None, source_branch_filter=None, is_deleted=None, tag_filter=None, property_filters=None, release_id_filter=None, path=None): """GetReleases. - Get a list of releases + [Preview API] Get a list of releases :param str project: Project ID or project name :param int definition_id: Releases from this release definition Id. :param int definition_environment_id: @@ -651,7 +652,7 @@ def get_releases(self, project=None, definition_id=None, definition_environment_ :param [str] property_filters: A comma-delimited list of extended properties to be retrieved. If set, the returned Releases will contain values for the specified property Ids (if they exist). If not set, properties will not be included. Note that this will not filter out any Release from results irrespective of whether it has property set or not. :param [int] release_id_filter: A comma-delimited list of releases Ids. Only releases with these Ids will be returned. :param str path: Releases under this folder path will be returned - :rtype: :class:`<[Release]> ` + :rtype: :class:`<[Release]> ` """ route_values = {} if project is not None: @@ -704,17 +705,17 @@ def get_releases(self, project=None, definition_id=None, definition_environment_ query_parameters['path'] = self._serialize.query('path', path, 'str') response = self._send(http_method='GET', location_id='a166fde7-27ad-408e-ba75-703c2cc9d500', - version='7.0', + version='7.2-preview.8', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[Release]', self._unwrap_collection(response)) def create_release(self, release_start_metadata, project): """CreateRelease. - Create a release. - :param :class:` ` release_start_metadata: Metadata to create a release. + [Preview API] Create a release. + :param :class:` ` release_start_metadata: Metadata to create a release. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -722,21 +723,21 @@ def create_release(self, release_start_metadata, project): content = self._serialize.body(release_start_metadata, 'ReleaseStartMetadata') response = self._send(http_method='POST', location_id='a166fde7-27ad-408e-ba75-703c2cc9d500', - version='7.0', + version='7.2-preview.8', route_values=route_values, content=content) return self._deserialize('Release', response) def get_release(self, project, release_id, approval_filters=None, property_filters=None, expand=None, top_gate_records=None): """GetRelease. - Get a Release + [Preview API] Get a Release :param str project: Project ID or project name :param int release_id: Id of the release. :param str approval_filters: A filter which would allow fetching approval steps selectively based on whether it is automated, or manual. This would also decide whether we should fetch pre and post approval snapshots. Assumes All by default :param [str] property_filters: A comma-delimited list of extended properties to be retrieved. If set, the returned Release will contain values for the specified property Ids (if they exist). If not set, properties will not be included. :param str expand: A property that should be expanded in the release. :param int top_gate_records: Number of release gate records to get. Default is 5. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -755,14 +756,14 @@ def get_release(self, project, release_id, approval_filters=None, property_filte query_parameters['$topGateRecords'] = self._serialize.query('top_gate_records', top_gate_records, 'int') response = self._send(http_method='GET', location_id='a166fde7-27ad-408e-ba75-703c2cc9d500', - version='7.0', + version='7.2-preview.8', route_values=route_values, query_parameters=query_parameters) return self._deserialize('Release', response) def get_release_revision(self, project, release_id, definition_snapshot_revision, **kwargs): """GetReleaseRevision. - Get release for a given revision number. + [Preview API] Get release for a given revision number. :param str project: Project ID or project name :param int release_id: Id of the release. :param int definition_snapshot_revision: Definition snapshot revision number. @@ -778,7 +779,7 @@ def get_release_revision(self, project, release_id, definition_snapshot_revision query_parameters['definitionSnapshotRevision'] = self._serialize.query('definition_snapshot_revision', definition_snapshot_revision, 'int') response = self._send(http_method='GET', location_id='a166fde7-27ad-408e-ba75-703c2cc9d500', - version='7.0', + version='7.2-preview.8', route_values=route_values, query_parameters=query_parameters, accept_media_type='text/plain') @@ -790,11 +791,11 @@ def get_release_revision(self, project, release_id, definition_snapshot_revision def update_release(self, release, project, release_id): """UpdateRelease. - Update a complete release object. - :param :class:` ` release: Release object for update. + [Preview API] Update a complete release object. + :param :class:` ` release: Release object for update. :param str project: Project ID or project name :param int release_id: Id of the release to update. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -804,18 +805,18 @@ def update_release(self, release, project, release_id): content = self._serialize.body(release, 'Release') response = self._send(http_method='PUT', location_id='a166fde7-27ad-408e-ba75-703c2cc9d500', - version='7.0', + version='7.2-preview.8', route_values=route_values, content=content) return self._deserialize('Release', response) def update_release_resource(self, release_update_metadata, project, release_id): """UpdateReleaseResource. - Update few properties of a release. - :param :class:` ` release_update_metadata: Properties of release to update. + [Preview API] Update few properties of a release. + :param :class:` ` release_update_metadata: Properties of release to update. :param str project: Project ID or project name :param int release_id: Id of the release to update. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -825,14 +826,14 @@ def update_release_resource(self, release_update_metadata, project, release_id): content = self._serialize.body(release_update_metadata, 'ReleaseUpdateMetadata') response = self._send(http_method='PATCH', location_id='a166fde7-27ad-408e-ba75-703c2cc9d500', - version='7.0', + version='7.2-preview.8', route_values=route_values, content=content) return self._deserialize('Release', response) def get_definition_revision(self, project, definition_id, revision, **kwargs): """GetDefinitionRevision. - Get release definition for a given definitionId and revision + [Preview API] Get release definition for a given definitionId and revision :param str project: Project ID or project name :param int definition_id: Id of the definition. :param int revision: Id of the revision. @@ -847,7 +848,7 @@ def get_definition_revision(self, project, definition_id, revision, **kwargs): route_values['revision'] = self._serialize.url('revision', revision, 'int') response = self._send(http_method='GET', location_id='258b82e0-9d41-43f3-86d6-fef14ddd44bc', - version='7.0', + version='7.2-preview.1', route_values=route_values, accept_media_type='text/plain') if "callback" in kwargs: @@ -858,7 +859,7 @@ def get_definition_revision(self, project, definition_id, revision, **kwargs): def get_release_definition_history(self, project, definition_id): """GetReleaseDefinitionHistory. - Get revision history for a release definition + [Preview API] Get revision history for a release definition :param str project: Project ID or project name :param int definition_id: Id of the definition. :rtype: [ReleaseDefinitionRevision] @@ -870,7 +871,7 @@ def get_release_definition_history(self, project, definition_id): route_values['definitionId'] = self._serialize.url('definition_id', definition_id, 'int') response = self._send(http_method='GET', location_id='258b82e0-9d41-43f3-86d6-fef14ddd44bc', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('[ReleaseDefinitionRevision]', self._unwrap_collection(response)) diff --git a/azure-devops/azure/devops/v7_0/sbom/__init__.py b/azure-devops/azure/devops/v7_2/sbom/__init__.py similarity index 97% rename from azure-devops/azure/devops/v7_0/sbom/__init__.py rename to azure-devops/azure/devops/v7_2/sbom/__init__.py index 35cd2743..a67236ce 100644 --- a/azure-devops/azure/devops/v7_0/sbom/__init__.py +++ b/azure-devops/azure/devops/v7_2/sbom/__init__.py @@ -16,6 +16,7 @@ 'ManifestInfo', 'SBOMFile', 'SBOMTelemetry', + 'SignRequest', 'SignResponseBase', 'SignStatusResponse', 'SBOMClient' diff --git a/azure-devops/azure/devops/v7_0/sbom/models.py b/azure-devops/azure/devops/v7_2/sbom/models.py similarity index 87% rename from azure-devops/azure/devops/v7_0/sbom/models.py rename to azure-devops/azure/devops/v7_2/sbom/models.py index 9f255b2e..cda4d384 100644 --- a/azure-devops/azure/devops/v7_0/sbom/models.py +++ b/azure-devops/azure/devops/v7_2/sbom/models.py @@ -14,43 +14,43 @@ class Configuration(Model): This holds the configuration for the ManifestTool. The values in this file are populated from the command line, config file and default. :param additional_component_detector_args: Additional set of command-line arguments for Component Detector. - :type additional_component_detector_args: :class:`ConfigurationSetting ` + :type additional_component_detector_args: :class:`ConfigurationSetting ` :param build_component_path: The folder containing the build components and packages. - :type build_component_path: :class:`ConfigurationSetting ` + :type build_component_path: :class:`ConfigurationSetting ` :param build_drop_path: The root folder of the drop directory to validate or generate. - :type build_drop_path: :class:`ConfigurationSetting ` + :type build_drop_path: :class:`ConfigurationSetting ` :param build_list_file: Full file name of a list file that contains all files to be validated. - :type build_list_file: :class:`ConfigurationSetting ` + :type build_list_file: :class:`ConfigurationSetting ` :param catalog_file_path: The path of the signed catalog file used to validate the manifest.json. - :type catalog_file_path: :class:`ConfigurationSetting ` + :type catalog_file_path: :class:`ConfigurationSetting ` :param config_file_path: The json file that contains the configuration for the DropValidator. - :type config_file_path: :class:`ConfigurationSetting ` + :type config_file_path: :class:`ConfigurationSetting ` :param docker_images_to_scan: Comma separated list of docker image names or hashes to be scanned for packages, ex: ubuntu:16.04, 56bab49eef2ef07505f6a1b0d5bd3a601dfc3c76ad4460f24c91d6fa298369ab. - :type docker_images_to_scan: :class:`ConfigurationSetting ` + :type docker_images_to_scan: :class:`ConfigurationSetting ` :param external_document_reference_list_file: Full file path to a file that contains list of external SBOMs to be included as External document reference. - :type external_document_reference_list_file: :class:`ConfigurationSetting ` + :type external_document_reference_list_file: :class:`ConfigurationSetting ` :param hash_algorithm: The Hash algorithm to use while verifying the hash value of a file. - :type hash_algorithm: :class:`ConfigurationSetting ` + :type hash_algorithm: :class:`ConfigurationSetting ` :param ignore_missing: If set, will not fail validation on the files presented in Manifest but missing on the disk. - :type ignore_missing: :class:`ConfigurationSetting ` + :type ignore_missing: :class:`ConfigurationSetting ` :param manifest_dir_path: The root folder where the generated manifest (and other files like bsi.json) files will be placed. By default we will generate this folder in the same level as the build drop with the name '_manifest' - :type manifest_dir_path: :class:`ConfigurationSetting ` + :type manifest_dir_path: :class:`ConfigurationSetting ` :param manifest_info: A list of name and version of the manifest that we are generating. - :type manifest_info: :class:`ConfigurationSetting ` + :type manifest_info: :class:`ConfigurationSetting ` :param manifest_tool_action: The action currently being performed by the manifest tool. :type manifest_tool_action: object :param package_name: The name of the package this SBOM represents. - :type package_name: :class:`ConfigurationSetting ` + :type package_name: :class:`ConfigurationSetting ` :param package_version: The version of the package this SBOM represents. - :type package_version: :class:`ConfigurationSetting ` + :type package_version: :class:`ConfigurationSetting ` :param parallelism: The number of parallel threads to use for the workflows. - :type parallelism: :class:`ConfigurationSetting ` + :type parallelism: :class:`ConfigurationSetting ` :param root_path_filter: If you're downloading only a part of the drop using the '-r' or 'root' parameter in the drop client, specify the same string value here in order to skip validating paths that are not downloaded. - :type root_path_filter: :class:`ConfigurationSetting ` + :type root_path_filter: :class:`ConfigurationSetting ` :param telemetry_file_path: If specified, we will store the generated telemetry for the execution of the SBOM tool at this path. - :type telemetry_file_path: :class:`ConfigurationSetting ` + :type telemetry_file_path: :class:`ConfigurationSetting ` :param validate_signature: If set, will validate the manifest using the signed catalog file. - :type validate_signature: :class:`ConfigurationSetting ` + :type validate_signature: :class:`ConfigurationSetting ` """ _attribute_map = { @@ -174,7 +174,7 @@ class SBOMFile(Model): :param sbom_file_path: The path where the final generated SBOM is placed. :type sbom_file_path: str :param sbom_format_name: The name and version of the format of the generated SBOM. - :type sbom_format_name: :class:`ManifestInfo ` + :type sbom_format_name: :class:`ManifestInfo ` """ _attribute_map = { @@ -201,15 +201,19 @@ class SBOMTelemetry(Model): :param e2_eTask_result: The end to end results of the extension task. :type e2_eTask_result: str :param parameters: A list of ConfigurationSetting`1 representing each input parameter used in the validation. - :type parameters: :class:`Configuration ` + :type parameters: :class:`Configuration ` :param result: The result of the execution :type result: str :param sbom_formats_used: A list of the SBOM formats and related file properties that was used in the generation/validation of the SBOM. - :type sbom_formats_used: list of :class:`SBOMFile ` + :type sbom_formats_used: list of :class:`SBOMFile ` :param switches: Any internal switches and their value that were used during the execution. A switch can be something that was provided through a configuraiton or an environment variable. :type switches: dict :param task_error_message: Error messages that came from the extension task. :type task_error_message: str + :param task_name: The name of the task that logged SBOM telemetry + :type task_name: str + :param telemetry_id: The unique id for this telemetry + :type telemetry_id: str :param tool_execution_result: The result of the tool as a numeric value. :type tool_execution_result: int """ @@ -223,10 +227,12 @@ class SBOMTelemetry(Model): 'sbom_formats_used': {'key': 'sbomFormatsUsed', 'type': '[SBOMFile]'}, 'switches': {'key': 'switches', 'type': '{object}'}, 'task_error_message': {'key': 'taskErrorMessage', 'type': 'str'}, + 'task_name': {'key': 'taskName', 'type': 'str'}, + 'telemetry_id': {'key': 'telemetryId', 'type': 'str'}, 'tool_execution_result': {'key': 'toolExecutionResult', 'type': 'int'} } - def __init__(self, bsi_data=None, bsi_source=None, e2_eTask_result=None, parameters=None, result=None, sbom_formats_used=None, switches=None, task_error_message=None, tool_execution_result=None): + def __init__(self, bsi_data=None, bsi_source=None, e2_eTask_result=None, parameters=None, result=None, sbom_formats_used=None, switches=None, task_error_message=None, task_name=None, telemetry_id=None, tool_execution_result=None): super(SBOMTelemetry, self).__init__() self.bsi_data = bsi_data self.bsi_source = bsi_source @@ -236,9 +242,32 @@ def __init__(self, bsi_data=None, bsi_source=None, e2_eTask_result=None, paramet self.sbom_formats_used = sbom_formats_used self.switches = switches self.task_error_message = task_error_message + self.task_name = task_name + self.telemetry_id = telemetry_id self.tool_execution_result = tool_execution_result +class SignRequest(Model): + """ + Used to provide the FileHash of the SBOM file and EBOM ID to be added to the catalog file. + + :param ebom_id: The EBOM ID for the associated image. + :type ebom_id: str + :param file_hash: The file hash of the generated SBOM file. + :type file_hash: :class:`FileHash ` + """ + + _attribute_map = { + 'ebom_id': {'key': 'ebomId', 'type': 'str'}, + 'file_hash': {'key': 'fileHash', 'type': 'FileHash'} + } + + def __init__(self, ebom_id=None, file_hash=None): + super(SignRequest, self).__init__() + self.ebom_id = ebom_id + self.file_hash = file_hash + + class SignResponseBase(Model): """ The base reponse object for all responses from the signing api. @@ -297,6 +326,7 @@ def __init__(self, customer_correlation_id=None, error_info=None, result=None, d 'ManifestInfo', 'SBOMFile', 'SBOMTelemetry', + 'SignRequest', 'SignResponseBase', 'SignStatusResponse', ] diff --git a/azure-devops/azure/devops/v7_0/sbom/sbom_client.py b/azure-devops/azure/devops/v7_2/sbom/sbom_client.py similarity index 100% rename from azure-devops/azure/devops/v7_0/sbom/sbom_client.py rename to azure-devops/azure/devops/v7_2/sbom/sbom_client.py diff --git a/azure-devops/azure/devops/v7_0/search/__init__.py b/azure-devops/azure/devops/v7_2/search/__init__.py similarity index 100% rename from azure-devops/azure/devops/v7_0/search/__init__.py rename to azure-devops/azure/devops/v7_2/search/__init__.py diff --git a/azure-devops/azure/devops/v7_0/search/models.py b/azure-devops/azure/devops/v7_2/search/models.py similarity index 96% rename from azure-devops/azure/devops/v7_0/search/models.py rename to azure-devops/azure/devops/v7_2/search/models.py index c8cbab42..ce92a961 100644 --- a/azure-devops/azure/devops/v7_0/search/models.py +++ b/azure-devops/azure/devops/v7_2/search/models.py @@ -16,11 +16,11 @@ class BoardResult(Model): :param boardtype: Board Type of the board document. :type boardtype: str :param collection: Collection details of the baord document. - :type collection: :class:`Collection ` + :type collection: :class:`Collection ` :param project: Project details of the board document. - :type project: :class:`Project ` + :type project: :class:`Project ` :param team: Team details of the board document. - :type team: :class:`Team ` + :type team: :class:`Team ` """ _attribute_map = { @@ -68,7 +68,7 @@ class CodeResult(Model): Defines the code result containing information of the searched files and its metadata. :param collection: Collection of the result file. - :type collection: :class:`Collection ` + :type collection: :class:`Collection ` :param content_id: ContentId of the result file. :type content_id: str :param file_name: Name of the result file. @@ -78,11 +78,11 @@ class CodeResult(Model): :param path: Path at which result file is present. :type path: str :param project: Project of the result file. - :type project: :class:`Project ` + :type project: :class:`Project ` :param repository: Repository of the result file. - :type repository: :class:`Repository ` + :type repository: :class:`Repository ` :param versions: Versions of the result file. - :type versions: list of :class:`Version ` + :type versions: list of :class:`Version ` """ _attribute_map = { @@ -159,7 +159,7 @@ class CustomRepositoryStatusResponse(Model): :param id: Repository Id. :type id: str :param indexed_top_level_folders: List of indexed top level folders info. - :type indexed_top_level_folders: list of :class:`DepotInfo ` + :type indexed_top_level_folders: list of :class:`DepotInfo ` :param name: Repository Name. :type name: str """ @@ -182,7 +182,7 @@ class DepotInfo(Model): Information about the custom repository indexing freshness for configured branches and depots. :param indexed_branches: List of Indexed branches info. - :type indexed_branches: list of :class:`BranchInfo ` + :type indexed_branches: list of :class:`BranchInfo ` :param name: Name of the indexed top level folder (depot). :type name: str """ @@ -314,12 +314,12 @@ class Hit(Model): """ Describes the position of a piece of text in a document. + :param char_offset: Gets or sets the start character offset of a piece of text. + :type char_offset: int :param code_snippet: Gets or sets an extract of code where the match appears. Usually it is the line where there is the match. :type code_snippet: str :param column: Gets or sets the column number where the match appears in the line. :type column: int - :param char_offset: Gets or sets the start character offset of a piece of text. - :type char_offset: int :param length: Gets or sets the length of a piece of text. :type length: int :param line: Gets or sets the line number where the match appears in the file. @@ -329,19 +329,19 @@ class Hit(Model): """ _attribute_map = { + 'char_offset': {'key': 'charOffset', 'type': 'int'}, 'code_snippet': {'key': 'codeSnippet', 'type': 'str'}, 'column': {'key': 'column', 'type': 'int'}, - 'char_offset': {'key': 'charOffset', 'type': 'int'}, 'length': {'key': 'length', 'type': 'int'}, 'line': {'key': 'line', 'type': 'int'}, 'type': {'key': 'type', 'type': 'str'} } - def __init__(self, code_snippet=None, column=None, char_offset=None, length=None, line=None, type=None): + def __init__(self, char_offset=None, code_snippet=None, column=None, length=None, line=None, type=None): super(Hit, self).__init__() + self.char_offset = char_offset self.code_snippet = code_snippet self.column = column - self.char_offset = char_offset self.length = length self.line = line self.type = type @@ -375,9 +375,9 @@ class PackageResult(Model): :param description: Description of the package. :type description: str :param feeds: List of feeds which contain the matching package. - :type feeds: list of :class:`FeedInfo ` + :type feeds: list of :class:`FeedInfo ` :param hits: List of highlighted fields for the match. - :type hits: list of :class:`PackageHit ` + :type hits: list of :class:`PackageHit ` :param id: Id of the package. :type id: str :param name: Name of the package. @@ -410,7 +410,7 @@ class PackageSearchResponse(Model): :param activity_id: :type activity_id: list of str :param content: - :type content: :class:`PackageSearchResponseContent ` + :type content: :class:`PackageSearchResponseContent ` """ _attribute_map = { @@ -435,7 +435,7 @@ class PackageSearchResponseContent(EntitySearchResponse): :param count: Total number of matched packages. :type count: int :param results: List of matched packages. - :type results: list of :class:`PackageResult ` + :type results: list of :class:`PackageResult ` """ _attribute_map = { @@ -529,7 +529,7 @@ class RepositoryStatusResponse(Model): :param id: Repository Id. :type id: str :param indexed_branches: List of Indexed branches info. - :type indexed_branches: list of :class:`BranchInfo ` + :type indexed_branches: list of :class:`BranchInfo ` :param name: Repository Name. :type name: str """ @@ -622,7 +622,7 @@ class SettingSearchResponse(EntitySearchResponse): :param count: Total number of matched setting documents. :type count: int :param results: List of top matched setting documents. - :type results: list of :class:`SettingResult ` + :type results: list of :class:`SettingResult ` """ _attribute_map = { @@ -687,7 +687,7 @@ class TfvcRepositoryStatusResponse(Model): :param id: Repository Id. :type id: str :param indexing_information: List of Indexing Information for TFVC repository - :type indexing_information: list of :class:`BranchInfo ` + :type indexing_information: list of :class:`BranchInfo ` :param name: Repository Name. :type name: str """ @@ -781,19 +781,19 @@ class WikiResult(Model): Defines the wiki result that matched a wiki search request. :param collection: Collection of the result file. - :type collection: :class:`Collection ` + :type collection: :class:`Collection ` :param content_id: ContentId of the result file. :type content_id: str :param file_name: Name of the result file. :type file_name: str :param hits: Highlighted snippets of fields that match the search request. The list is sorted by relevance of the snippets. - :type hits: list of :class:`WikiHit ` + :type hits: list of :class:`WikiHit ` :param path: Path at which result file is present. :type path: str :param project: Project details of the wiki document. - :type project: :class:`ProjectReference ` + :type project: :class:`ProjectReference ` :param wiki: Wiki information for the result. - :type wiki: :class:`Wiki ` + :type wiki: :class:`Wiki ` """ _attribute_map = { @@ -828,7 +828,7 @@ class WikiSearchResponse(EntitySearchResponse): :param count: Total number of matched wiki documents. :type count: int :param results: List of top matched wiki documents. - :type results: list of :class:`WikiResult ` + :type results: list of :class:`WikiResult ` """ _attribute_map = { @@ -872,9 +872,9 @@ class WorkItemResult(Model): :param fields: A standard set of work item fields and their values. :type fields: dict :param hits: Highlighted snippets of fields that match the search request. The list is sorted by relevance of the snippets. - :type hits: list of :class:`WorkItemHit ` + :type hits: list of :class:`WorkItemHit ` :param project: Project details of the work item. - :type project: :class:`Project ` + :type project: :class:`Project ` :param url: Reference to the work item. :type url: str """ @@ -905,7 +905,7 @@ class WorkItemSearchResponse(EntitySearchResponse): :param count: Total number of matched work items. :type count: int :param results: List of top matched work items. - :type results: list of :class:`WorkItemResult ` + :type results: list of :class:`WorkItemResult ` """ _attribute_map = { @@ -932,7 +932,7 @@ class BoardSearchResponse(EntitySearchResponse): :param count: Total number of matched Board documents. :type count: int :param results: List of top matched Board documents. - :type results: list of :class:`BoardResult ` + :type results: list of :class:`BoardResult ` """ _attribute_map = { @@ -959,7 +959,7 @@ class CodeSearchResponse(EntitySearchResponse): :param count: Total number of matched files. :type count: int :param results: List of matched files. - :type results: list of :class:`CodeResult ` + :type results: list of :class:`CodeResult ` """ _attribute_map = { @@ -984,7 +984,7 @@ class EntitySearchRequest(EntitySearchRequestBase): :param search_text: The search text. :type search_text: str :param order_by: Options for sorting search results. If set to null, the results will be returned sorted by relevance. If more than one sort option is provided, the results are sorted in the order specified in the OrderBy. - :type order_by: list of :class:`SortOption ` + :type order_by: list of :class:`SortOption ` :param skip: Number of results to be skipped. :type skip: int :param top: Number of results to be returned. @@ -1019,7 +1019,7 @@ class PackageSearchRequest(EntitySearchRequest): :param search_text: The search text. :type search_text: str :param order_by: Options for sorting search results. If set to null, the results will be returned sorted by relevance. If more than one sort option is provided, the results are sorted in the order specified in the OrderBy. - :type order_by: list of :class:`SortOption ` + :type order_by: list of :class:`SortOption ` :param skip: Number of results to be skipped. :type skip: int :param top: Number of results to be returned. @@ -1050,7 +1050,7 @@ class SettingSearchRequest(EntitySearchRequest): :param search_text: The search text. :type search_text: str :param order_by: Options for sorting search results. If set to null, the results will be returned sorted by relevance. If more than one sort option is provided, the results are sorted in the order specified in the OrderBy. - :type order_by: list of :class:`SortOption ` + :type order_by: list of :class:`SortOption ` :param skip: Number of results to be skipped. :type skip: int :param top: Number of results to be returned. @@ -1081,7 +1081,7 @@ class WikiSearchRequest(EntitySearchRequest): :param search_text: The search text. :type search_text: str :param order_by: Options for sorting search results. If set to null, the results will be returned sorted by relevance. If more than one sort option is provided, the results are sorted in the order specified in the OrderBy. - :type order_by: list of :class:`SortOption ` + :type order_by: list of :class:`SortOption ` :param skip: Number of results to be skipped. :type skip: int :param top: Number of results to be returned. @@ -1112,7 +1112,7 @@ class WorkItemSearchRequest(EntitySearchRequest): :param search_text: The search text. :type search_text: str :param order_by: Options for sorting search results. If set to null, the results will be returned sorted by relevance. If more than one sort option is provided, the results are sorted in the order specified in the OrderBy. - :type order_by: list of :class:`SortOption ` + :type order_by: list of :class:`SortOption ` :param skip: Number of results to be skipped. :type skip: int :param top: Number of results to be returned. @@ -1143,7 +1143,7 @@ class BoardSearchRequest(EntitySearchRequest): :param search_text: The search text. :type search_text: str :param order_by: Options for sorting search results. If set to null, the results will be returned sorted by relevance. If more than one sort option is provided, the results are sorted in the order specified in the OrderBy. - :type order_by: list of :class:`SortOption ` + :type order_by: list of :class:`SortOption ` :param skip: Number of results to be skipped. :type skip: int :param top: Number of results to be returned. @@ -1174,7 +1174,7 @@ class CodeSearchRequest(EntitySearchRequest): :param search_text: The search text. :type search_text: str :param order_by: Options for sorting search results. If set to null, the results will be returned sorted by relevance. If more than one sort option is provided, the results are sorted in the order specified in the OrderBy. - :type order_by: list of :class:`SortOption ` + :type order_by: list of :class:`SortOption ` :param skip: Number of results to be skipped. :type skip: int :param top: Number of results to be returned. diff --git a/azure-devops/azure/devops/v7_0/search/search_client.py b/azure-devops/azure/devops/v7_2/search/search_client.py similarity index 81% rename from azure-devops/azure/devops/v7_0/search/search_client.py rename to azure-devops/azure/devops/v7_2/search/search_client.py index 9ae71cd8..a87dc2c1 100644 --- a/azure-devops/azure/devops/v7_0/search/search_client.py +++ b/azure-devops/azure/devops/v7_2/search/search_client.py @@ -27,10 +27,10 @@ def __init__(self, base_url=None, creds=None): def fetch_scroll_code_search_results(self, request, project=None): """FetchScrollCodeSearchResults. - Provides a set of results for the search text. - :param :class:` ` request: The Code Search Request. + [Preview API] Provides a set of results for the search text. + :param :class:` ` request: The Code Search Request. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -38,17 +38,17 @@ def fetch_scroll_code_search_results(self, request, project=None): content = self._serialize.body(request, 'ScrollSearchRequest') response = self._send(http_method='POST', location_id='852dac94-e8f7-45a2-9910-927ae35766a2', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('CodeSearchResponse', response) def fetch_code_search_results(self, request, project=None): """FetchCodeSearchResults. - Provides a set of results for the search text. - :param :class:` ` request: The Code Search Request. + [Preview API] Provides a set of results for the search text. + :param :class:` ` request: The Code Search Request. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -56,21 +56,21 @@ def fetch_code_search_results(self, request, project=None): content = self._serialize.body(request, 'CodeSearchRequest') response = self._send(http_method='POST', location_id='e7f29993-5b82-4fca-9386-f5cfe683d524', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('CodeSearchResponse', response) def fetch_package_search_results(self, request): """FetchPackageSearchResults. - Provides a set of results for the search text. - :param :class:` ` request: The Package Search Request. - :rtype: :class:` ` + [Preview API] Provides a set of results for the search text. + :param :class:` ` request: The Package Search Request. + :rtype: :class:` ` """ content = self._serialize.body(request, 'PackageSearchRequest') response = self._send(http_method='POST', location_id='f62ada48-eedc-4c8e-93f0-de870e4ecce0', - version='7.0', + version='7.2-preview.1', content=content) response_object = models.PackageSearchResponse() response_object.content = self._deserialize('PackageSearchResponseContent', response) @@ -79,10 +79,10 @@ def fetch_package_search_results(self, request): def get_repository_status(self, project, repository): """GetRepositoryStatus. - Provides status of Repository. + [Preview API] Provides status of Repository. :param str project: Project ID or project name :param str repository: Repository ID or repository name. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -91,31 +91,31 @@ def get_repository_status(self, project, repository): route_values['repository'] = self._serialize.url('repository', repository, 'str') response = self._send(http_method='GET', location_id='1f60303c-7261-4387-80f1-742a2ecf2964', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('RepositoryStatusResponse', response) def get_tfvc_repository_status(self, project): """GetTfvcRepositoryStatus. - Provides status of TFVC Repository. + [Preview API] Provides status of TFVC Repository. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') response = self._send(http_method='GET', location_id='d5bf4e52-e0af-4626-8c50-8a80b18fa69f', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('TfvcRepositoryStatusResponse', response) def fetch_wiki_search_results(self, request, project=None): """FetchWikiSearchResults. - Provides a set of results for the search request. - :param :class:` ` request: The Wiki Search Request. + [Preview API] Provides a set of results for the search request. + :param :class:` ` request: The Wiki Search Request. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -123,17 +123,17 @@ def fetch_wiki_search_results(self, request, project=None): content = self._serialize.body(request, 'WikiSearchRequest') response = self._send(http_method='POST', location_id='e90e7664-7049-4100-9a86-66b161d81080', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('WikiSearchResponse', response) def fetch_work_item_search_results(self, request, project=None): """FetchWorkItemSearchResults. - Provides a set of results for the search text. - :param :class:` ` request: The Work Item Search Request. + [Preview API] Provides a set of results for the search text. + :param :class:` ` request: The Work Item Search Request. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -141,7 +141,7 @@ def fetch_work_item_search_results(self, request, project=None): content = self._serialize.body(request, 'WorkItemSearchRequest') response = self._send(http_method='POST', location_id='73b2c9e2-ff9e-4447-8cda-5f5b21ff7cae', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('WorkItemSearchResponse', response) diff --git a/azure-devops/azure/devops/v7_0/security/__init__.py b/azure-devops/azure/devops/v7_2/security/__init__.py similarity index 100% rename from azure-devops/azure/devops/v7_0/security/__init__.py rename to azure-devops/azure/devops/v7_2/security/__init__.py diff --git a/azure-devops/azure/devops/v7_0/security/models.py b/azure-devops/azure/devops/v7_2/security/models.py similarity index 98% rename from azure-devops/azure/devops/v7_0/security/models.py rename to azure-devops/azure/devops/v7_2/security/models.py index f458386c..1bceadc8 100644 --- a/azure-devops/azure/devops/v7_0/security/models.py +++ b/azure-devops/azure/devops/v7_2/security/models.py @@ -18,9 +18,9 @@ class AccessControlEntry(Model): :param deny: The set of permission bits that represent the actions that the associated descriptor is not allowed to perform. :type deny: int :param descriptor: The descriptor for the user this AccessControlEntry applies to. - :type descriptor: :class:`str ` + :type descriptor: :class:`str ` :param extended_info: This value, when set, reports the inherited and effective information for the associated descriptor. This value is only set on AccessControlEntries returned by the QueryAccessControlList(s) call when its includeExtendedInfo parameter is set to true. - :type extended_info: :class:`AceExtendedInformation ` + :type extended_info: :class:`AceExtendedInformation ` """ _attribute_map = { @@ -172,7 +172,7 @@ class PermissionEvaluationBatch(Model): :param always_allow_administrators: True if members of the Administrators group should always pass the security check. :type always_allow_administrators: bool :param evaluations: Array of permission evaluations to evaluate. - :type evaluations: list of :class:`PermissionEvaluation ` + :type evaluations: list of :class:`PermissionEvaluation ` """ _attribute_map = { @@ -191,7 +191,7 @@ class SecurityNamespaceDescription(Model): Class for describing the details of a TeamFoundationSecurityNamespace. :param actions: The list of actions that this Security Namespace is responsible for securing. - :type actions: list of :class:`ActionDefinition ` + :type actions: list of :class:`ActionDefinition ` :param dataspace_category: This is the dataspace category that describes where the security information for this SecurityNamespace should be stored. :type dataspace_category: str :param display_name: This localized name for this namespace. diff --git a/azure-devops/azure/devops/v7_0/security/security_client.py b/azure-devops/azure/devops/v7_2/security/security_client.py similarity index 83% rename from azure-devops/azure/devops/v7_0/security/security_client.py rename to azure-devops/azure/devops/v7_2/security/security_client.py index 393e0b80..0855c9da 100644 --- a/azure-devops/azure/devops/v7_0/security/security_client.py +++ b/azure-devops/azure/devops/v7_2/security/security_client.py @@ -27,7 +27,7 @@ def __init__(self, base_url=None, creds=None): def remove_access_control_entries(self, security_namespace_id, token=None, descriptors=None): """RemoveAccessControlEntries. - Remove the specified ACEs from the ACL belonging to the specified token. + [Preview API] Remove the specified ACEs from the ACL belonging to the specified token. :param str security_namespace_id: Security namespace identifier. :param str token: The token whose ACL should be modified. :param str descriptors: String containing a list of identity descriptors separated by ',' whose entries should be removed. @@ -43,15 +43,15 @@ def remove_access_control_entries(self, security_namespace_id, token=None, descr query_parameters['descriptors'] = self._serialize.query('descriptors', descriptors, 'str') response = self._send(http_method='DELETE', location_id='ac08c8ff-4323-4b08-af90-bcd018d380ce', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('bool', response) def set_access_control_entries(self, container, security_namespace_id): """SetAccessControlEntries. - Add or update ACEs in the ACL for the provided token. The request body contains the target token, a list of [ACEs](https://docs.microsoft.com/en-us/rest/api/azure/devops/security/access%20control%20entries/set%20access%20control%20entries?#accesscontrolentry) and a optional merge parameter. In the case of a collision (by identity descriptor) with an existing ACE in the ACL, the "merge" parameter determines the behavior. If set, the existing ACE has its allow and deny merged with the incoming ACE's allow and deny. If unset, the existing ACE is displaced. - :param :class:` ` container: + [Preview API] Add or update ACEs in the ACL for the provided token. The request body contains the target token, a list of [ACEs](https://docs.microsoft.com/en-us/rest/api/azure/devops/security/access%20control%20entries/set%20access%20control%20entries?#accesscontrolentry) and a optional merge parameter. In the case of a collision (by identity descriptor) with an existing ACE in the ACL, the "merge" parameter determines the behavior. If set, the existing ACE has its allow and deny merged with the incoming ACE's allow and deny. If unset, the existing ACE is displaced. + :param :class:` ` container: :param str security_namespace_id: Security namespace identifier. :rtype: [AccessControlEntry] """ @@ -61,14 +61,14 @@ def set_access_control_entries(self, container, security_namespace_id): content = self._serialize.body(container, 'object') response = self._send(http_method='POST', location_id='ac08c8ff-4323-4b08-af90-bcd018d380ce', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('[AccessControlEntry]', self._unwrap_collection(response)) def query_access_control_lists(self, security_namespace_id, token=None, descriptors=None, include_extended_info=None, recurse=None): """QueryAccessControlLists. - Return a list of access control lists for the specified security namespace and token. All ACLs in the security namespace will be retrieved if no optional parameters are provided. + [Preview API] Return a list of access control lists for the specified security namespace and token. All ACLs in the security namespace will be retrieved if no optional parameters are provided. :param str security_namespace_id: Security namespace identifier. :param str token: Security token :param str descriptors: An optional filter string containing a list of identity descriptors separated by ',' whose ACEs should be retrieved. If this is left null, entire ACLs will be returned. @@ -90,14 +90,14 @@ def query_access_control_lists(self, security_namespace_id, token=None, descript query_parameters['recurse'] = self._serialize.query('recurse', recurse, 'bool') response = self._send(http_method='GET', location_id='18a2ad18-7571-46ae-bec7-0c7da1495885', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[AccessControlList]', self._unwrap_collection(response)) def remove_access_control_lists(self, security_namespace_id, tokens=None, recurse=None): """RemoveAccessControlLists. - Remove access control lists under the specfied security namespace. + [Preview API] Remove access control lists under the specfied security namespace. :param str security_namespace_id: Security namespace identifier. :param str tokens: One or more comma-separated security tokens :param bool recurse: If true and this is a hierarchical namespace, also remove child ACLs of the specified tokens. @@ -113,15 +113,15 @@ def remove_access_control_lists(self, security_namespace_id, tokens=None, recurs query_parameters['recurse'] = self._serialize.query('recurse', recurse, 'bool') response = self._send(http_method='DELETE', location_id='18a2ad18-7571-46ae-bec7-0c7da1495885', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('bool', response) def set_access_control_lists(self, access_control_lists, security_namespace_id): """SetAccessControlLists. - Create or update one or more access control lists. All data that currently exists for the ACLs supplied will be overwritten. - :param :class:` ` access_control_lists: A list of ACLs to create or update. + [Preview API] Create or update one or more access control lists. All data that currently exists for the ACLs supplied will be overwritten. + :param :class:` ` access_control_lists: A list of ACLs to create or update. :param str security_namespace_id: Security namespace identifier. """ route_values = {} @@ -130,26 +130,26 @@ def set_access_control_lists(self, access_control_lists, security_namespace_id): content = self._serialize.body(access_control_lists, 'VssJsonCollectionWrapper') self._send(http_method='POST', location_id='18a2ad18-7571-46ae-bec7-0c7da1495885', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) def has_permissions_batch(self, eval_batch): """HasPermissionsBatch. - Evaluates multiple permissions for the calling user. Note: This method does not aggregate the results, nor does it short-circuit if one of the permissions evaluates to false. - :param :class:` ` eval_batch: The set of evaluation requests. - :rtype: :class:` ` + [Preview API] Evaluates multiple permissions for the calling user. Note: This method does not aggregate the results, nor does it short-circuit if one of the permissions evaluates to false. + :param :class:` ` eval_batch: The set of evaluation requests. + :rtype: :class:` ` """ content = self._serialize.body(eval_batch, 'PermissionEvaluationBatch') response = self._send(http_method='POST', location_id='cf1faa59-1b63-4448-bf04-13d981a46f5d', - version='7.0', + version='7.2-preview.1', content=content) return self._deserialize('PermissionEvaluationBatch', response) def has_permissions(self, security_namespace_id, permissions=None, tokens=None, always_allow_administrators=None, delimiter=None): """HasPermissions. - Evaluates whether the caller has the specified permissions on the specified set of security tokens. + [Preview API] Evaluates whether the caller has the specified permissions on the specified set of security tokens. :param str security_namespace_id: Security namespace identifier. :param int permissions: Permissions to evaluate. :param str tokens: One or more security tokens to evaluate. @@ -171,19 +171,19 @@ def has_permissions(self, security_namespace_id, permissions=None, tokens=None, query_parameters['delimiter'] = self._serialize.query('delimiter', delimiter, 'str') response = self._send(http_method='GET', location_id='dd3b8bd6-c7fc-4cbd-929a-933d9c011c9d', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[bool]', self._unwrap_collection(response)) def remove_permission(self, security_namespace_id, descriptor, permissions=None, token=None): """RemovePermission. - Removes the specified permissions on a security token for a user or group. + [Preview API] Removes the specified permissions on a security token for a user or group. :param str security_namespace_id: Security namespace identifier. :param str descriptor: Identity descriptor of the user to remove permissions for. :param int permissions: Permissions to remove. :param str token: Security token to remove permissions for. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if security_namespace_id is not None: @@ -197,14 +197,14 @@ def remove_permission(self, security_namespace_id, descriptor, permissions=None, query_parameters['token'] = self._serialize.query('token', token, 'str') response = self._send(http_method='DELETE', location_id='dd3b8bd6-c7fc-4cbd-929a-933d9c011c9d', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters) return self._deserialize('AccessControlEntry', response) def query_security_namespaces(self, security_namespace_id=None, local_only=None): """QuerySecurityNamespaces. - List all security namespaces or just the specified namespace. + [Preview API] List all security namespaces or just the specified namespace. :param str security_namespace_id: Security namespace identifier. :param bool local_only: If true, retrieve only local security namespaces. :rtype: [SecurityNamespaceDescription] @@ -217,7 +217,7 @@ def query_security_namespaces(self, security_namespace_id=None, local_only=None) query_parameters['localOnly'] = self._serialize.query('local_only', local_only, 'bool') response = self._send(http_method='GET', location_id='ce7b9f95-fde9-4be8-a86d-83b366f0b87a', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[SecurityNamespaceDescription]', self._unwrap_collection(response)) diff --git a/azure-devops/azure/devops/v7_0/service_endpoint/__init__.py b/azure-devops/azure/devops/v7_2/service_endpoint/__init__.py similarity index 97% rename from azure-devops/azure/devops/v7_0/service_endpoint/__init__.py rename to azure-devops/azure/devops/v7_2/service_endpoint/__init__.py index 24dc7c7a..83d7f982 100644 --- a/azure-devops/azure/devops/v7_0/service_endpoint/__init__.py +++ b/azure-devops/azure/devops/v7_2/service_endpoint/__init__.py @@ -10,8 +10,6 @@ from .service_endpoint_client import ServiceEndpointClient __all__ = [ - 'AadOauthTokenRequest', - 'AadOauthTokenResult', 'AuthenticationSchemeReference', 'AuthorizationHeader', 'AzureManagementGroup', diff --git a/azure-devops/azure/devops/v7_0/service_endpoint/models.py b/azure-devops/azure/devops/v7_2/service_endpoint/models.py similarity index 93% rename from azure-devops/azure/devops/v7_0/service_endpoint/models.py rename to azure-devops/azure/devops/v7_2/service_endpoint/models.py index a4a2b215..a35b91ea 100644 --- a/azure-devops/azure/devops/v7_0/service_endpoint/models.py +++ b/azure-devops/azure/devops/v7_2/service_endpoint/models.py @@ -9,52 +9,6 @@ from msrest.serialization import Model -class AadOauthTokenRequest(Model): - """ - :param refresh: - :type refresh: bool - :param resource: - :type resource: str - :param tenant_id: - :type tenant_id: str - :param token: - :type token: str - """ - - _attribute_map = { - 'refresh': {'key': 'refresh', 'type': 'bool'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'token': {'key': 'token', 'type': 'str'} - } - - def __init__(self, refresh=None, resource=None, tenant_id=None, token=None): - super(AadOauthTokenRequest, self).__init__() - self.refresh = refresh - self.resource = resource - self.tenant_id = tenant_id - self.token = token - - -class AadOauthTokenResult(Model): - """ - :param access_token: - :type access_token: str - :param refresh_token_cache: - :type refresh_token_cache: str - """ - - _attribute_map = { - 'access_token': {'key': 'accessToken', 'type': 'str'}, - 'refresh_token_cache': {'key': 'refreshTokenCache', 'type': 'str'} - } - - def __init__(self, access_token=None, refresh_token_cache=None): - super(AadOauthTokenResult, self).__init__() - self.access_token = access_token - self.refresh_token_cache = refresh_token_cache - - class AuthenticationSchemeReference(Model): """ Specifies the authentication scheme to be used for authentication. @@ -133,7 +87,7 @@ class AzureManagementGroupQueryResult(Model): :param error_message: Error message in case of an exception :type error_message: str :param value: List of azure management groups - :type value: list of :class:`AzureManagementGroup ` + :type value: list of :class:`AzureManagementGroup ` """ _attribute_map = { @@ -179,7 +133,7 @@ class AzureSubscriptionQueryResult(Model): :param error_message: :type error_message: str :param value: - :type value: list of :class:`AzureSubscription ` + :type value: list of :class:`AzureSubscription ` """ _attribute_map = { @@ -215,7 +169,7 @@ class DataSource(Model): Specifies the data sources for this endpoint. :param authentication_scheme: Gets or sets the authentication scheme for the endpoint request. - :type authentication_scheme: :class:`AuthenticationSchemeReference ` + :type authentication_scheme: :class:`AuthenticationSchemeReference ` :param callback_context_template: Gets or sets the pagination format supported by this data source(ContinuationToken/SkipTop). :type callback_context_template: str :param callback_required_template: Gets or sets the template to check if subsequent call is needed. @@ -223,7 +177,7 @@ class DataSource(Model): :param endpoint_url: Gets or sets the endpoint url of the data source. :type endpoint_url: str :param headers: Gets or sets the authorization headers of the request. - :type headers: list of :class:`AuthorizationHeader ` + :type headers: list of :class:`AuthorizationHeader ` :param initial_context_template: Gets or sets the initial value of the query params. :type initial_context_template: str :param name: Gets or sets the name of the data source. @@ -282,7 +236,7 @@ class DataSourceBindingBase(Model): :param endpoint_url: Gets or sets the url of the service endpoint. :type endpoint_url: str :param headers: Gets or sets the authorization headers. - :type headers: list of :class:`AuthorizationHeader ` + :type headers: list of :class:`AuthorizationHeader ` :param initial_context_template: Defines the initial value of the query params :type initial_context_template: str :param parameters: Gets or sets the parameters for the data source. @@ -341,7 +295,7 @@ class DataSourceDetails(Model): :param data_source_url: Gets or sets the data source url. :type data_source_url: str :param headers: Gets or sets the request headers. - :type headers: list of :class:`AuthorizationHeader ` + :type headers: list of :class:`AuthorizationHeader ` :param initial_context_template: Gets or sets the initialization context used for the initial call to the data source :type initial_context_template: str :param parameters: Gets the parameters of data source. @@ -430,7 +384,7 @@ class DependsOn(Model): :param input: Gets or sets the ID of the field on which URL's value is dependent. :type input: str :param map: Gets or sets key-value pair containing other's field value and corresponding url value. - :type map: list of :class:`DependencyBinding ` + :type map: list of :class:`DependencyBinding ` """ _attribute_map = { @@ -470,7 +424,7 @@ class EndpointUrl(Model): Represents url of the service endpoint. :param depends_on: Gets or sets the dependency bindings. - :type depends_on: :class:`DependsOn ` + :type depends_on: :class:`DependsOn ` :param display_name: Gets or sets the display name of service endpoint url. :type display_name: str :param format: Gets or sets the format of the url. @@ -505,7 +459,7 @@ def __init__(self, depends_on=None, display_name=None, format=None, help_text=No class GraphSubjectBase(Model): """ :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. :type descriptor: str :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. @@ -553,7 +507,7 @@ def __init__(self, text=None, url=None): class IdentityRef(GraphSubjectBase): """ :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. :type descriptor: str :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. @@ -636,11 +590,11 @@ class InputDescriptor(Model): :param use_in_default_description: Gets whether this input is included in the default generated action description. :type use_in_default_description: bool :param validation: Information to use to validate this input's value - :type validation: :class:`InputValidation ` + :type validation: :class:`InputValidation ` :param value_hint: A hint for input value. It can be used in the UI as the input placeholder. :type value_hint: str :param values: Information about possible values for this input - :type values: :class:`InputValues ` + :type values: :class:`InputValues ` """ _attribute_map = { @@ -682,7 +636,7 @@ class InputValidation(Model): """ Describes what values are valid for a subscription input - :param data_type: Gets or sets the data data type to validate. + :param data_type: Gets or sets the data type to validate. :type data_type: object :param is_required: Gets or sets if this is a required field. :type is_required: bool @@ -755,7 +709,7 @@ class InputValues(Model): :param default_value: The default value to use for this input :type default_value: str :param error: Errors encountered while computing dynamic values. - :type error: :class:`InputValuesError ` + :type error: :class:`InputValuesError ` :param input_id: The id of the input :type input_id: str :param is_disabled: Should this input be disabled @@ -765,7 +719,7 @@ class InputValues(Model): :param is_read_only: Should this input be made read-only :type is_read_only: bool :param possible_values: Possible values that this input can take - :type possible_values: list of :class:`InputValue ` + :type possible_values: list of :class:`InputValue ` """ _attribute_map = { @@ -813,7 +767,7 @@ class OAuthConfiguration(Model): :param client_secret: Gets or sets the ClientSecret :type client_secret: str :param created_by: Gets or sets the identity who created the config. - :type created_by: :class:`IdentityRef ` + :type created_by: :class:`IdentityRef ` :param created_on: Gets or sets the time when config was created. :type created_on: datetime :param endpoint_type: Gets or sets the type of the endpoint. @@ -821,7 +775,7 @@ class OAuthConfiguration(Model): :param id: Gets or sets the unique identifier of this field :type id: str :param modified_by: Gets or sets the identity who modified the config. - :type modified_by: :class:`IdentityRef ` + :type modified_by: :class:`IdentityRef ` :param modified_on: Gets or sets the time when variable group was modified :type modified_on: datetime :param name: Gets or sets the name @@ -979,11 +933,11 @@ class ServiceEndpoint(Model): Represents an endpoint which may be used by an orchestration job. :param administrators_group: This is a deprecated field. - :type administrators_group: :class:`IdentityRef ` + :type administrators_group: :class:`IdentityRef ` :param authorization: Gets or sets the authorization data for talking to the endpoint. - :type authorization: :class:`EndpointAuthorization ` + :type authorization: :class:`EndpointAuthorization ` :param created_by: Gets or sets the identity reference for the user who created the Service endpoint. - :type created_by: :class:`IdentityRef ` + :type created_by: :class:`IdentityRef ` :param data: :type data: dict :param description: Gets or sets the description of endpoint. @@ -992,6 +946,8 @@ class ServiceEndpoint(Model): :type group_scope_id: str :param id: Gets or sets the identifier of this endpoint. :type id: str + :param is_outdated: Indicates whether service endpoint is outdated or not. + :type is_outdated: bool :param is_ready: EndPoint state indicator :type is_ready: bool :param is_shared: Indicates whether service endpoint is shared with other projects or not. @@ -999,13 +955,13 @@ class ServiceEndpoint(Model): :param name: Gets or sets the friendly name of the endpoint. :type name: str :param operation_status: Error message during creation/deletion of endpoint - :type operation_status: :class:`object ` + :type operation_status: :class:`object ` :param owner: Owner of the endpoint Supported values are "library", "agentcloud" :type owner: str :param readers_group: Gets or sets the identity reference for the readers group of the service endpoint. - :type readers_group: :class:`IdentityRef ` + :type readers_group: :class:`IdentityRef ` :param service_endpoint_project_references: All other project references where the service endpoint is shared. - :type service_endpoint_project_references: list of :class:`ServiceEndpointProjectReference ` + :type service_endpoint_project_references: list of :class:`ServiceEndpointProjectReference ` :param type: Gets or sets the type of the endpoint. :type type: str :param url: Gets or sets the url of the endpoint. @@ -1020,6 +976,7 @@ class ServiceEndpoint(Model): 'description': {'key': 'description', 'type': 'str'}, 'group_scope_id': {'key': 'groupScopeId', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, + 'is_outdated': {'key': 'isOutdated', 'type': 'bool'}, 'is_ready': {'key': 'isReady', 'type': 'bool'}, 'is_shared': {'key': 'isShared', 'type': 'bool'}, 'name': {'key': 'name', 'type': 'str'}, @@ -1031,7 +988,7 @@ class ServiceEndpoint(Model): 'url': {'key': 'url', 'type': 'str'} } - def __init__(self, administrators_group=None, authorization=None, created_by=None, data=None, description=None, group_scope_id=None, id=None, is_ready=None, is_shared=None, name=None, operation_status=None, owner=None, readers_group=None, service_endpoint_project_references=None, type=None, url=None): + def __init__(self, administrators_group=None, authorization=None, created_by=None, data=None, description=None, group_scope_id=None, id=None, is_outdated=None, is_ready=None, is_shared=None, name=None, operation_status=None, owner=None, readers_group=None, service_endpoint_project_references=None, type=None, url=None): super(ServiceEndpoint, self).__init__() self.administrators_group = administrators_group self.authorization = authorization @@ -1040,6 +997,7 @@ def __init__(self, administrators_group=None, authorization=None, created_by=Non self.description = description self.group_scope_id = group_scope_id self.id = id + self.is_outdated = is_outdated self.is_ready = is_ready self.is_shared = is_shared self.name = name @@ -1056,17 +1014,17 @@ class ServiceEndpointAuthenticationScheme(Model): Represents the authentication scheme used to authenticate the endpoint. :param authorization_headers: Gets or sets the authorization headers of service endpoint authentication scheme. - :type authorization_headers: list of :class:`AuthorizationHeader ` + :type authorization_headers: list of :class:`AuthorizationHeader ` :param authorization_url: Gets or sets the Authorization url required to authenticate using OAuth2 :type authorization_url: str :param client_certificates: Gets or sets the certificates of service endpoint authentication scheme. - :type client_certificates: list of :class:`ClientCertificate ` + :type client_certificates: list of :class:`ClientCertificate ` :param data_source_bindings: Gets or sets the data source bindings of the endpoint. - :type data_source_bindings: list of :class:`DataSourceBinding ` + :type data_source_bindings: list of :class:`DataSourceBinding ` :param display_name: Gets or sets the display name for the service endpoint authentication scheme. :type display_name: str :param input_descriptors: Gets or sets the input descriptors for the service endpoint authentication scheme. - :type input_descriptors: list of :class:`InputDescriptor ` + :type input_descriptors: list of :class:`InputDescriptor ` :param properties: Gets or sets the properties of service endpoint authentication scheme. :type properties: dict :param requires_oAuth2_configuration: Gets or sets whether this auth scheme requires OAuth2 configuration or not. @@ -1105,7 +1063,7 @@ class ServiceEndpointDetails(Model): Represents details of the service endpoint. :param authorization: Gets or sets the authorization of service endpoint. - :type authorization: :class:`EndpointAuthorization ` + :type authorization: :class:`EndpointAuthorization ` :param data: Gets or sets the data of service endpoint. :type data: dict :param type: Gets or sets the type of service endpoint. @@ -1134,13 +1092,15 @@ class ServiceEndpointExecutionData(Model): Represents service endpoint execution data. :param definition: Gets the definition of service endpoint execution owner. - :type definition: :class:`ServiceEndpointExecutionOwner ` + :type definition: :class:`ServiceEndpointExecutionOwner ` :param finish_time: Gets the finish time of service endpoint execution. :type finish_time: datetime :param id: Gets the Id of service endpoint execution data. :type id: long :param owner: Gets the owner of service endpoint execution data. - :type owner: :class:`ServiceEndpointExecutionOwner ` + :type owner: :class:`ServiceEndpointExecutionOwner ` + :param owner_details: Gets the additional details about the instance that used the service endpoint. + :type owner_details: str :param plan_type: Gets the plan type of service endpoint execution data. :type plan_type: str :param result: Gets the result of service endpoint execution. @@ -1154,17 +1114,19 @@ class ServiceEndpointExecutionData(Model): 'finish_time': {'key': 'finishTime', 'type': 'iso-8601'}, 'id': {'key': 'id', 'type': 'long'}, 'owner': {'key': 'owner', 'type': 'ServiceEndpointExecutionOwner'}, + 'owner_details': {'key': 'ownerDetails', 'type': 'str'}, 'plan_type': {'key': 'planType', 'type': 'str'}, 'result': {'key': 'result', 'type': 'object'}, 'start_time': {'key': 'startTime', 'type': 'iso-8601'} } - def __init__(self, definition=None, finish_time=None, id=None, owner=None, plan_type=None, result=None, start_time=None): + def __init__(self, definition=None, finish_time=None, id=None, owner=None, owner_details=None, plan_type=None, result=None, start_time=None): super(ServiceEndpointExecutionData, self).__init__() self.definition = definition self.finish_time = finish_time self.id = id self.owner = owner + self.owner_details = owner_details self.plan_type = plan_type self.result = result self.start_time = start_time @@ -1175,7 +1137,7 @@ class ServiceEndpointExecutionOwner(Model): Represents execution owner of the service endpoint. :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param id: Gets or sets the Id of service endpoint execution owner. :type id: int :param name: Gets or sets the name of service endpoint execution owner. @@ -1200,7 +1162,7 @@ class ServiceEndpointExecutionRecord(Model): Represents the details of service endpoint execution. :param data: Gets the execution data of service endpoint execution. - :type data: :class:`ServiceEndpointExecutionData ` + :type data: :class:`ServiceEndpointExecutionData ` :param endpoint_id: Gets the Id of service endpoint. :type endpoint_id: str """ @@ -1219,7 +1181,7 @@ def __init__(self, data=None, endpoint_id=None): class ServiceEndpointExecutionRecordsInput(Model): """ :param data: - :type data: :class:`ServiceEndpointExecutionData ` + :type data: :class:`ServiceEndpointExecutionData ` :param endpoint_ids: :type endpoint_ids: list of str """ @@ -1242,7 +1204,7 @@ class ServiceEndpointProjectReference(Model): :param name: Gets or sets name of the service endpoint. :type name: str :param project_reference: Gets or sets project reference of the service endpoint. - :type project_reference: :class:`ProjectReference ` + :type project_reference: :class:`ProjectReference ` """ _attribute_map = { @@ -1261,11 +1223,11 @@ def __init__(self, description=None, name=None, project_reference=None): class ServiceEndpointRequest(Model): """ :param data_source_details: Gets or sets the data source details for the service endpoint request. - :type data_source_details: :class:`DataSourceDetails ` + :type data_source_details: :class:`DataSourceDetails ` :param result_transformation_details: Gets or sets the result transformation details for the service endpoint request. - :type result_transformation_details: :class:`ResultTransformationDetails ` + :type result_transformation_details: :class:`ResultTransformationDetails ` :param service_endpoint_details: Gets or sets the service endpoint details for the service endpoint request. - :type service_endpoint_details: :class:`ServiceEndpointDetails ` + :type service_endpoint_details: :class:`ServiceEndpointDetails ` """ _attribute_map = { @@ -1285,6 +1247,8 @@ class ServiceEndpointRequestResult(Model): """ Represents result of the service endpoint request. + :param activity_id: Gets or sets the activity id of the service endpoint request result. + :type activity_id: str :param callback_context_parameters: Gets or sets the parameters used to make subsequent calls to the data source :type callback_context_parameters: dict :param callback_required: Gets or sets the flat that decides if another call to the data source is to be made @@ -1292,12 +1256,13 @@ class ServiceEndpointRequestResult(Model): :param error_message: Gets or sets the error message of the service endpoint request result. :type error_message: str :param result: Gets or sets the result of service endpoint request. - :type result: :class:`object ` + :type result: :class:`object ` :param status_code: Gets or sets the status code of the service endpoint request result. :type status_code: object """ _attribute_map = { + 'activity_id': {'key': 'activityId', 'type': 'str'}, 'callback_context_parameters': {'key': 'callbackContextParameters', 'type': '{str}'}, 'callback_required': {'key': 'callbackRequired', 'type': 'bool'}, 'error_message': {'key': 'errorMessage', 'type': 'str'}, @@ -1305,8 +1270,9 @@ class ServiceEndpointRequestResult(Model): 'status_code': {'key': 'statusCode', 'type': 'object'} } - def __init__(self, callback_context_parameters=None, callback_required=None, error_message=None, result=None, status_code=None): + def __init__(self, activity_id=None, callback_context_parameters=None, callback_required=None, error_message=None, result=None, status_code=None): super(ServiceEndpointRequestResult, self).__init__() + self.activity_id = activity_id self.callback_context_parameters = callback_context_parameters self.callback_required = callback_required self.error_message = error_message @@ -1319,25 +1285,25 @@ class ServiceEndpointType(Model): Represents type of the service endpoint. :param authentication_schemes: Authentication scheme of service endpoint type. - :type authentication_schemes: list of :class:`ServiceEndpointAuthenticationScheme ` + :type authentication_schemes: list of :class:`ServiceEndpointAuthenticationScheme ` :param data_sources: Data sources of service endpoint type. - :type data_sources: list of :class:`DataSource ` + :type data_sources: list of :class:`DataSource ` :param dependency_data: Dependency data of service endpoint type. - :type dependency_data: list of :class:`DependencyData ` + :type dependency_data: list of :class:`DependencyData ` :param description: Gets or sets the description of service endpoint type. :type description: str :param display_name: Gets or sets the display name of service endpoint type. :type display_name: str :param endpoint_url: Gets or sets the endpoint url of service endpoint type. - :type endpoint_url: :class:`EndpointUrl ` + :type endpoint_url: :class:`EndpointUrl ` :param help_link: Gets or sets the help link of service endpoint type. - :type help_link: :class:`HelpLink ` + :type help_link: :class:`HelpLink ` :param help_mark_down: Gets or sets the help text shown at the endpoint create dialog. :type help_mark_down: str :param icon_url: Gets or sets the icon url of service endpoint type. :type icon_url: str :param input_descriptors: Input descriptor of service endpoint type. - :type input_descriptors: list of :class:`InputDescriptor ` + :type input_descriptors: list of :class:`InputDescriptor ` :param name: Gets or sets the name of service endpoint type. :type name: str :param trusted_hosts: Trusted hosts of a service endpoint type. @@ -1394,7 +1360,7 @@ class DataSourceBinding(DataSourceBindingBase): :param endpoint_url: Gets or sets the url of the service endpoint. :type endpoint_url: str :param headers: Gets or sets the authorization headers. - :type headers: list of :class:`AuthorizationHeader ` + :type headers: list of :class:`AuthorizationHeader ` :param initial_context_template: Defines the initial value of the query params :type initial_context_template: str :param parameters: Gets or sets the parameters for the data source. @@ -1432,8 +1398,6 @@ def __init__(self, callback_context_template=None, callback_required_template=No __all__ = [ - 'AadOauthTokenRequest', - 'AadOauthTokenResult', 'AuthenticationSchemeReference', 'AuthorizationHeader', 'AzureManagementGroup', diff --git a/azure-devops/azure/devops/v7_0/service_endpoint/service_endpoint_client.py b/azure-devops/azure/devops/v7_2/service_endpoint/service_endpoint_client.py similarity index 87% rename from azure-devops/azure/devops/v7_0/service_endpoint/service_endpoint_client.py rename to azure-devops/azure/devops/v7_2/service_endpoint/service_endpoint_client.py index be42be76..d99437dd 100644 --- a/azure-devops/azure/devops/v7_0/service_endpoint/service_endpoint_client.py +++ b/azure-devops/azure/devops/v7_2/service_endpoint/service_endpoint_client.py @@ -27,11 +27,11 @@ def __init__(self, base_url=None, creds=None): def execute_service_endpoint_request(self, service_endpoint_request, project, endpoint_id): """ExecuteServiceEndpointRequest. - Proxy for a GET request defined by a service endpoint. - :param :class:` ` service_endpoint_request: Service endpoint request. + [Preview API] Proxy for a GET request defined by a service endpoint. + :param :class:` ` service_endpoint_request: Service endpoint request. :param str project: Project ID or project name :param str endpoint_id: Id of the service endpoint. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -42,7 +42,7 @@ def execute_service_endpoint_request(self, service_endpoint_request, project, en content = self._serialize.body(service_endpoint_request, 'ServiceEndpointRequest') response = self._send(http_method='POST', location_id='cc63bb57-2a5f-4a7a-b79c-c142d308657e', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters, content=content) @@ -50,20 +50,20 @@ def execute_service_endpoint_request(self, service_endpoint_request, project, en def create_service_endpoint(self, endpoint): """CreateServiceEndpoint. - Creates a new service endpoint - :param :class:` ` endpoint: Service endpoint to create - :rtype: :class:` ` + [Preview API] Creates a new service endpoint + :param :class:` ` endpoint: Service endpoint to create + :rtype: :class:` ` """ content = self._serialize.body(endpoint, 'ServiceEndpoint') response = self._send(http_method='POST', location_id='14e48fdc-2c8b-41ce-a0c3-e26f6cc55bd0', - version='7.0', + version='7.2-preview.4', content=content) return self._deserialize('ServiceEndpoint', response) def delete_service_endpoint(self, endpoint_id, project_ids, deep=None): """DeleteServiceEndpoint. - Delete a service endpoint + [Preview API] Delete a service endpoint :param str endpoint_id: Endpoint Id of endpoint to delete :param [str] project_ids: project Ids from which endpoint needs to be deleted :param bool deep: delete the spn created by endpoint @@ -79,13 +79,13 @@ def delete_service_endpoint(self, endpoint_id, project_ids, deep=None): query_parameters['deep'] = self._serialize.query('deep', deep, 'bool') self._send(http_method='DELETE', location_id='14e48fdc-2c8b-41ce-a0c3-e26f6cc55bd0', - version='7.0', + version='7.2-preview.4', route_values=route_values, query_parameters=query_parameters) def share_service_endpoint(self, endpoint_project_references, endpoint_id): """ShareServiceEndpoint. - Share service endpoint across projects + [Preview API] Share service endpoint across projects :param [ServiceEndpointProjectReference] endpoint_project_references: Project reference details of the target project :param str endpoint_id: Endpoint Id of the endpoint to share """ @@ -95,17 +95,17 @@ def share_service_endpoint(self, endpoint_project_references, endpoint_id): content = self._serialize.body(endpoint_project_references, '[ServiceEndpointProjectReference]') self._send(http_method='PATCH', location_id='14e48fdc-2c8b-41ce-a0c3-e26f6cc55bd0', - version='7.0', + version='7.2-preview.4', route_values=route_values, content=content) def update_service_endpoint(self, endpoint, endpoint_id, operation=None): """UpdateServiceEndpoint. - Update the service endpoint - :param :class:` ` endpoint: Updated data for the endpoint + [Preview API] Update the service endpoint + :param :class:` ` endpoint: Updated data for the endpoint :param str endpoint_id: Endpoint Id of the endpoint to update :param str operation: operation type - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if endpoint_id is not None: @@ -116,7 +116,7 @@ def update_service_endpoint(self, endpoint, endpoint_id, operation=None): content = self._serialize.body(endpoint, 'ServiceEndpoint') response = self._send(http_method='PUT', location_id='14e48fdc-2c8b-41ce-a0c3-e26f6cc55bd0', - version='7.0', + version='7.2-preview.4', route_values=route_values, query_parameters=query_parameters, content=content) @@ -124,24 +124,24 @@ def update_service_endpoint(self, endpoint, endpoint_id, operation=None): def update_service_endpoints(self, endpoints): """UpdateServiceEndpoints. - Update the service endpoints. + [Preview API] Update the service endpoints. :param [ServiceEndpoint] endpoints: Names of the service endpoints to update. :rtype: [ServiceEndpoint] """ content = self._serialize.body(endpoints, '[ServiceEndpoint]') response = self._send(http_method='PUT', location_id='14e48fdc-2c8b-41ce-a0c3-e26f6cc55bd0', - version='7.0', + version='7.2-preview.4', content=content) return self._deserialize('[ServiceEndpoint]', self._unwrap_collection(response)) def get_service_endpoint_details(self, project, endpoint_id, action_filter=None): """GetServiceEndpointDetails. - Get the service endpoint details. + [Preview API] Get the service endpoint details. :param str project: Project ID or project name :param str endpoint_id: Id of the service endpoint. :param str action_filter: Action filter for the service connection. It specifies the action which can be performed on the service connection. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -153,14 +153,14 @@ def get_service_endpoint_details(self, project, endpoint_id, action_filter=None) query_parameters['actionFilter'] = self._serialize.query('action_filter', action_filter, 'str') response = self._send(http_method='GET', location_id='e85f1c62-adfc-4b74-b618-11a150fb195e', - version='7.0', + version='7.2-preview.4', route_values=route_values, query_parameters=query_parameters) return self._deserialize('ServiceEndpoint', response) - def get_service_endpoints(self, project, type=None, auth_schemes=None, endpoint_ids=None, owner=None, include_failed=None, include_details=None): + def get_service_endpoints(self, project, type=None, auth_schemes=None, endpoint_ids=None, owner=None, include_failed=None, include_details=None, action_filter=None): """GetServiceEndpoints. - Get the service endpoints. + [Preview API] Get the service endpoints. :param str project: Project ID or project name :param str type: Type of the service endpoints. :param [str] auth_schemes: Authorization schemes used for service endpoints. @@ -168,6 +168,7 @@ def get_service_endpoints(self, project, type=None, auth_schemes=None, endpoint_ :param str owner: Owner for service endpoints. :param bool include_failed: Failed flag for service endpoints. :param bool include_details: Flag to include more details for service endpoints. This is for internal use only and the flag will be treated as false for all other requests + :param str action_filter: The "actionFilter" parameter allows users to evaluate requestor permissions and retrieve a list of endpoints that match the specified conditions, ensuring that only relevant endpoints are returned based on their permissions :rtype: [ServiceEndpoint] """ route_values = {} @@ -188,16 +189,18 @@ def get_service_endpoints(self, project, type=None, auth_schemes=None, endpoint_ query_parameters['includeFailed'] = self._serialize.query('include_failed', include_failed, 'bool') if include_details is not None: query_parameters['includeDetails'] = self._serialize.query('include_details', include_details, 'bool') + if action_filter is not None: + query_parameters['actionFilter'] = self._serialize.query('action_filter', action_filter, 'str') response = self._send(http_method='GET', location_id='e85f1c62-adfc-4b74-b618-11a150fb195e', - version='7.0', + version='7.2-preview.4', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[ServiceEndpoint]', self._unwrap_collection(response)) def get_service_endpoints_by_names(self, project, endpoint_names, type=None, auth_schemes=None, owner=None, include_failed=None, include_details=None): """GetServiceEndpointsByNames. - Get the service endpoints by name. + [Preview API] Get the service endpoints by name. :param str project: Project ID or project name :param [str] endpoint_names: Names of the service endpoints. :param str type: Type of the service endpoints. @@ -227,14 +230,14 @@ def get_service_endpoints_by_names(self, project, endpoint_names, type=None, aut query_parameters['includeDetails'] = self._serialize.query('include_details', include_details, 'bool') response = self._send(http_method='GET', location_id='e85f1c62-adfc-4b74-b618-11a150fb195e', - version='7.0', + version='7.2-preview.4', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[ServiceEndpoint]', self._unwrap_collection(response)) def get_service_endpoints_with_refreshed_authentication(self, refresh_authentication_parameters, project, endpoint_ids): """GetServiceEndpointsWithRefreshedAuthentication. - Gets the service endpoints and patch new authorization parameters + [Preview API] Gets the service endpoints and patch new authorization parameters :param [RefreshAuthenticationParameters] refresh_authentication_parameters: Scope, Validity of Token requested. :param str project: Project ID or project name :param [str] endpoint_ids: Ids of the service endpoints. @@ -250,7 +253,7 @@ def get_service_endpoints_with_refreshed_authentication(self, refresh_authentica content = self._serialize.body(refresh_authentication_parameters, '[RefreshAuthenticationParameters]') response = self._send(http_method='POST', location_id='e85f1c62-adfc-4b74-b618-11a150fb195e', - version='7.0', + version='7.2-preview.4', route_values=route_values, query_parameters=query_parameters, content=content) @@ -258,12 +261,12 @@ def get_service_endpoints_with_refreshed_authentication(self, refresh_authentica def get_service_endpoint_execution_records(self, project, endpoint_id, top=None, continuation_token=None): """GetServiceEndpointExecutionRecords. - Get service endpoint execution records. + [Preview API] Get service endpoint execution records. :param str project: Project ID or project name :param str endpoint_id: Id of the service endpoint. :param int top: Number of service endpoint execution records to get. :param long continuation_token: A continuation token, returned by a previous call to this method, that can be used to return the next set of records - :rtype: :class:`<[ServiceEndpointExecutionRecord]> ` + :rtype: :class:`<[ServiceEndpointExecutionRecord]> ` """ route_values = {} if project is not None: @@ -277,14 +280,14 @@ def get_service_endpoint_execution_records(self, project, endpoint_id, top=None, query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'long') response = self._send(http_method='GET', location_id='10a16738-9299-4cd1-9a81-fd23ad6200d0', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[ServiceEndpointExecutionRecord]', self._unwrap_collection(response)) def get_service_endpoint_types(self, type=None, scheme=None): """GetServiceEndpointTypes. - Get service endpoint types. + [Preview API] Get service endpoint types. :param str type: Type of service endpoint. :param str scheme: Scheme of service endpoint. :rtype: [ServiceEndpointType] @@ -296,7 +299,7 @@ def get_service_endpoint_types(self, type=None, scheme=None): query_parameters['scheme'] = self._serialize.query('scheme', scheme, 'str') response = self._send(http_method='GET', location_id='5a7938a4-655e-486c-b562-b78c54a7e87b', - version='7.0', + version='7.2-preview.1', query_parameters=query_parameters) return self._deserialize('[ServiceEndpointType]', self._unwrap_collection(response)) diff --git a/azure-devops/azure/devops/v7_0/service_hooks/__init__.py b/azure-devops/azure/devops/v7_2/service_hooks/__init__.py similarity index 100% rename from azure-devops/azure/devops/v7_0/service_hooks/__init__.py rename to azure-devops/azure/devops/v7_2/service_hooks/__init__.py diff --git a/azure-devops/azure/devops/v7_0/service_hooks/models.py b/azure-devops/azure/devops/v7_2/service_hooks/models.py similarity index 95% rename from azure-devops/azure/devops/v7_0/service_hooks/models.py rename to azure-devops/azure/devops/v7_2/service_hooks/models.py index 32f833c5..cfb23d33 100644 --- a/azure-devops/azure/devops/v7_0/service_hooks/models.py +++ b/azure-devops/azure/devops/v7_2/service_hooks/models.py @@ -14,15 +14,15 @@ class Consumer(Model): Defines the data contract of a consumer. :param _links: Reference Links - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param actions: Gets this consumer's actions. - :type actions: list of :class:`ConsumerAction ` + :type actions: list of :class:`ConsumerAction ` :param authentication_type: Gets or sets this consumer's authentication type. :type authentication_type: object :param description: Gets or sets this consumer's localized description. :type description: str :param external_configuration: Non-null only if subscriptions for this consumer are configured externally. - :type external_configuration: :class:`ExternalConfigurationDescriptor ` + :type external_configuration: :class:`ExternalConfigurationDescriptor ` :param id: Gets or sets this consumer's identifier. :type id: str :param image_url: Gets or sets this consumer's image URL, if any. @@ -30,7 +30,7 @@ class Consumer(Model): :param information_url: Gets or sets this consumer's information URL, if any. :type information_url: str :param input_descriptors: Gets or sets this consumer's input descriptors. - :type input_descriptors: list of :class:`InputDescriptor ` + :type input_descriptors: list of :class:`InputDescriptor ` :param name: Gets or sets this consumer's localized name. :type name: str :param url: The url for this resource @@ -71,7 +71,7 @@ class ConsumerAction(Model): Defines the data contract of a consumer action. :param _links: Reference Links - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param allow_resource_version_override: Gets or sets the flag indicating if resource version can be overridden when creating or editing a subscription. :type allow_resource_version_override: bool :param consumer_id: Gets or sets the identifier of the consumer to which this action belongs. @@ -81,7 +81,7 @@ class ConsumerAction(Model): :param id: Gets or sets this action's identifier. :type id: str :param input_descriptors: Gets or sets this action's input descriptors. - :type input_descriptors: list of :class:`InputDescriptor ` + :type input_descriptors: list of :class:`InputDescriptor ` :param name: Gets or sets this action's localized name. :type name: str :param supported_event_types: Gets or sets this action's supported event identifiers. @@ -126,13 +126,13 @@ class Event(Model): :param created_date: Gets or sets the UTC-based date and time that this event was created. :type created_date: datetime :param detailed_message: Gets or sets the detailed message associated with this event. - :type detailed_message: :class:`FormattedEventMessage ` + :type detailed_message: :class:`FormattedEventMessage ` :param event_type: Gets or sets the type of this event. :type event_type: str :param id: Gets or sets the unique identifier of this event. :type id: str :param message: Gets or sets the (brief) message associated with this event. - :type message: :class:`FormattedEventMessage ` + :type message: :class:`FormattedEventMessage ` :param publisher_id: Gets or sets the identifier of the publisher that raised this event. :type publisher_id: str :param resource: Gets or sets the data associated with this event. @@ -142,7 +142,7 @@ class Event(Model): :param resource_version: Gets or sets the version of the data associated with this event. :type resource_version: str :param session_token: Gets or sets the Session Token that can be used in further interactions - :type session_token: :class:`SessionToken ` + :type session_token: :class:`SessionToken ` """ _attribute_map = { @@ -181,7 +181,7 @@ class EventTypeDescriptor(Model): :param id: A unique id for the event type :type id: str :param input_descriptors: Event-specific inputs - :type input_descriptors: list of :class:`InputDescriptor ` + :type input_descriptors: list of :class:`InputDescriptor ` :param name: A localized friendly name for the event type :type name: str :param publisher_id: A unique id for the publisher of this event type @@ -266,7 +266,7 @@ def __init__(self, html=None, markdown=None, text=None): class GraphSubjectBase(Model): """ :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. :type descriptor: str :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. @@ -293,7 +293,7 @@ def __init__(self, _links=None, descriptor=None, display_name=None, url=None): class IdentityRef(GraphSubjectBase): """ :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. :type descriptor: str :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. @@ -376,11 +376,11 @@ class InputDescriptor(Model): :param use_in_default_description: Gets whether this input is included in the default generated action description. :type use_in_default_description: bool :param validation: Information to use to validate this input's value - :type validation: :class:`InputValidation ` + :type validation: :class:`InputValidation ` :param value_hint: A hint for input value. It can be used in the UI as the input placeholder. :type value_hint: str :param values: Information about possible values for this input - :type values: :class:`InputValues ` + :type values: :class:`InputValues ` """ _attribute_map = { @@ -423,7 +423,7 @@ class InputFilter(Model): Defines a filter for subscription inputs. The filter matches a set of inputs if any (one or more) of the groups evaluates to true. :param conditions: Groups of input filter expressions. This filter matches a set of inputs if any (one or more) of the groups evaluates to true. - :type conditions: list of :class:`InputFilterCondition ` + :type conditions: list of :class:`InputFilterCondition ` """ _attribute_map = { @@ -468,7 +468,7 @@ class InputValidation(Model): """ Describes what values are valid for a subscription input - :param data_type: Gets or sets the data data type to validate. + :param data_type: Gets or sets the data type to validate. :type data_type: object :param is_required: Gets or sets if this is a required field. :type is_required: bool @@ -541,7 +541,7 @@ class InputValues(Model): :param default_value: The default value to use for this input :type default_value: str :param error: Errors encountered while computing dynamic values. - :type error: :class:`InputValuesError ` + :type error: :class:`InputValuesError ` :param input_id: The id of the input :type input_id: str :param is_disabled: Should this input be disabled @@ -551,7 +551,7 @@ class InputValues(Model): :param is_read_only: Should this input be made read-only :type is_read_only: bool :param possible_values: Possible values that this input can take - :type possible_values: list of :class:`InputValue ` + :type possible_values: list of :class:`InputValue ` """ _attribute_map = { @@ -597,7 +597,7 @@ class InputValuesQuery(Model): :param current_values: :type current_values: dict :param input_values: The input values to return on input, and the result from the consumer on output. - :type input_values: list of :class:`InputValues ` + :type input_values: list of :class:`InputValues ` :param resource: Subscription containing information about the publisher/consumer and the current input values :type resource: object """ @@ -622,7 +622,7 @@ class Notification(Model): :param created_date: Gets or sets date and time that this result was created. :type created_date: datetime :param details: Details about this notification (if available) - :type details: :class:`NotificationDetails ` + :type details: :class:`NotificationDetails ` :param event_id: The event id associated with this notification :type event_id: str :param id: The notification id @@ -683,7 +683,7 @@ class NotificationDetails(Model): :param error_message: Gets or sets this notification detail's error message. :type error_message: str :param event: Gets or sets this notification detail's event content. - :type event: :class:`Event ` + :type event: :class:`Event ` :param event_type: Gets or sets this notification detail's event type. :type event_type: str :param processed_date: Gets or sets the time that this notification was finished processing (just before the request is sent to the consumer) @@ -771,7 +771,7 @@ class NotificationsQuery(Model): Defines a query for service hook notifications. :param associated_subscriptions: The subscriptions associated with the notifications returned from the query - :type associated_subscriptions: list of :class:`Subscription ` + :type associated_subscriptions: list of :class:`Subscription ` :param include_details: If true, we will return all notification history for the query provided; otherwise, the summary is returned. :type include_details: bool :param max_created_date: Optional maximum date at which the notification was created @@ -785,7 +785,7 @@ class NotificationsQuery(Model): :param publisher_id: Optional publisher id to restrict the results to :type publisher_id: str :param results: Results from the query - :type results: list of :class:`Notification ` + :type results: list of :class:`Notification ` :param result_type: Optional notification result type to filter results to :type result_type: object :param status: Optional notification status to filter results to @@ -793,7 +793,7 @@ class NotificationsQuery(Model): :param subscription_ids: Optional list of subscription ids to restrict the results to :type subscription_ids: list of str :param summary: Summary of notifications - the count of each result type (success, fail, ..). - :type summary: list of :class:`NotificationSummary ` + :type summary: list of :class:`NotificationSummary ` """ _attribute_map = { @@ -832,7 +832,7 @@ class NotificationSummary(Model): Summary of the notifications for a subscription. :param results: The notification results for this particular subscription. - :type results: list of :class:`NotificationResultsSummaryDetail ` + :type results: list of :class:`NotificationResultsSummaryDetail ` :param subscription_id: The subscription id associated with this notification :type subscription_id: str """ @@ -853,19 +853,19 @@ class Publisher(Model): Defines the data contract of an event publisher. :param _links: Reference Links - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param description: Gets this publisher's localized description. :type description: str :param id: Gets this publisher's identifier. :type id: str :param input_descriptors: Publisher-specific inputs - :type input_descriptors: list of :class:`InputDescriptor ` + :type input_descriptors: list of :class:`InputDescriptor ` :param name: Gets this publisher's localized name. :type name: str :param service_instance_type: The service instance type of the first party publisher. :type service_instance_type: str :param supported_events: Gets this publisher's supported event types. - :type supported_events: list of :class:`EventTypeDescriptor ` + :type supported_events: list of :class:`EventTypeDescriptor ` :param url: The url for this resource :type url: str """ @@ -900,17 +900,17 @@ class PublisherEvent(Model): :param diagnostics: Add key/value pairs which will be stored with a published notification in the SH service DB. This key/value pairs are for diagnostic purposes only and will have not effect on the delivery of a notification. :type diagnostics: dict :param event: The event being published - :type event: :class:`Event ` + :type event: :class:`Event ` :param is_filtered_event: Gets or sets flag for filtered events :type is_filtered_event: bool :param notification_data: Additional data that needs to be sent as part of notification to complement the Resource data in the Event :type notification_data: dict :param other_resource_versions: Gets or sets the array of older supported resource versions. - :type other_resource_versions: list of :class:`VersionedResource ` + :type other_resource_versions: list of :class:`VersionedResource ` :param publisher_input_filters: Optional publisher-input filters which restricts the set of subscriptions which are triggered by the event - :type publisher_input_filters: list of :class:`InputFilter ` + :type publisher_input_filters: list of :class:`InputFilter ` :param subscription: Gets or sets matched hooks subscription which caused this event. - :type subscription: :class:`Subscription ` + :type subscription: :class:`Subscription ` """ _attribute_map = { @@ -943,7 +943,7 @@ class PublishersQuery(Model): :param publisher_inputs: Filter for publisher inputs :type publisher_inputs: dict :param results: Results from the query - :type results: list of :class:`Publisher ` + :type results: list of :class:`Publisher ` """ _attribute_map = { @@ -1035,7 +1035,7 @@ class Subscription(Model): Encapsulates an event subscription. :param _links: Reference Links - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param action_description: :type action_description: str :param consumer_action_id: @@ -1045,7 +1045,7 @@ class Subscription(Model): :param consumer_inputs: Consumer input values :type consumer_inputs: dict :param created_by: - :type created_by: :class:`IdentityRef ` + :type created_by: :class:`IdentityRef ` :param created_date: :type created_date: datetime :param event_description: @@ -1057,7 +1057,7 @@ class Subscription(Model): :param last_probation_retry_date: :type last_probation_retry_date: datetime :param modified_by: - :type modified_by: :class:`IdentityRef ` + :type modified_by: :class:`IdentityRef ` :param modified_date: :type modified_date: datetime :param probation_retries: @@ -1071,7 +1071,7 @@ class Subscription(Model): :param status: :type status: object :param subscriber: - :type subscriber: :class:`IdentityRef ` + :type subscriber: :class:`IdentityRef ` :param url: :type url: str """ @@ -1128,11 +1128,11 @@ class SubscriptionDiagnostics(Model): Contains all the diagnostics settings for a subscription. :param delivery_results: Diagnostics settings for retaining delivery results. Used for Service Hooks subscriptions. - :type delivery_results: :class:`SubscriptionTracing ` + :type delivery_results: :class:`SubscriptionTracing ` :param delivery_tracing: Diagnostics settings for troubleshooting notification delivery. - :type delivery_tracing: :class:`SubscriptionTracing ` + :type delivery_tracing: :class:`SubscriptionTracing ` :param evaluation_tracing: Diagnostics settings for troubleshooting event matching. - :type evaluation_tracing: :class:`SubscriptionTracing ` + :type evaluation_tracing: :class:`SubscriptionTracing ` """ _attribute_map = { @@ -1153,11 +1153,11 @@ class SubscriptionInputValuesQuery(Model): Query for obtaining information about the possible/allowed values for one or more subscription inputs :param input_values: The input values to return on input, and the result from the consumer on output. - :type input_values: list of :class:`InputValues ` + :type input_values: list of :class:`InputValues ` :param scope: The scope at which the properties to query belong :type scope: object :param subscription: Subscription containing information about the publisher/consumer and the current input values - :type subscription: :class:`Subscription ` + :type subscription: :class:`Subscription ` """ _attribute_map = { @@ -1182,15 +1182,15 @@ class SubscriptionsQuery(Model): :param consumer_id: Optional consumer id to restrict the results to (null for any) :type consumer_id: str :param consumer_input_filters: Filter for subscription consumer inputs - :type consumer_input_filters: list of :class:`InputFilter ` + :type consumer_input_filters: list of :class:`InputFilter ` :param event_type: Optional event type id to restrict the results to (null for any) :type event_type: str :param publisher_id: Optional publisher id to restrict the results to (null for any) :type publisher_id: str :param publisher_input_filters: Filter for subscription publisher inputs - :type publisher_input_filters: list of :class:`InputFilter ` + :type publisher_input_filters: list of :class:`InputFilter ` :param results: Results from the query - :type results: list of :class:`Subscription ` + :type results: list of :class:`Subscription ` :param subscriber_id: Optional subscriber filter. :type subscriber_id: str """ @@ -1256,11 +1256,11 @@ class UpdateSubscripitonDiagnosticsParameters(Model): Parameters to update diagnostics settings for a subscription. :param delivery_results: Diagnostics settings for retaining delivery results. Used for Service Hooks subscriptions. - :type delivery_results: :class:`UpdateSubscripitonTracingParameters ` + :type delivery_results: :class:`UpdateSubscripitonTracingParameters ` :param delivery_tracing: Diagnostics settings for troubleshooting notification delivery. - :type delivery_tracing: :class:`UpdateSubscripitonTracingParameters ` + :type delivery_tracing: :class:`UpdateSubscripitonTracingParameters ` :param evaluation_tracing: Diagnostics settings for troubleshooting event matching. - :type evaluation_tracing: :class:`UpdateSubscripitonTracingParameters ` + :type evaluation_tracing: :class:`UpdateSubscripitonTracingParameters ` """ _attribute_map = { diff --git a/azure-devops/azure/devops/v7_0/service_hooks/service_hooks_client.py b/azure-devops/azure/devops/v7_2/service_hooks/service_hooks_client.py similarity index 79% rename from azure-devops/azure/devops/v7_0/service_hooks/service_hooks_client.py rename to azure-devops/azure/devops/v7_2/service_hooks/service_hooks_client.py index 3e80b1b4..4fe95fe7 100644 --- a/azure-devops/azure/devops/v7_0/service_hooks/service_hooks_client.py +++ b/azure-devops/azure/devops/v7_2/service_hooks/service_hooks_client.py @@ -27,11 +27,11 @@ def __init__(self, base_url=None, creds=None): def get_consumer_action(self, consumer_id, consumer_action_id, publisher_id=None): """GetConsumerAction. - Get details about a specific consumer action. + [Preview API] Get details about a specific consumer action. :param str consumer_id: ID for a consumer. :param str consumer_action_id: ID for a consumerActionId. :param str publisher_id: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if consumer_id is not None: @@ -43,14 +43,14 @@ def get_consumer_action(self, consumer_id, consumer_action_id, publisher_id=None query_parameters['publisherId'] = self._serialize.query('publisher_id', publisher_id, 'str') response = self._send(http_method='GET', location_id='c3428e90-7a69-4194-8ed8-0f153185ee0d', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('ConsumerAction', response) def list_consumer_actions(self, consumer_id, publisher_id=None): """ListConsumerActions. - Get a list of consumer actions for a specific consumer. + [Preview API] Get a list of consumer actions for a specific consumer. :param str consumer_id: ID for a consumer. :param str publisher_id: :rtype: [ConsumerAction] @@ -63,17 +63,17 @@ def list_consumer_actions(self, consumer_id, publisher_id=None): query_parameters['publisherId'] = self._serialize.query('publisher_id', publisher_id, 'str') response = self._send(http_method='GET', location_id='c3428e90-7a69-4194-8ed8-0f153185ee0d', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[ConsumerAction]', self._unwrap_collection(response)) def get_consumer(self, consumer_id, publisher_id=None): """GetConsumer. - Get a specific consumer service. Optionally filter out consumer actions that do not support any event types for the specified publisher. + [Preview API] Get a specific consumer service. Optionally filter out consumer actions that do not support any event types for the specified publisher. :param str consumer_id: ID for a consumer. :param str publisher_id: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if consumer_id is not None: @@ -83,14 +83,14 @@ def get_consumer(self, consumer_id, publisher_id=None): query_parameters['publisherId'] = self._serialize.query('publisher_id', publisher_id, 'str') response = self._send(http_method='GET', location_id='4301c514-5f34-4f5d-a145-f0ea7b5b7d19', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('Consumer', response) def list_consumers(self, publisher_id=None): """ListConsumers. - Get a list of available service hook consumer services. Optionally filter by consumers that support at least one event type from the specific publisher. + [Preview API] Get a list of available service hook consumer services. Optionally filter by consumers that support at least one event type from the specific publisher. :param str publisher_id: :rtype: [Consumer] """ @@ -99,29 +99,31 @@ def list_consumers(self, publisher_id=None): query_parameters['publisherId'] = self._serialize.query('publisher_id', publisher_id, 'str') response = self._send(http_method='GET', location_id='4301c514-5f34-4f5d-a145-f0ea7b5b7d19', - version='7.0', + version='7.2-preview.1', query_parameters=query_parameters) return self._deserialize('[Consumer]', self._unwrap_collection(response)) def get_subscription_diagnostics(self, subscription_id): """GetSubscriptionDiagnostics. + [Preview API] :param str subscription_id: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if subscription_id is not None: route_values['subscriptionId'] = self._serialize.url('subscription_id', subscription_id, 'str') response = self._send(http_method='GET', location_id='3b36bcb5-02ad-43c6-bbfa-6dfc6f8e9d68', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('SubscriptionDiagnostics', response) def update_subscription_diagnostics(self, update_parameters, subscription_id): """UpdateSubscriptionDiagnostics. - :param :class:` ` update_parameters: + [Preview API] + :param :class:` ` update_parameters: :param str subscription_id: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if subscription_id is not None: @@ -129,17 +131,17 @@ def update_subscription_diagnostics(self, update_parameters, subscription_id): content = self._serialize.body(update_parameters, 'UpdateSubscripitonDiagnosticsParameters') response = self._send(http_method='PUT', location_id='3b36bcb5-02ad-43c6-bbfa-6dfc6f8e9d68', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('SubscriptionDiagnostics', response) def get_event_type(self, publisher_id, event_type_id): """GetEventType. - Get a specific event type. + [Preview API] Get a specific event type. :param str publisher_id: ID for a publisher. :param str event_type_id: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if publisher_id is not None: @@ -148,13 +150,13 @@ def get_event_type(self, publisher_id, event_type_id): route_values['eventTypeId'] = self._serialize.url('event_type_id', event_type_id, 'str') response = self._send(http_method='GET', location_id='db4777cd-8e08-4a84-8ba3-c974ea033718', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('EventTypeDescriptor', response) def list_event_types(self, publisher_id): """ListEventTypes. - Get the event types for a specific publisher. + [Preview API] Get the event types for a specific publisher. :param str publisher_id: ID for a publisher. :rtype: [EventTypeDescriptor] """ @@ -163,16 +165,16 @@ def list_event_types(self, publisher_id): route_values['publisherId'] = self._serialize.url('publisher_id', publisher_id, 'str') response = self._send(http_method='GET', location_id='db4777cd-8e08-4a84-8ba3-c974ea033718', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('[EventTypeDescriptor]', self._unwrap_collection(response)) def get_notification(self, subscription_id, notification_id): """GetNotification. - Get a specific notification for a subscription. + [Preview API] Get a specific notification for a subscription. :param str subscription_id: ID for a subscription. :param int notification_id: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if subscription_id is not None: @@ -181,13 +183,13 @@ def get_notification(self, subscription_id, notification_id): route_values['notificationId'] = self._serialize.url('notification_id', notification_id, 'int') response = self._send(http_method='GET', location_id='0c62d343-21b0-4732-997b-017fde84dc28', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('Notification', response) def get_notifications(self, subscription_id, max_results=None, status=None, result=None): """GetNotifications. - Get a list of notifications for a specific subscription. A notification includes details about the event, the request to and the response from the consumer service. + [Preview API] Get a list of notifications for a specific subscription. A notification includes details about the event, the request to and the response from the consumer service. :param str subscription_id: ID for a subscription. :param int max_results: Maximum number of notifications to return. Default is **100**. :param str status: Get only notifications with this status. @@ -206,29 +208,30 @@ def get_notifications(self, subscription_id, max_results=None, status=None, resu query_parameters['result'] = self._serialize.query('result', result, 'str') response = self._send(http_method='GET', location_id='0c62d343-21b0-4732-997b-017fde84dc28', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[Notification]', self._unwrap_collection(response)) def query_notifications(self, query): """QueryNotifications. - Query for notifications. A notification includes details about the event, the request to and the response from the consumer service. - :param :class:` ` query: - :rtype: :class:` ` + [Preview API] Query for notifications. A notification includes details about the event, the request to and the response from the consumer service. + :param :class:` ` query: + :rtype: :class:` ` """ content = self._serialize.body(query, 'NotificationsQuery') response = self._send(http_method='POST', location_id='1a57562f-160a-4b5c-9185-905e95b39d36', - version='7.0', + version='7.2-preview.1', content=content) return self._deserialize('NotificationsQuery', response) def query_input_values(self, input_values_query, publisher_id): """QueryInputValues. - :param :class:` ` input_values_query: + [Preview API] + :param :class:` ` input_values_query: :param str publisher_id: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if publisher_id is not None: @@ -236,65 +239,65 @@ def query_input_values(self, input_values_query, publisher_id): content = self._serialize.body(input_values_query, 'InputValuesQuery') response = self._send(http_method='POST', location_id='d815d352-a566-4dc1-a3e3-fd245acf688c', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('InputValuesQuery', response) def get_publisher(self, publisher_id): """GetPublisher. - Get a specific service hooks publisher. + [Preview API] Get a specific service hooks publisher. :param str publisher_id: ID for a publisher. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if publisher_id is not None: route_values['publisherId'] = self._serialize.url('publisher_id', publisher_id, 'str') response = self._send(http_method='GET', location_id='1e83a210-5b53-43bc-90f0-d476a4e5d731', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('Publisher', response) def list_publishers(self): """ListPublishers. - Get a list of publishers. + [Preview API] Get a list of publishers. :rtype: [Publisher] """ response = self._send(http_method='GET', location_id='1e83a210-5b53-43bc-90f0-d476a4e5d731', - version='7.0') + version='7.2-preview.1') return self._deserialize('[Publisher]', self._unwrap_collection(response)) def query_publishers(self, query): """QueryPublishers. - Query for service hook publishers. - :param :class:` ` query: - :rtype: :class:` ` + [Preview API] Query for service hook publishers. + :param :class:` ` query: + :rtype: :class:` ` """ content = self._serialize.body(query, 'PublishersQuery') response = self._send(http_method='POST', location_id='99b44a8a-65a8-4670-8f3e-e7f7842cce64', - version='7.0', + version='7.2-preview.1', content=content) return self._deserialize('PublishersQuery', response) def create_subscription(self, subscription): """CreateSubscription. - Create a subscription. - :param :class:` ` subscription: Subscription to be created. - :rtype: :class:` ` + [Preview API] Create a subscription. + :param :class:` ` subscription: Subscription to be created. + :rtype: :class:` ` """ content = self._serialize.body(subscription, 'Subscription') response = self._send(http_method='POST', location_id='fc50d02a-849f-41fb-8af1-0a5216103269', - version='7.0', + version='7.2-preview.1', content=content) return self._deserialize('Subscription', response) def delete_subscription(self, subscription_id): """DeleteSubscription. - Delete a specific service hooks subscription. + [Preview API] Delete a specific service hooks subscription. :param str subscription_id: ID for a subscription. """ route_values = {} @@ -302,27 +305,27 @@ def delete_subscription(self, subscription_id): route_values['subscriptionId'] = self._serialize.url('subscription_id', subscription_id, 'str') self._send(http_method='DELETE', location_id='fc50d02a-849f-41fb-8af1-0a5216103269', - version='7.0', + version='7.2-preview.1', route_values=route_values) def get_subscription(self, subscription_id): """GetSubscription. - Get a specific service hooks subscription. + [Preview API] Get a specific service hooks subscription. :param str subscription_id: ID for a subscription. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if subscription_id is not None: route_values['subscriptionId'] = self._serialize.url('subscription_id', subscription_id, 'str') response = self._send(http_method='GET', location_id='fc50d02a-849f-41fb-8af1-0a5216103269', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('Subscription', response) def list_subscriptions(self, publisher_id=None, event_type=None, consumer_id=None, consumer_action_id=None): """ListSubscriptions. - Get a list of subscriptions. + [Preview API] Get a list of subscriptions. :param str publisher_id: ID for a subscription. :param str event_type: The event type to filter on (if any). :param str consumer_id: ID for a consumer. @@ -340,16 +343,16 @@ def list_subscriptions(self, publisher_id=None, event_type=None, consumer_id=Non query_parameters['consumerActionId'] = self._serialize.query('consumer_action_id', consumer_action_id, 'str') response = self._send(http_method='GET', location_id='fc50d02a-849f-41fb-8af1-0a5216103269', - version='7.0', + version='7.2-preview.1', query_parameters=query_parameters) return self._deserialize('[Subscription]', self._unwrap_collection(response)) def replace_subscription(self, subscription, subscription_id=None): """ReplaceSubscription. - Update a subscription. ID for a subscription that you wish to update. - :param :class:` ` subscription: + [Preview API] Update a subscription. ID for a subscription that you wish to update. + :param :class:` ` subscription: :param str subscription_id: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if subscription_id is not None: @@ -357,30 +360,30 @@ def replace_subscription(self, subscription, subscription_id=None): content = self._serialize.body(subscription, 'Subscription') response = self._send(http_method='PUT', location_id='fc50d02a-849f-41fb-8af1-0a5216103269', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('Subscription', response) def create_subscriptions_query(self, query): """CreateSubscriptionsQuery. - Query for service hook subscriptions. - :param :class:` ` query: - :rtype: :class:` ` + [Preview API] Query for service hook subscriptions. + :param :class:` ` query: + :rtype: :class:` ` """ content = self._serialize.body(query, 'SubscriptionsQuery') response = self._send(http_method='POST', location_id='c7c3c1cf-9e05-4c0d-a425-a0f922c2c6ed', - version='7.0', + version='7.2-preview.1', content=content) return self._deserialize('SubscriptionsQuery', response) def create_test_notification(self, test_notification, use_real_data=None): """CreateTestNotification. - Sends a test notification. This is useful for verifying the configuration of an updated or new service hooks subscription. - :param :class:` ` test_notification: + [Preview API] Sends a test notification. This is useful for verifying the configuration of an updated or new service hooks subscription. + :param :class:` ` test_notification: :param bool use_real_data: Only allow testing with real data in existing subscriptions. - :rtype: :class:` ` + :rtype: :class:` ` """ query_parameters = {} if use_real_data is not None: @@ -388,7 +391,7 @@ def create_test_notification(self, test_notification, use_real_data=None): content = self._serialize.body(test_notification, 'Notification') response = self._send(http_method='POST', location_id='1139462c-7e27-4524-a997-31b9b73551fe', - version='7.0', + version='7.2-preview.1', query_parameters=query_parameters, content=content) return self._deserialize('Notification', response) diff --git a/azure-devops/azure/devops/v7_0/settings/__init__.py b/azure-devops/azure/devops/v7_2/settings/__init__.py similarity index 100% rename from azure-devops/azure/devops/v7_0/settings/__init__.py rename to azure-devops/azure/devops/v7_2/settings/__init__.py diff --git a/azure-devops/azure/devops/v7_0/settings/settings_client.py b/azure-devops/azure/devops/v7_2/settings/settings_client.py similarity index 96% rename from azure-devops/azure/devops/v7_0/settings/settings_client.py rename to azure-devops/azure/devops/v7_2/settings/settings_client.py index 9833c950..5d9b09c7 100644 --- a/azure-devops/azure/devops/v7_0/settings/settings_client.py +++ b/azure-devops/azure/devops/v7_2/settings/settings_client.py @@ -37,7 +37,7 @@ def get_entries(self, user_scope, key=None): route_values['key'] = self._serialize.url('key', key, 'str') response = self._send(http_method='GET', location_id='cd006711-163d-4cd4-a597-b05bad2556ff', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) return self._deserialize('{object}', self._unwrap_collection(response)) @@ -54,7 +54,7 @@ def remove_entries(self, user_scope, key): route_values['key'] = self._serialize.url('key', key, 'str') self._send(http_method='DELETE', location_id='cd006711-163d-4cd4-a597-b05bad2556ff', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) def set_entries(self, entries, user_scope): @@ -69,7 +69,7 @@ def set_entries(self, entries, user_scope): content = self._serialize.body(entries, '{object}') self._send(http_method='PATCH', location_id='cd006711-163d-4cd4-a597-b05bad2556ff', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, content=content) @@ -93,7 +93,7 @@ def get_entries_for_scope(self, user_scope, scope_name, scope_value, key=None): route_values['key'] = self._serialize.url('key', key, 'str') response = self._send(http_method='GET', location_id='4cbaafaf-e8af-4570-98d1-79ee99c56327', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) return self._deserialize('{object}', self._unwrap_collection(response)) @@ -116,7 +116,7 @@ def remove_entries_for_scope(self, user_scope, scope_name, scope_value, key): route_values['key'] = self._serialize.url('key', key, 'str') self._send(http_method='DELETE', location_id='4cbaafaf-e8af-4570-98d1-79ee99c56327', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) def set_entries_for_scope(self, entries, user_scope, scope_name, scope_value): @@ -137,7 +137,7 @@ def set_entries_for_scope(self, entries, user_scope, scope_name, scope_value): content = self._serialize.body(entries, '{object}') self._send(http_method='PATCH', location_id='4cbaafaf-e8af-4570-98d1-79ee99c56327', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, content=content) diff --git a/azure-devops/azure/devops/v7_0/symbol/__init__.py b/azure-devops/azure/devops/v7_2/symbol/__init__.py similarity index 100% rename from azure-devops/azure/devops/v7_0/symbol/__init__.py rename to azure-devops/azure/devops/v7_2/symbol/__init__.py diff --git a/azure-devops/azure/devops/v7_0/symbol/models.py b/azure-devops/azure/devops/v7_2/symbol/models.py similarity index 97% rename from azure-devops/azure/devops/v7_0/symbol/models.py rename to azure-devops/azure/devops/v7_2/symbol/models.py index d888f472..efb82553 100644 --- a/azure-devops/azure/devops/v7_0/symbol/models.py +++ b/azure-devops/azure/devops/v7_2/symbol/models.py @@ -16,7 +16,7 @@ class DebugEntryCreateBatch(Model): :param create_behavior: Defines what to do when a debug entry in the batch already exists. :type create_behavior: object :param debug_entries: The debug entries. - :type debug_entries: list of :class:`DebugEntry ` + :type debug_entries: list of :class:`DebugEntry ` :param proof_nodes: Serialized Proof nodes, used to verify uploads on server side for Chunk Dedup DebugEntry :type proof_nodes: list of str """ @@ -82,7 +82,7 @@ class JsonBlobIdentifierWithBlocks(Model): BlobIdentifier with block hashes formatted to be deserialzied for symbol service. :param block_hashes: List of blob block hashes. - :type block_hashes: list of :class:`JsonBlobBlockHash ` + :type block_hashes: list of :class:`JsonBlobBlockHash ` :param identifier_value: Array of blobId bytes. :type identifier_value: str """ @@ -144,15 +144,15 @@ class DebugEntry(ResourceBase): :param url: A URI which can be used to retrieve this item in its raw format. Optional. Note this is distinguished from other URIs that are present in a derived resource. :type url: str :param blob_details: Details of the blob formatted to be deserialized for symbol service. - :type blob_details: :class:`JsonBlobIdentifierWithBlocks ` + :type blob_details: :class:`JsonBlobIdentifierWithBlocks ` :param blob_identifier: A blob identifier of the symbol file to upload to this debug entry. This property is mostly used during creation of debug entry (a.k.a. symbol publishing) to allow the server to query the existence of the blob. - :type blob_identifier: :class:`JsonBlobIdentifier ` + :type blob_identifier: :class:`JsonBlobIdentifier ` :param blob_uri: The URI to get the symbol file. Provided by the server, the URI contains authentication information and is readily accessible by plain HTTP GET request. The client is recommended to retrieve the file as soon as it can since the URI will expire in a short period. :type blob_uri: str :param client_key: A key the client (debugger, for example) uses to find the debug entry. Note it is not unique for each different symbol file as it does not distinguish between those which only differ by information level. :type client_key: str :param domain_id: The Domain Id where this debugEntry lives. This property should not be null. - :type domain_id: :class:`IDomainId ` + :type domain_id: :class:`IDomainId ` :param information_level: The information level this debug entry contains. :type information_level: object :param request_id: The identifier of symbol request to which this debug entry belongs. @@ -210,7 +210,7 @@ class Request(ResourceBase): :param description: An optional human-facing description. :type description: str :param domain_id: The Domain Id where this request lives. This property should not be null. - :type domain_id: :class:`IDomainId ` + :type domain_id: :class:`IDomainId ` :param expiration_date: An optional expiration date for the request. The request will become inaccessible and get deleted after the date, regardless of its status. On an HTTP POST, if expiration date is null/missing, the server will assign a default expiration data (30 days unless overwridden in the registry at the account level). On PATCH, if expiration date is null/missing, the behavior is to not change whatever the request's current expiration date is. :type expiration_date: datetime :param is_chunked: Indicates if request should be chunk dedup diff --git a/azure-devops/azure/devops/v7_0/symbol/symbol_client.py b/azure-devops/azure/devops/v7_2/symbol/symbol_client.py similarity index 81% rename from azure-devops/azure/devops/v7_0/symbol/symbol_client.py rename to azure-devops/azure/devops/v7_2/symbol/symbol_client.py index 5ed632e9..a9fa1f16 100644 --- a/azure-devops/azure/devops/v7_0/symbol/symbol_client.py +++ b/azure-devops/azure/devops/v7_2/symbol/symbol_client.py @@ -27,15 +27,15 @@ def __init__(self, base_url=None, creds=None): def check_availability(self): """CheckAvailability. - Check the availability of symbol service. This includes checking for feature flag, and possibly license in future. Note this is NOT an anonymous endpoint, and the caller will be redirected to authentication before hitting it. + [Preview API] Check the availability of symbol service. This includes checking for feature flag, and possibly license in future. Note this is NOT an anonymous endpoint, and the caller will be redirected to authentication before hitting it. """ self._send(http_method='GET', location_id='97c893cc-e861-4ef4-8c43-9bad4a963dee', - version='7.0') + version='7.2-preview.1') def get_client(self, client_type): """GetClient. - Get the client package. + [Preview API] Get the client package. :param str client_type: Either "EXE" for a zip file containing a Windows symbol client (a.k.a. symbol.exe) along with dependencies, or "TASK" for a VSTS task that can be run on a VSTS build agent. All the other values are invalid. The parameter is case-insensitive. :rtype: object """ @@ -44,21 +44,21 @@ def get_client(self, client_type): route_values['clientType'] = self._serialize.url('client_type', client_type, 'str') response = self._send(http_method='GET', location_id='79c83865-4de3-460c-8a16-01be238e0818', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('object', response) def head_client(self): """HeadClient. - Get client version information. + [Preview API] Get client version information. """ self._send(http_method='HEAD', location_id='79c83865-4de3-460c-8a16-01be238e0818', - version='7.0') + version='7.2-preview.1') def get_debug_entry_content(self, request_id, debug_entry_id): """GetDebugEntryContent. - Get a stitched debug entry for a symbol request as specified by symbol request identifier and debug entry identifier. + [Preview API] Get a stitched debug entry for a symbol request as specified by symbol request identifier and debug entry identifier. :param str request_id: The symbol request identifier. :param str debug_entry_id: The debug entry identifier. """ @@ -69,26 +69,26 @@ def get_debug_entry_content(self, request_id, debug_entry_id): route_values['debugEntryId'] = self._serialize.url('debug_entry_id', debug_entry_id, 'str') self._send(http_method='GET', location_id='0f98d9f5-caf7-44fd-a5c9-55f3a9b34399', - version='7.0', + version='7.2-preview.1', route_values=route_values) def create_requests(self, request_to_create): """CreateRequests. - Create a new symbol request. - :param :class:` ` request_to_create: The symbol request to create. - :rtype: :class:` ` + [Preview API] Create a new symbol request. + :param :class:` ` request_to_create: The symbol request to create. + :rtype: :class:` ` """ content = self._serialize.body(request_to_create, 'Request') response = self._send(http_method='POST', location_id='ebc09fe3-1b20-4667-abc5-f2b60fe8de52', - version='7.0', + version='7.2-preview.1', content=content) return self._deserialize('Request', response) def create_requests_request_id_debug_entries(self, batch, request_id, collection): """CreateRequestsRequestIdDebugEntries. - Create debug entries for a symbol request as specified by its identifier. - :param :class:` ` batch: A batch that contains debug entries to create. + [Preview API] Create debug entries for a symbol request as specified by its identifier. + :param :class:` ` batch: A batch that contains debug entries to create. :param str request_id: The symbol request identifier. :param str collection: A valid debug entry collection name. Must be "debugentries". :rtype: [DebugEntry] @@ -102,7 +102,7 @@ def create_requests_request_id_debug_entries(self, batch, request_id, collection content = self._serialize.body(batch, 'DebugEntryCreateBatch') response = self._send(http_method='POST', location_id='ebc09fe3-1b20-4667-abc5-f2b60fe8de52', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters, content=content) @@ -110,8 +110,8 @@ def create_requests_request_id_debug_entries(self, batch, request_id, collection def create_requests_request_name_debug_entries(self, batch, request_name, collection): """CreateRequestsRequestNameDebugEntries. - Create debug entries for a symbol request as specified by its name. - :param :class:` ` batch: A batch that contains debug entries to create. + [Preview API] Create debug entries for a symbol request as specified by its name. + :param :class:` ` batch: A batch that contains debug entries to create. :param str request_name: The symbol request name. :param str collection: A valid debug entry collection name. Must be "debugentries". :rtype: [DebugEntry] @@ -124,14 +124,14 @@ def create_requests_request_name_debug_entries(self, batch, request_name, collec content = self._serialize.body(batch, 'DebugEntryCreateBatch') response = self._send(http_method='POST', location_id='ebc09fe3-1b20-4667-abc5-f2b60fe8de52', - version='7.0', + version='7.2-preview.1', query_parameters=query_parameters, content=content) return self._deserialize('[DebugEntry]', self._unwrap_collection(response)) def delete_requests_request_id(self, request_id, synchronous=None): """DeleteRequestsRequestId. - Delete a symbol request by request identifier. + [Preview API] Delete a symbol request by request identifier. :param str request_id: The symbol request identifier. :param bool synchronous: If true, delete all the debug entries under this request synchronously in the current session. If false, the deletion will be postponed to a later point and be executed automatically by the system. """ @@ -143,13 +143,13 @@ def delete_requests_request_id(self, request_id, synchronous=None): query_parameters['synchronous'] = self._serialize.query('synchronous', synchronous, 'bool') self._send(http_method='DELETE', location_id='ebc09fe3-1b20-4667-abc5-f2b60fe8de52', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) def delete_requests_request_name(self, request_name, synchronous=None): """DeleteRequestsRequestName. - Delete a symbol request by request name. + [Preview API] Delete a symbol request by request name. :param str request_name: The symbol request name. :param bool synchronous: If true, delete all the debug entries under this request synchronously in the current session. If false, the deletion will be postponed to a later point and be executed automatically by the system. """ @@ -160,45 +160,45 @@ def delete_requests_request_name(self, request_name, synchronous=None): query_parameters['synchronous'] = self._serialize.query('synchronous', synchronous, 'bool') self._send(http_method='DELETE', location_id='ebc09fe3-1b20-4667-abc5-f2b60fe8de52', - version='7.0', + version='7.2-preview.1', query_parameters=query_parameters) def get_requests_request_id(self, request_id): """GetRequestsRequestId. - Get a symbol request by request identifier. + [Preview API] Get a symbol request by request identifier. :param str request_id: The symbol request identifier. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if request_id is not None: route_values['requestId'] = self._serialize.url('request_id', request_id, 'str') response = self._send(http_method='GET', location_id='ebc09fe3-1b20-4667-abc5-f2b60fe8de52', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('Request', response) def get_requests_request_name(self, request_name): """GetRequestsRequestName. - Get a symbol request by request name. + [Preview API] Get a symbol request by request name. :param str request_name: The symbol request name. - :rtype: :class:` ` + :rtype: :class:` ` """ query_parameters = {} if request_name is not None: query_parameters['requestName'] = self._serialize.query('request_name', request_name, 'str') response = self._send(http_method='GET', location_id='ebc09fe3-1b20-4667-abc5-f2b60fe8de52', - version='7.0', + version='7.2-preview.1', query_parameters=query_parameters) return self._deserialize('Request', response) def update_requests_request_id(self, update_request, request_id): """UpdateRequestsRequestId. - Update a symbol request by request identifier. - :param :class:` ` update_request: The symbol request. + [Preview API] Update a symbol request by request identifier. + :param :class:` ` update_request: The symbol request. :param str request_id: The symbol request identifier. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if request_id is not None: @@ -206,17 +206,17 @@ def update_requests_request_id(self, update_request, request_id): content = self._serialize.body(update_request, 'Request') response = self._send(http_method='PATCH', location_id='ebc09fe3-1b20-4667-abc5-f2b60fe8de52', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('Request', response) def update_requests_request_name(self, update_request, request_name): """UpdateRequestsRequestName. - Update a symbol request by request name. - :param :class:` ` update_request: The symbol request. + [Preview API] Update a symbol request by request name. + :param :class:` ` update_request: The symbol request. :param str request_name: The symbol request name. - :rtype: :class:` ` + :rtype: :class:` ` """ query_parameters = {} if request_name is not None: @@ -224,14 +224,14 @@ def update_requests_request_name(self, update_request, request_name): content = self._serialize.body(update_request, 'Request') response = self._send(http_method='PATCH', location_id='ebc09fe3-1b20-4667-abc5-f2b60fe8de52', - version='7.0', + version='7.2-preview.1', query_parameters=query_parameters, content=content) return self._deserialize('Request', response) def get_sym_srv_debug_entry_client_key(self, debug_entry_client_key): """GetSymSrvDebugEntryClientKey. - Given a client key, returns the best matched debug entry. + [Preview API] Given a client key, returns the best matched debug entry. :param str debug_entry_client_key: A "client key" used by both ends of Microsoft's symbol protocol to identify a debug entry. The semantics of client key is governed by symsrv and is beyond the scope of this documentation. """ route_values = {} @@ -239,6 +239,6 @@ def get_sym_srv_debug_entry_client_key(self, debug_entry_client_key): route_values['debugEntryClientKey'] = self._serialize.url('debug_entry_client_key', debug_entry_client_key, 'str') self._send(http_method='GET', location_id='9648e256-c9f9-4f16-8a27-630b06396942', - version='7.0', + version='7.2-preview.1', route_values=route_values) diff --git a/azure-devops/azure/devops/v7_0/task/__init__.py b/azure-devops/azure/devops/v7_2/task/__init__.py similarity index 97% rename from azure-devops/azure/devops/v7_0/task/__init__.py rename to azure-devops/azure/devops/v7_2/task/__init__.py index 42230cd0..f2bc29d5 100644 --- a/azure-devops/azure/devops/v7_0/task/__init__.py +++ b/azure-devops/azure/devops/v7_2/task/__init__.py @@ -11,6 +11,7 @@ __all__ = [ 'Issue', + 'JobEvent', 'JobOption', 'MaskHint', 'PlanEnvironment', @@ -21,6 +22,7 @@ 'TaskAgentJobTask', 'TaskAgentJobVariable', 'TaskAttachment', + 'TaskHubOidcToken', 'TaskLog', 'TaskLogReference', 'TaskOrchestrationContainer', diff --git a/azure-devops/azure/devops/v7_0/task/models.py b/azure-devops/azure/devops/v7_2/task/models.py similarity index 79% rename from azure-devops/azure/devops/v7_0/task/models.py rename to azure-devops/azure/devops/v7_2/task/models.py index 95ebbc1a..742b2a06 100644 --- a/azure-devops/azure/devops/v7_0/task/models.py +++ b/azure-devops/azure/devops/v7_2/task/models.py @@ -11,13 +11,15 @@ class Issue(Model): """ - :param category: + An issue (error, warning) associated with a pipeline run. + + :param category: The category of the issue.
Example: Code - refers to compilation errors
Example: General - refers to generic errors :type category: str - :param data: + :param data: A dictionary containing details about the issue. :type data: dict - :param message: + :param message: A description of issue. :type message: str - :param type: + :param type: The type (error, warning) of the issue. :type type: object """ @@ -36,6 +38,27 @@ def __init__(self, category=None, data=None, message=None, type=None): self.type = type +class JobEvent(Model): + """ + A pipeline job event to be processed by the execution plan. + + :param job_id: The ID of the pipeline job affected by the event. + :type job_id: str + :param name: The name of the pipeline job event. + :type name: str + """ + + _attribute_map = { + 'job_id': {'key': 'jobId', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, job_id=None, name=None): + super(JobEvent, self).__init__() + self.job_id = job_id + self.name = name + + class JobOption(Model): """ Represents an option that may affect the way an agent runs the job. @@ -79,7 +102,7 @@ def __init__(self, type=None, value=None): class PlanEnvironment(Model): """ :param mask: - :type mask: list of :class:`MaskHint ` + :type mask: list of :class:`MaskHint ` :param options: :type options: dict :param variables: @@ -146,9 +169,9 @@ class TaskAgentJob(Model): :param sidecar_containers: :type sidecar_containers: dict :param steps: - :type steps: list of :class:`TaskAgentJobStep ` + :type steps: list of :class:`TaskAgentJobStep ` :param variables: - :type variables: list of :class:`TaskAgentJobVariable ` + :type variables: list of :class:`TaskAgentJobVariable ` """ _attribute_map = { @@ -189,7 +212,7 @@ class TaskAgentJobStep(Model): :param retry_count_on_task_failure: :type retry_count_on_task_failure: int :param task: - :type task: :class:`TaskAgentJobTask ` + :type task: :class:`TaskAgentJobTask ` :param timeout_in_minutes: :type timeout_in_minutes: int :param type: @@ -274,7 +297,7 @@ def __init__(self, name=None, secret=None, value=None): class TaskAttachment(Model): """ :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param created_on: :type created_on: datetime :param last_changed_by: @@ -314,11 +337,28 @@ def __init__(self, _links=None, created_on=None, last_changed_by=None, last_chan self.type = type +class TaskHubOidcToken(Model): + """ + :param oidc_token: + :type oidc_token: str + """ + + _attribute_map = { + 'oidc_token': {'key': 'oidcToken', 'type': 'str'} + } + + def __init__(self, oidc_token=None): + super(TaskHubOidcToken, self).__init__() + self.oidc_token = oidc_token + + class TaskLogReference(Model): """ - :param id: + A reference to a task log. This class contains information about the output printed to the timeline record's logs console during pipeline run. + + :param id: The ID of the task log. :type id: int - :param location: + :param location: The REST URL of the task log. :type location: str """ @@ -351,7 +391,7 @@ def __init__(self, item_type=None): class TaskOrchestrationOwner(Model): """ :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param id: :type id: int :param name: @@ -397,9 +437,9 @@ class TaskOrchestrationPlanReference(Model): :param artifact_uri: :type artifact_uri: str :param definition: - :type definition: :class:`TaskOrchestrationOwner ` + :type definition: :class:`TaskOrchestrationOwner ` :param owner: - :type owner: :class:`TaskOrchestrationOwner ` + :type owner: :class:`TaskOrchestrationOwner ` :param plan_group: :type plan_group: str :param plan_id: @@ -442,9 +482,9 @@ class TaskOrchestrationQueuedPlan(Model): :param assign_time: :type assign_time: datetime :param definition: - :type definition: :class:`TaskOrchestrationOwner ` + :type definition: :class:`TaskOrchestrationOwner ` :param owner: - :type owner: :class:`TaskOrchestrationOwner ` + :type owner: :class:`TaskOrchestrationOwner ` :param plan_group: :type plan_group: str :param plan_id: @@ -487,15 +527,15 @@ def __init__(self, assign_time=None, definition=None, owner=None, plan_group=Non class TaskOrchestrationQueuedPlanGroup(Model): """ :param definition: - :type definition: :class:`TaskOrchestrationOwner ` + :type definition: :class:`TaskOrchestrationOwner ` :param owner: - :type owner: :class:`TaskOrchestrationOwner ` + :type owner: :class:`TaskOrchestrationOwner ` :param plan_group: :type plan_group: str :param plans: - :type plans: list of :class:`TaskOrchestrationQueuedPlan ` + :type plans: list of :class:`TaskOrchestrationQueuedPlan ` :param project: - :type project: :class:`ProjectReference ` + :type project: :class:`ProjectReference ` :param queue_position: :type queue_position: int """ @@ -521,13 +561,15 @@ def __init__(self, definition=None, owner=None, plan_group=None, plans=None, pro class TaskReference(Model): """ - :param id: + A reference to a task. + + :param id: The ID of the task definition. Corresponds to the id value of task.json file.
Example: CmdLineV2 { "id": "D9BAFED4-0B18-4F58-968D-86655B4D2CE9" } :type id: str - :param inputs: + :param inputs: A dictionary of inputs specific to a task definition. Corresponds to inputs value of task.json file. :type inputs: dict - :param name: + :param name: The name of the task definition. Corresponds to the name value of task.json file.
Example: CmdLineV2 { "name": "CmdLine" } :type name: str - :param version: + :param version: The version of the task definition. Corresponds to the version value of task.json file.
Example: CmdLineV2 { "version": { "Major": 2, "Minor": 212, "Patch": 0 } } :type version: str """ @@ -548,13 +590,15 @@ def __init__(self, id=None, inputs=None, name=None, version=None): class TimelineAttempt(Model): """ - :param attempt: Gets or sets the attempt of the record. + An attempt to update a TimelineRecord. + + :param attempt: The attempt of the record. :type attempt: int - :param identifier: Gets or sets the unique identifier for the record. + :param identifier: The unique identifier for the record. :type identifier: str - :param record_id: Gets or sets the record identifier located within the specified timeline. + :param record_id: The record identifier located within the specified timeline. :type record_id: str - :param timeline_id: Gets or sets the timeline identifier which owns the record representing this attempt. + :param timeline_id: The timeline identifier which owns the record representing this attempt. :type timeline_id: str """ @@ -575,74 +619,76 @@ def __init__(self, attempt=None, identifier=None, record_id=None, timeline_id=No class TimelineRecord(Model): """ - :param agent_specification: - :type agent_specification: :class:`object ` - :param attempt: + Detailed information about the execution of different operations during pipeline run. + + :param agent_specification: The specification of an agent running a pipeline job, in binary format. Applicable when record is of type Job.
Example: { "VMImage" : "windows-2019" } + :type agent_specification: :class:`object ` + :param attempt: The number of record attempts. :type attempt: int - :param current_operation: + :param change_id: The ID connecting all records updated at the same time. This value is taken from timeline's ChangeId. + :type change_id: int + :param current_operation: A string that indicates the current operation. :type current_operation: str - :param details: - :type details: :class:`TimelineReference ` - :param error_count: + :param details: A reference to a sub-timeline. + :type details: :class:`TimelineReference ` + :param error_count: The number of errors produced by this operation. :type error_count: int - :param finish_time: + :param finish_time: The finish time of the record. :type finish_time: datetime - :param change_id: - :type change_id: int - :param id: + :param id: The ID of the record. :type id: str - :param identifier: + :param identifier: String identifier that is consistent across attempts. :type identifier: str - :param issues: - :type issues: list of :class:`Issue ` - :param last_modified: + :param issues: The list of issues produced by this operation. + :type issues: list of :class:`Issue ` + :param last_modified: The time the record was last modified. :type last_modified: datetime - :param location: + :param location: The REST URL of the record. :type location: str - :param log: - :type log: :class:`TaskLogReference ` - :param name: + :param log: A reference to the log produced by this operation. + :type log: :class:`TaskLogReference ` + :param name: The name of the record. :type name: str - :param order: + :param order: An ordinal value relative to other records within the timeline. :type order: int - :param parent_id: + :param parent_id: The ID of the record's parent.
Example: Stage is a parent of a Phase, Phase is a parent of a Job, Job is a parent of a Task. :type parent_id: str - :param percent_complete: + :param percent_complete: The percentage of record completion. :type percent_complete: int - :param previous_attempts: - :type previous_attempts: list of :class:`TimelineAttempt ` - :param queue_id: + :param previous_attempts: The previous record attempts. + :type previous_attempts: list of :class:`TimelineAttempt ` + :param queue_id: The ID of the queue which connects projects to agent pools on which the operation ran on. Applicable when record is of type Job. :type queue_id: int - :param ref_name: + :param ref_name: Name of the referenced record. :type ref_name: str - :param result: + :param result: The result of the record. :type result: object - :param result_code: + :param result_code: Evaluation of predefined conditions upon completion of record's operation.
Example: Evaluating `succeeded()`, Result = True
Example: Evaluating `and(succeeded(), eq(variables['system.debug'], False))`, Result = False :type result_code: str - :param start_time: + :param start_time: The start time of the record. :type start_time: datetime - :param state: + :param state: The state of the record. :type state: object - :param task: - :type task: :class:`TaskReference ` - :param type: + :param task: A reference to the task. Applicable when record is of type Task. + :type task: :class:`TaskReference ` + :param type: The type of operation being tracked by the record.
Example: Stage, Phase, Job, Task... :type type: str - :param variables: + :param variables: The variables of the record. :type variables: dict - :param warning_count: + :param warning_count: The number of warnings produced by this operation. :type warning_count: int - :param worker_name: + :param worker_name: The name of the agent running the operation. Applicable when record is of type Job. :type worker_name: str """ _attribute_map = { 'agent_specification': {'key': 'agentSpecification', 'type': 'object'}, 'attempt': {'key': 'attempt', 'type': 'int'}, + 'change_id': {'key': 'changeId', 'type': 'int'}, 'current_operation': {'key': 'currentOperation', 'type': 'str'}, 'details': {'key': 'details', 'type': 'TimelineReference'}, 'error_count': {'key': 'errorCount', 'type': 'int'}, 'finish_time': {'key': 'finishTime', 'type': 'iso-8601'}, - 'change_id': {'key': 'changeId', 'type': 'int'}, 'id': {'key': 'id', 'type': 'str'}, 'identifier': {'key': 'identifier', 'type': 'str'}, 'issues': {'key': 'issues', 'type': '[Issue]'}, @@ -667,15 +713,15 @@ class TimelineRecord(Model): 'worker_name': {'key': 'workerName', 'type': 'str'} } - def __init__(self, agent_specification=None, attempt=None, current_operation=None, details=None, error_count=None, finish_time=None, change_id=None, id=None, identifier=None, issues=None, last_modified=None, location=None, log=None, name=None, order=None, parent_id=None, percent_complete=None, previous_attempts=None, queue_id=None, ref_name=None, result=None, result_code=None, start_time=None, state=None, task=None, type=None, variables=None, warning_count=None, worker_name=None): + def __init__(self, agent_specification=None, attempt=None, change_id=None, current_operation=None, details=None, error_count=None, finish_time=None, id=None, identifier=None, issues=None, last_modified=None, location=None, log=None, name=None, order=None, parent_id=None, percent_complete=None, previous_attempts=None, queue_id=None, ref_name=None, result=None, result_code=None, start_time=None, state=None, task=None, type=None, variables=None, warning_count=None, worker_name=None): super(TimelineRecord, self).__init__() self.agent_specification = agent_specification self.attempt = attempt + self.change_id = change_id self.current_operation = current_operation self.details = details self.error_count = error_count self.finish_time = finish_time - self.change_id = change_id self.id = id self.identifier = identifier self.issues = issues @@ -733,11 +779,13 @@ def __init__(self, count=None, end_line=None, start_line=None, step_id=None, val class TimelineReference(Model): """ - :param change_id: + A reference to a timeline. + + :param change_id: The change ID. :type change_id: int - :param id: + :param id: The ID of the timeline. :type id: str - :param location: + :param location: The REST URL of the timeline. :type location: str """ @@ -756,11 +804,13 @@ def __init__(self, change_id=None, id=None, location=None): class VariableValue(Model): """ - :param is_read_only: + A wrapper class for a generic variable. + + :param is_read_only: Indicates whether the variable can be changed during script's execution runtime. :type is_read_only: bool - :param is_secret: + :param is_secret: Indicates whether the variable should be encrypted at rest. :type is_secret: bool - :param value: + :param value: The value of the variable. :type value: str """ @@ -779,19 +829,21 @@ def __init__(self, is_read_only=None, is_secret=None, value=None): class TaskLog(TaskLogReference): """ - :param id: + A task log connected to a timeline record. + + :param id: The ID of the task log. :type id: int - :param location: + :param location: The REST URL of the task log. :type location: str - :param created_on: + :param created_on: The time of the task log creation. :type created_on: datetime - :param index_location: + :param index_location: The REST URL of the task log when indexed. :type index_location: str - :param last_changed_on: + :param last_changed_on: The time of the last modification of the task log. :type last_changed_on: datetime - :param line_count: + :param line_count: The number of the task log lines. :type line_count: long - :param path: + :param path: The path of the task log. :type path: str """ @@ -818,35 +870,35 @@ class TaskOrchestrationContainer(TaskOrchestrationItem): """ :param item_type: :type item_type: object + :param children: + :type children: list of :class:`TaskOrchestrationItem ` :param continue_on_error: :type continue_on_error: bool :param data: :type data: dict - :param children: - :type children: list of :class:`TaskOrchestrationItem ` :param max_concurrency: :type max_concurrency: int :param parallel: :type parallel: bool :param rollback: - :type rollback: :class:`TaskOrchestrationContainer ` + :type rollback: :class:`TaskOrchestrationContainer ` """ _attribute_map = { 'item_type': {'key': 'itemType', 'type': 'object'}, + 'children': {'key': 'children', 'type': '[TaskOrchestrationItem]'}, 'continue_on_error': {'key': 'continueOnError', 'type': 'bool'}, 'data': {'key': 'data', 'type': '{str}'}, - 'children': {'key': 'children', 'type': '[TaskOrchestrationItem]'}, 'max_concurrency': {'key': 'maxConcurrency', 'type': 'int'}, 'parallel': {'key': 'parallel', 'type': 'bool'}, 'rollback': {'key': 'rollback', 'type': 'TaskOrchestrationContainer'} } - def __init__(self, item_type=None, continue_on_error=None, data=None, children=None, max_concurrency=None, parallel=None, rollback=None): + def __init__(self, item_type=None, children=None, continue_on_error=None, data=None, max_concurrency=None, parallel=None, rollback=None): super(TaskOrchestrationContainer, self).__init__(item_type=item_type) + self.children = children self.continue_on_error = continue_on_error self.data = data - self.children = children self.max_concurrency = max_concurrency self.parallel = parallel self.rollback = rollback @@ -859,9 +911,9 @@ class TaskOrchestrationPlan(TaskOrchestrationPlanReference): :param artifact_uri: :type artifact_uri: str :param definition: - :type definition: :class:`TaskOrchestrationOwner ` + :type definition: :class:`TaskOrchestrationOwner ` :param owner: - :type owner: :class:`TaskOrchestrationOwner ` + :type owner: :class:`TaskOrchestrationOwner ` :param plan_group: :type plan_group: str :param plan_id: @@ -873,15 +925,15 @@ class TaskOrchestrationPlan(TaskOrchestrationPlanReference): :param version: :type version: int :param environment: - :type environment: :class:`PlanEnvironment ` + :type environment: :class:`PlanEnvironment ` :param expanded_yaml: - :type expanded_yaml: :class:`TaskLogReference ` + :type expanded_yaml: :class:`TaskLogReference ` :param finish_time: :type finish_time: datetime :param implementation: - :type implementation: :class:`TaskOrchestrationContainer ` + :type implementation: :class:`TaskOrchestrationContainer ` :param initialization_log: - :type initialization_log: :class:`TaskLogReference ` + :type initialization_log: :class:`TaskLogReference ` :param requested_by_id: :type requested_by_id: str :param requested_for_id: @@ -895,7 +947,7 @@ class TaskOrchestrationPlan(TaskOrchestrationPlanReference): :param state: :type state: object :param timeline: - :type timeline: :class:`TimelineReference ` + :type timeline: :class:`TimelineReference ` """ _attribute_map = { @@ -940,18 +992,18 @@ def __init__(self, artifact_location=None, artifact_uri=None, definition=None, o class Timeline(TimelineReference): """ - :param change_id: + :param change_id: The change ID. :type change_id: int - :param id: + :param id: The ID of the timeline. :type id: str - :param location: + :param location: The REST URL of the timeline. :type location: str :param last_changed_by: :type last_changed_by: str :param last_changed_on: :type last_changed_on: datetime :param records: - :type records: list of :class:`TimelineRecord ` + :type records: list of :class:`TimelineRecord ` """ _attribute_map = { @@ -972,6 +1024,7 @@ def __init__(self, change_id=None, id=None, location=None, last_changed_by=None, __all__ = [ 'Issue', + 'JobEvent', 'JobOption', 'MaskHint', 'PlanEnvironment', @@ -982,6 +1035,7 @@ def __init__(self, change_id=None, id=None, location=None, last_changed_by=None, 'TaskAgentJobTask', 'TaskAgentJobVariable', 'TaskAttachment', + 'TaskHubOidcToken', 'TaskLogReference', 'TaskOrchestrationItem', 'TaskOrchestrationOwner', diff --git a/azure-devops/azure/devops/v7_0/task/task_client.py b/azure-devops/azure/devops/v7_2/task/task_client.py similarity index 79% rename from azure-devops/azure/devops/v7_0/task/task_client.py rename to azure-devops/azure/devops/v7_2/task/task_client.py index 398c305a..c671a2f5 100644 --- a/azure-devops/azure/devops/v7_0/task/task_client.py +++ b/azure-devops/azure/devops/v7_2/task/task_client.py @@ -27,8 +27,9 @@ def __init__(self, base_url=None, creds=None): def get_plan_attachments(self, scope_identifier, hub_name, plan_id, type): """GetPlanAttachments. + [Preview API] :param str scope_identifier: The project GUID to scope the request - :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server + :param str hub_name: The name of the server hub. Common examples: "build", "rm", "checks" :param str plan_id: :param str type: :rtype: [TaskAttachment] @@ -44,21 +45,22 @@ def get_plan_attachments(self, scope_identifier, hub_name, plan_id, type): route_values['type'] = self._serialize.url('type', type, 'str') response = self._send(http_method='GET', location_id='eb55e5d6-2f30-4295-b5ed-38da50b1fc52', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('[TaskAttachment]', self._unwrap_collection(response)) def create_attachment(self, upload_stream, scope_identifier, hub_name, plan_id, timeline_id, record_id, type, name, **kwargs): """CreateAttachment. + [Preview API] :param object upload_stream: Stream to upload :param str scope_identifier: The project GUID to scope the request - :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server + :param str hub_name: The name of the server hub. Common examples: "build", "rm", "checks" :param str plan_id: :param str timeline_id: :param str record_id: :param str type: :param str name: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if scope_identifier is not None: @@ -82,7 +84,7 @@ def create_attachment(self, upload_stream, scope_identifier, hub_name, plan_id, content = self._client.stream_upload(upload_stream, callback=callback) response = self._send(http_method='PUT', location_id='7898f959-9cdf-4096-b29e-7f293031629e', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content, media_type='application/octet-stream') @@ -90,8 +92,9 @@ def create_attachment(self, upload_stream, scope_identifier, hub_name, plan_id, def create_attachment_from_artifact(self, scope_identifier, hub_name, plan_id, timeline_id, record_id, type, name, artifact_hash, length): """CreateAttachmentFromArtifact. + [Preview API] :param str scope_identifier: The project GUID to scope the request - :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server + :param str hub_name: The name of the server hub. Common examples: "build", "rm", "checks" :param str plan_id: :param str timeline_id: :param str record_id: @@ -99,7 +102,7 @@ def create_attachment_from_artifact(self, scope_identifier, hub_name, plan_id, t :param str name: :param str artifact_hash: :param long length: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if scope_identifier is not None: @@ -123,21 +126,22 @@ def create_attachment_from_artifact(self, scope_identifier, hub_name, plan_id, t query_parameters['length'] = self._serialize.query('length', length, 'long') response = self._send(http_method='PUT', location_id='7898f959-9cdf-4096-b29e-7f293031629e', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('TaskAttachment', response) def get_attachment(self, scope_identifier, hub_name, plan_id, timeline_id, record_id, type, name): """GetAttachment. + [Preview API] :param str scope_identifier: The project GUID to scope the request - :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server + :param str hub_name: The name of the server hub. Common examples: "build", "rm", "checks" :param str plan_id: :param str timeline_id: :param str record_id: :param str type: :param str name: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if scope_identifier is not None: @@ -156,14 +160,15 @@ def get_attachment(self, scope_identifier, hub_name, plan_id, timeline_id, recor route_values['name'] = self._serialize.url('name', name, 'str') response = self._send(http_method='GET', location_id='7898f959-9cdf-4096-b29e-7f293031629e', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('TaskAttachment', response) def get_attachment_content(self, scope_identifier, hub_name, plan_id, timeline_id, record_id, type, name, **kwargs): """GetAttachmentContent. + [Preview API] :param str scope_identifier: The project GUID to scope the request - :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server + :param str hub_name: The name of the server hub. Common examples: "build", "rm", "checks" :param str plan_id: :param str timeline_id: :param str record_id: @@ -188,7 +193,7 @@ def get_attachment_content(self, scope_identifier, hub_name, plan_id, timeline_i route_values['name'] = self._serialize.url('name', name, 'str') response = self._send(http_method='GET', location_id='7898f959-9cdf-4096-b29e-7f293031629e', - version='7.0', + version='7.2-preview.1', route_values=route_values, accept_media_type='application/octet-stream') if "callback" in kwargs: @@ -199,8 +204,9 @@ def get_attachment_content(self, scope_identifier, hub_name, plan_id, timeline_i def get_attachments(self, scope_identifier, hub_name, plan_id, timeline_id, record_id, type): """GetAttachments. + [Preview API] :param str scope_identifier: The project GUID to scope the request - :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server + :param str hub_name: The name of the server hub. Common examples: "build", "rm", "checks" :param str plan_id: :param str timeline_id: :param str record_id: @@ -222,18 +228,19 @@ def get_attachments(self, scope_identifier, hub_name, plan_id, timeline_id, reco route_values['type'] = self._serialize.url('type', type, 'str') response = self._send(http_method='GET', location_id='7898f959-9cdf-4096-b29e-7f293031629e', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('[TaskAttachment]', self._unwrap_collection(response)) def append_log_content(self, upload_stream, scope_identifier, hub_name, plan_id, log_id, **kwargs): """AppendLogContent. + [Preview API] Append a log to a task's log. The log should be sent in the body of the request as a TaskLog object stream. :param object upload_stream: Stream to upload :param str scope_identifier: The project GUID to scope the request - :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server - :param str plan_id: - :param int log_id: - :rtype: :class:` ` + :param str hub_name: The name of the server hub. Common examples: "build", "rm", "checks" + :param str plan_id: The ID of the plan. + :param int log_id: The ID of the log. + :rtype: :class:` ` """ route_values = {} if scope_identifier is not None: @@ -251,7 +258,7 @@ def append_log_content(self, upload_stream, scope_identifier, hub_name, plan_id, content = self._client.stream_upload(upload_stream, callback=callback) response = self._send(http_method='POST', location_id='46f5667d-263a-4684-91b1-dff7fdcf64e2', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content, media_type='application/octet-stream') @@ -259,13 +266,14 @@ def append_log_content(self, upload_stream, scope_identifier, hub_name, plan_id, def associate_log(self, scope_identifier, hub_name, plan_id, log_id, serialized_blob_id, line_count): """AssociateLog. + [Preview API] :param str scope_identifier: The project GUID to scope the request - :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server + :param str hub_name: The name of the server hub. Common examples: "build", "rm", "checks" :param str plan_id: :param int log_id: :param str serialized_blob_id: :param int line_count: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if scope_identifier is not None: @@ -283,18 +291,19 @@ def associate_log(self, scope_identifier, hub_name, plan_id, log_id, serialized_ query_parameters['lineCount'] = self._serialize.query('line_count', line_count, 'int') response = self._send(http_method='POST', location_id='46f5667d-263a-4684-91b1-dff7fdcf64e2', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('TaskLog', response) def create_log(self, log, scope_identifier, hub_name, plan_id): """CreateLog. - :param :class:` ` log: + [Preview API] Create a log and connect it to a pipeline run's execution plan. + :param :class:` ` log: An object that contains information about log's path. :param str scope_identifier: The project GUID to scope the request - :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server - :param str plan_id: - :rtype: :class:` ` + :param str hub_name: The name of the server hub. Common examples: "build", "rm", "checks" + :param str plan_id: The ID of the plan. + :rtype: :class:` ` """ route_values = {} if scope_identifier is not None: @@ -306,15 +315,16 @@ def create_log(self, log, scope_identifier, hub_name, plan_id): content = self._serialize.body(log, 'TaskLog') response = self._send(http_method='POST', location_id='46f5667d-263a-4684-91b1-dff7fdcf64e2', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('TaskLog', response) def get_log(self, scope_identifier, hub_name, plan_id, log_id, start_line=None, end_line=None): """GetLog. + [Preview API] :param str scope_identifier: The project GUID to scope the request - :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server + :param str hub_name: The name of the server hub. Common examples: "build", "rm", "checks" :param str plan_id: :param int log_id: :param long start_line: @@ -337,15 +347,16 @@ def get_log(self, scope_identifier, hub_name, plan_id, log_id, start_line=None, query_parameters['endLine'] = self._serialize.query('end_line', end_line, 'long') response = self._send(http_method='GET', location_id='46f5667d-263a-4684-91b1-dff7fdcf64e2', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[str]', self._unwrap_collection(response)) def get_logs(self, scope_identifier, hub_name, plan_id): """GetLogs. + [Preview API] :param str scope_identifier: The project GUID to scope the request - :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server + :param str hub_name: The name of the server hub. Common examples: "build", "rm", "checks" :param str plan_id: :rtype: [TaskLog] """ @@ -358,14 +369,47 @@ def get_logs(self, scope_identifier, hub_name, plan_id): route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str') response = self._send(http_method='GET', location_id='46f5667d-263a-4684-91b1-dff7fdcf64e2', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('[TaskLog]', self._unwrap_collection(response)) + def create_oidc_token(self, claims, scope_identifier, hub_name, plan_id, job_id, service_connection_id=None): + """CreateOidcToken. + [Preview API] + :param {str} claims: + :param str scope_identifier: The project GUID to scope the request + :param str hub_name: The name of the server hub. Common examples: "build", "rm", "checks" + :param str plan_id: + :param str job_id: + :param str service_connection_id: + :rtype: :class:` ` + """ + route_values = {} + if scope_identifier is not None: + route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str') + if hub_name is not None: + route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str') + if plan_id is not None: + route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str') + if job_id is not None: + route_values['jobId'] = self._serialize.url('job_id', job_id, 'str') + query_parameters = {} + if service_connection_id is not None: + query_parameters['serviceConnectionId'] = self._serialize.query('service_connection_id', service_connection_id, 'str') + content = self._serialize.body(claims, '{str}') + response = self._send(http_method='POST', + location_id='69a319f4-28c1-4bfd-93e6-ea0ff5c6f1a2', + version='7.2-preview.1', + route_values=route_values, + query_parameters=query_parameters, + content=content) + return self._deserialize('TaskHubOidcToken', response) + def get_records(self, scope_identifier, hub_name, plan_id, timeline_id, change_id=None): """GetRecords. + [Preview API] :param str scope_identifier: The project GUID to scope the request - :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server + :param str hub_name: The name of the server hub. Common examples: "build", "rm", "checks" :param str plan_id: :param str timeline_id: :param int change_id: @@ -385,18 +429,19 @@ def get_records(self, scope_identifier, hub_name, plan_id, timeline_id, change_i query_parameters['changeId'] = self._serialize.query('change_id', change_id, 'int') response = self._send(http_method='GET', location_id='8893bc5b-35b2-4be7-83cb-99e683551db4', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TimelineRecord]', self._unwrap_collection(response)) def update_records(self, records, scope_identifier, hub_name, plan_id, timeline_id): """UpdateRecords. - :param :class:` ` records: + [Preview API] Update timeline records if they already exist, otherwise create new ones for the same timeline. + :param :class:` ` records: The array of timeline records to be updated. :param str scope_identifier: The project GUID to scope the request - :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server - :param str plan_id: - :param str timeline_id: + :param str hub_name: The name of the server hub. Common examples: "build", "rm", "checks" + :param str plan_id: The ID of the plan. + :param str timeline_id: The ID of the timeline. :rtype: [TimelineRecord] """ route_values = {} @@ -411,18 +456,19 @@ def update_records(self, records, scope_identifier, hub_name, plan_id, timeline_ content = self._serialize.body(records, 'VssJsonCollectionWrapper') response = self._send(http_method='PATCH', location_id='8893bc5b-35b2-4be7-83cb-99e683551db4', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('[TimelineRecord]', self._unwrap_collection(response)) def create_timeline(self, timeline, scope_identifier, hub_name, plan_id): """CreateTimeline. - :param :class:` ` timeline: + [Preview API] + :param :class:` ` timeline: :param str scope_identifier: The project GUID to scope the request - :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server + :param str hub_name: The name of the server hub. Common examples: "build", "rm", "checks" :param str plan_id: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if scope_identifier is not None: @@ -434,15 +480,16 @@ def create_timeline(self, timeline, scope_identifier, hub_name, plan_id): content = self._serialize.body(timeline, 'Timeline') response = self._send(http_method='POST', location_id='83597576-cc2c-453c-bea6-2882ae6a1653', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('Timeline', response) def delete_timeline(self, scope_identifier, hub_name, plan_id, timeline_id): """DeleteTimeline. + [Preview API] :param str scope_identifier: The project GUID to scope the request - :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server + :param str hub_name: The name of the server hub. Common examples: "build", "rm", "checks" :param str plan_id: :param str timeline_id: """ @@ -457,18 +504,19 @@ def delete_timeline(self, scope_identifier, hub_name, plan_id, timeline_id): route_values['timelineId'] = self._serialize.url('timeline_id', timeline_id, 'str') self._send(http_method='DELETE', location_id='83597576-cc2c-453c-bea6-2882ae6a1653', - version='7.0', + version='7.2-preview.1', route_values=route_values) def get_timeline(self, scope_identifier, hub_name, plan_id, timeline_id, change_id=None, include_records=None): """GetTimeline. + [Preview API] :param str scope_identifier: The project GUID to scope the request - :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server + :param str hub_name: The name of the server hub. Common examples: "build", "rm", "checks" :param str plan_id: :param str timeline_id: :param int change_id: :param bool include_records: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if scope_identifier is not None: @@ -486,15 +534,16 @@ def get_timeline(self, scope_identifier, hub_name, plan_id, timeline_id, change_ query_parameters['includeRecords'] = self._serialize.query('include_records', include_records, 'bool') response = self._send(http_method='GET', location_id='83597576-cc2c-453c-bea6-2882ae6a1653', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('Timeline', response) def get_timelines(self, scope_identifier, hub_name, plan_id): """GetTimelines. + [Preview API] :param str scope_identifier: The project GUID to scope the request - :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server + :param str hub_name: The name of the server hub. Common examples: "build", "rm", "checks" :param str plan_id: :rtype: [Timeline] """ @@ -507,7 +556,7 @@ def get_timelines(self, scope_identifier, hub_name, plan_id): route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str') response = self._send(http_method='GET', location_id='83597576-cc2c-453c-bea6-2882ae6a1653', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('[Timeline]', self._unwrap_collection(response)) diff --git a/azure-devops/azure/devops/v7_0/task_agent/__init__.py b/azure-devops/azure/devops/v7_2/task_agent/__init__.py similarity index 98% rename from azure-devops/azure/devops/v7_0/task_agent/__init__.py rename to azure-devops/azure/devops/v7_2/task_agent/__init__.py index e6e230a6..37508bf9 100644 --- a/azure-devops/azure/devops/v7_0/task_agent/__init__.py +++ b/azure-devops/azure/devops/v7_2/task_agent/__init__.py @@ -10,8 +10,6 @@ from .task_agent_client import TaskAgentClient __all__ = [ - 'AadOauthTokenRequest', - 'AadOauthTokenResult', 'AuthenticationSchemeReference', 'AuthorizationHeader', 'AzureManagementGroup', diff --git a/azure-devops/azure/devops/v7_0/task_agent/models.py b/azure-devops/azure/devops/v7_2/task_agent/models.py similarity index 92% rename from azure-devops/azure/devops/v7_0/task_agent/models.py rename to azure-devops/azure/devops/v7_2/task_agent/models.py index 810e132e..b84b90e9 100644 --- a/azure-devops/azure/devops/v7_0/task_agent/models.py +++ b/azure-devops/azure/devops/v7_2/task_agent/models.py @@ -9,52 +9,6 @@ from msrest.serialization import Model -class AadOauthTokenRequest(Model): - """ - :param refresh: - :type refresh: bool - :param resource: - :type resource: str - :param tenant_id: - :type tenant_id: str - :param token: - :type token: str - """ - - _attribute_map = { - 'refresh': {'key': 'refresh', 'type': 'bool'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'token': {'key': 'token', 'type': 'str'} - } - - def __init__(self, refresh=None, resource=None, tenant_id=None, token=None): - super(AadOauthTokenRequest, self).__init__() - self.refresh = refresh - self.resource = resource - self.tenant_id = tenant_id - self.token = token - - -class AadOauthTokenResult(Model): - """ - :param access_token: - :type access_token: str - :param refresh_token_cache: - :type refresh_token_cache: str - """ - - _attribute_map = { - 'access_token': {'key': 'accessToken', 'type': 'str'}, - 'refresh_token_cache': {'key': 'refreshTokenCache', 'type': 'str'} - } - - def __init__(self, access_token=None, refresh_token_cache=None): - super(AadOauthTokenResult, self).__init__() - self.access_token = access_token - self.refresh_token_cache = refresh_token_cache - - class AuthenticationSchemeReference(Model): """ :param inputs: @@ -129,7 +83,7 @@ class AzureManagementGroupQueryResult(Model): :param error_message: Error message in case of an exception :type error_message: str :param value: List of azure management groups - :type value: list of :class:`AzureManagementGroup ` + :type value: list of :class:`AzureManagementGroup ` """ _attribute_map = { @@ -175,7 +129,7 @@ class AzureSubscriptionQueryResult(Model): :param error_message: :type error_message: str :param value: - :type value: list of :class:`AzureSubscription ` + :type value: list of :class:`AzureSubscription ` """ _attribute_map = { @@ -207,11 +161,11 @@ def __init__(self, value=None): class DataSource(Model): """ :param authentication_scheme: - :type authentication_scheme: :class:`AuthenticationSchemeReference ` + :type authentication_scheme: :class:`AuthenticationSchemeReference ` :param endpoint_url: :type endpoint_url: str :param headers: - :type headers: list of :class:`AuthorizationHeader ` + :type headers: list of :class:`AuthorizationHeader ` :param name: :type name: str :param resource_url: @@ -254,7 +208,7 @@ class DataSourceBindingBase(Model): :param endpoint_url: Gets or sets the url of the service endpoint. :type endpoint_url: str :param headers: Gets or sets the authorization headers. - :type headers: list of :class:`AuthorizationHeader ` + :type headers: list of :class:`AuthorizationHeader ` :param initial_context_template: Defines the initial value of the query params :type initial_context_template: str :param parameters: Gets or sets the parameters for the data source. @@ -311,7 +265,7 @@ class DataSourceDetails(Model): :param data_source_url: :type data_source_url: str :param headers: - :type headers: list of :class:`AuthorizationHeader ` + :type headers: list of :class:`AuthorizationHeader ` :param parameters: :type parameters: dict :param resource_url: @@ -382,7 +336,7 @@ class DependsOn(Model): :param input: :type input: str :param map: - :type map: list of :class:`DependencyBinding ` + :type map: list of :class:`DependencyBinding ` """ _attribute_map = { @@ -405,7 +359,7 @@ class DeploymentGroupCreateParameter(Model): :param name: Name of the deployment group. :type name: str :param pool: Deployment pool in which deployment agents are registered. This is obsolete. Kept for compatibility. Will be marked obsolete explicitly by M132. - :type pool: :class:`DeploymentGroupCreateParameterPoolProperty ` + :type pool: :class:`DeploymentGroupCreateParameterPoolProperty ` :param pool_id: Identifier of the deployment pool in which deployment agents are registered. :type pool_id: int """ @@ -447,11 +401,11 @@ class DeploymentGroupMetrics(Model): Deployment group metrics. :param columns_header: List of deployment group properties. And types of metrics provided for those properties. - :type columns_header: :class:`MetricsColumnsHeader ` + :type columns_header: :class:`MetricsColumnsHeader ` :param deployment_group: Deployment group. - :type deployment_group: :class:`DeploymentGroupReference ` + :type deployment_group: :class:`DeploymentGroupReference ` :param rows: Values of properties and the metrics. E.g. 1: total count of deployment targets for which 'TargetState' is 'offline'. E.g. 2: Average time of deployment to the deployment targets for which 'LastJobStatus' is 'passed' and 'TargetState' is 'online'. - :type rows: list of :class:`MetricsRow ` + :type rows: list of :class:`MetricsRow ` """ _attribute_map = { @@ -476,9 +430,9 @@ class DeploymentGroupReference(Model): :param name: Name of the deployment group. :type name: str :param pool: Deployment pool in which deployment agents are registered. - :type pool: :class:`TaskAgentPoolReference ` + :type pool: :class:`TaskAgentPoolReference ` :param project: Project to which the deployment group belongs. - :type project: :class:`ProjectReference ` + :type project: :class:`ProjectReference ` """ _attribute_map = { @@ -522,11 +476,11 @@ class DeploymentMachine(Model): Deployment target. :param agent: Deployment agent. - :type agent: :class:`TaskAgent ` + :type agent: :class:`TaskAgent ` :param id: Deployment target Identifier. :type id: int :param properties: Properties of the deployment target. - :type properties: :class:`object ` + :type properties: :class:`object ` :param tags: Tags of the deployment target. :type tags: list of str """ @@ -553,9 +507,9 @@ class DeploymentMachineGroupReference(Model): :param name: :type name: str :param pool: - :type pool: :class:`TaskAgentPoolReference ` + :type pool: :class:`TaskAgentPoolReference ` :param project: - :type project: :class:`ProjectReference ` + :type project: :class:`ProjectReference ` """ _attribute_map = { @@ -578,15 +532,15 @@ class DeploymentPoolSummary(Model): Deployment pool summary. :param deployment_groups: List of deployment groups referring to the deployment pool. - :type deployment_groups: list of :class:`DeploymentGroupReference ` + :type deployment_groups: list of :class:`DeploymentGroupReference ` :param offline_agents_count: Number of deployment agents that are offline. :type offline_agents_count: int :param online_agents_count: Number of deployment agents that are online. :type online_agents_count: int :param pool: Deployment pool. - :type pool: :class:`TaskAgentPoolReference ` + :type pool: :class:`TaskAgentPoolReference ` :param resource: Virtual machine Resource referring in pool. - :type resource: :class:`EnvironmentResourceReference ` + :type resource: :class:`EnvironmentResourceReference ` """ _attribute_map = { @@ -651,7 +605,7 @@ class EndpointUrl(Model): Represents url of the service endpoint. :param depends_on: Gets or sets the dependency bindings. - :type depends_on: :class:`DependsOn ` + :type depends_on: :class:`DependsOn ` :param display_name: Gets or sets the display name of service endpoint url. :type display_name: str :param help_text: Gets or sets the help text of service endpoint url. @@ -705,7 +659,7 @@ class EnvironmentDeploymentExecutionRecord(Model): EnvironmentDeploymentExecutionRecord. :param definition: Definition of the environment deployment execution owner - :type definition: :class:`TaskOrchestrationOwner ` + :type definition: :class:`TaskOrchestrationOwner ` :param environment_id: Id of the Environment :type environment_id: int :param finish_time: Finish time of the environment deployment execution @@ -717,7 +671,7 @@ class EnvironmentDeploymentExecutionRecord(Model): :param job_name: Job name :type job_name: str :param owner: Owner of the environment deployment execution record - :type owner: :class:`TaskOrchestrationOwner ` + :type owner: :class:`TaskOrchestrationOwner ` :param plan_id: Plan Id :type plan_id: str :param plan_type: Plan type of the environment deployment execution record @@ -790,7 +744,7 @@ class EnvironmentInstance(Model): Environment. :param created_by: Identity reference of the user who created the Environment. - :type created_by: :class:`IdentityRef ` + :type created_by: :class:`IdentityRef ` :param created_on: Creation time of the Environment :type created_on: datetime :param description: Description of the Environment. @@ -798,15 +752,15 @@ class EnvironmentInstance(Model): :param id: Id of the Environment :type id: int :param last_modified_by: Identity reference of the user who last modified the Environment. - :type last_modified_by: :class:`IdentityRef ` + :type last_modified_by: :class:`IdentityRef ` :param last_modified_on: Last modified time of the Environment :type last_modified_on: datetime :param name: Name of the Environment. :type name: str :param project: Project information for environment. - :type project: :class:`ProjectReference ` + :type project: :class:`ProjectReference ` :param resources: - :type resources: list of :class:`EnvironmentResourceReference ` + :type resources: list of :class:`EnvironmentResourceReference ` """ _attribute_map = { @@ -856,15 +810,15 @@ def __init__(self, id=None, name=None): class EnvironmentResource(Model): """ :param created_by: - :type created_by: :class:`IdentityRef ` + :type created_by: :class:`IdentityRef ` :param created_on: :type created_on: datetime :param environment_reference: - :type environment_reference: :class:`EnvironmentReference ` + :type environment_reference: :class:`EnvironmentReference ` :param id: :type id: int :param last_modified_by: - :type last_modified_by: :class:`IdentityRef ` + :type last_modified_by: :class:`IdentityRef ` :param last_modified_on: :type last_modified_on: datetime :param name: @@ -953,7 +907,7 @@ def __init__(self, description=None, name=None): class GraphSubjectBase(Model): """ :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. :type descriptor: str :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. @@ -999,7 +953,7 @@ def __init__(self, text=None, url=None): class IdentityRef(GraphSubjectBase): """ :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. :type descriptor: str :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. @@ -1082,11 +1036,11 @@ class InputDescriptor(Model): :param use_in_default_description: Gets whether this input is included in the default generated action description. :type use_in_default_description: bool :param validation: Information to use to validate this input's value - :type validation: :class:`InputValidation ` + :type validation: :class:`InputValidation ` :param value_hint: A hint for input value. It can be used in the UI as the input placeholder. :type value_hint: str :param values: Information about possible values for this input - :type values: :class:`InputValues ` + :type values: :class:`InputValues ` """ _attribute_map = { @@ -1128,7 +1082,7 @@ class InputValidation(Model): """ Describes what values are valid for a subscription input - :param data_type: Gets or sets the data data type to validate. + :param data_type: Gets or sets the data type to validate. :type data_type: object :param is_required: Gets or sets if this is a required field. :type is_required: bool @@ -1216,7 +1170,7 @@ class InputValues(Model): :param default_value: The default value to use for this input :type default_value: str :param error: Errors encountered while computing dynamic values. - :type error: :class:`InputValuesError ` + :type error: :class:`InputValuesError ` :param input_id: The id of the input :type input_id: str :param is_disabled: Should this input be disabled @@ -1226,7 +1180,7 @@ class InputValues(Model): :param is_read_only: Should this input be made read-only :type is_read_only: bool :param possible_values: Possible values that this input can take - :type possible_values: list of :class:`InputValue ` + :type possible_values: list of :class:`InputValue ` """ _attribute_map = { @@ -1270,15 +1224,15 @@ def __init__(self, message=None): class KubernetesResource(EnvironmentResource): """ :param created_by: - :type created_by: :class:`IdentityRef ` + :type created_by: :class:`IdentityRef ` :param created_on: :type created_on: datetime :param environment_reference: - :type environment_reference: :class:`EnvironmentReference ` + :type environment_reference: :class:`EnvironmentReference ` :param id: :type id: int :param last_modified_by: - :type last_modified_by: :class:`IdentityRef ` + :type last_modified_by: :class:`IdentityRef ` :param last_modified_on: :type last_modified_on: datetime :param name: @@ -1370,9 +1324,9 @@ class MetricsColumnsHeader(Model): Metrics columns header :param dimensions: Properties of deployment group for which metrics are provided. E.g. 1: LastJobStatus E.g. 2: TargetState - :type dimensions: list of :class:`MetricsColumnMetaData ` + :type dimensions: list of :class:`MetricsColumnMetaData ` :param metrics: The types of metrics. E.g. 1: total count of deployment targets. E.g. 2: Average time of deployment to the deployment targets. - :type metrics: list of :class:`MetricsColumnMetaData ` + :type metrics: list of :class:`MetricsColumnMetaData ` """ _attribute_map = { @@ -1426,7 +1380,7 @@ class PackageMetadata(Model): :param type: The type of package (e.g. "agent") :type type: str :param version: The package version. - :type version: :class:`PackageVersion ` + :type version: :class:`PackageVersion ` """ _attribute_map = { @@ -1588,9 +1542,9 @@ def __init__(self, failed_to_reach_all_providers=None, host_id=None, is_hosted=N class ResourceUsage(Model): """ :param resource_limit: - :type resource_limit: :class:`ResourceLimit ` + :type resource_limit: :class:`ResourceLimit ` :param running_requests: - :type running_requests: list of :class:`TaskAgentJobRequest ` + :type running_requests: list of :class:`TaskAgentJobRequest ` :param used_count: :type used_count: int :param used_minutes: @@ -1630,13 +1584,13 @@ def __init__(self, result_template=None): class SecureFile(Model): """ :param created_by: - :type created_by: :class:`IdentityRef ` + :type created_by: :class:`IdentityRef ` :param created_on: :type created_on: datetime :param id: :type id: str :param modified_by: - :type modified_by: :class:`IdentityRef ` + :type modified_by: :class:`IdentityRef ` :param modified_on: :type modified_on: datetime :param name: @@ -1675,11 +1629,11 @@ class ServiceEndpoint(Model): Represents an endpoint which may be used by an orchestration job. :param administrators_group: Gets or sets the identity reference for the administrators group of the service endpoint. - :type administrators_group: :class:`IdentityRef ` + :type administrators_group: :class:`IdentityRef ` :param authorization: Gets or sets the authorization data for talking to the endpoint. - :type authorization: :class:`EndpointAuthorization ` + :type authorization: :class:`EndpointAuthorization ` :param created_by: Gets or sets the identity reference for the user who created the Service endpoint. - :type created_by: :class:`IdentityRef ` + :type created_by: :class:`IdentityRef ` :param data: :type data: dict :param description: Gets or sets the description of endpoint. @@ -1695,11 +1649,11 @@ class ServiceEndpoint(Model): :param name: Gets or sets the friendly name of the endpoint. :type name: str :param operation_status: Error message during creation/deletion of endpoint - :type operation_status: :class:`object ` + :type operation_status: :class:`object ` :param owner: Gets or sets the owner of the endpoint. :type owner: str :param readers_group: Gets or sets the identity reference for the readers group of the service endpoint. - :type readers_group: :class:`IdentityRef ` + :type readers_group: :class:`IdentityRef ` :param type: Gets or sets the type of the endpoint. :type type: str :param url: Gets or sets the url of the endpoint. @@ -1746,13 +1700,13 @@ def __init__(self, administrators_group=None, authorization=None, created_by=Non class ServiceEndpointAuthenticationScheme(Model): """ :param authorization_headers: Gets or sets the authorization headers of service endpoint authentication scheme. - :type authorization_headers: list of :class:`AuthorizationHeader ` + :type authorization_headers: list of :class:`AuthorizationHeader ` :param client_certificates: Gets or sets the certificates of service endpoint authentication scheme. - :type client_certificates: list of :class:`ClientCertificate ` + :type client_certificates: list of :class:`ClientCertificate ` :param display_name: Gets or sets the display name for the service endpoint authentication scheme. :type display_name: str :param input_descriptors: Gets or sets the input descriptors for the service endpoint authentication scheme. - :type input_descriptors: list of :class:`InputDescriptor ` + :type input_descriptors: list of :class:`InputDescriptor ` :param scheme: Gets or sets the scheme for service endpoint authentication. :type scheme: str """ @@ -1777,7 +1731,7 @@ def __init__(self, authorization_headers=None, client_certificates=None, display class ServiceEndpointDetails(Model): """ :param authorization: - :type authorization: :class:`EndpointAuthorization ` + :type authorization: :class:`EndpointAuthorization ` :param data: :type data: dict :param type: @@ -1806,13 +1760,13 @@ class ServiceEndpointExecutionData(Model): Represents service endpoint execution data. :param definition: Gets the definition of service endpoint execution owner. - :type definition: :class:`TaskOrchestrationOwner ` + :type definition: :class:`TaskOrchestrationOwner ` :param finish_time: Gets the finish time of service endpoint execution. :type finish_time: datetime :param id: Gets the Id of service endpoint execution data. :type id: long :param owner: Gets the owner of service endpoint execution data. - :type owner: :class:`TaskOrchestrationOwner ` + :type owner: :class:`TaskOrchestrationOwner ` :param plan_type: Gets the plan type of service endpoint execution data. :type plan_type: str :param result: Gets the result of service endpoint execution. @@ -1845,7 +1799,7 @@ def __init__(self, definition=None, finish_time=None, id=None, owner=None, plan_ class ServiceEndpointExecutionRecord(Model): """ :param data: Gets the execution data of service endpoint execution. - :type data: :class:`ServiceEndpointExecutionData ` + :type data: :class:`ServiceEndpointExecutionData ` :param endpoint_id: Gets the Id of service endpoint. :type endpoint_id: str """ @@ -1864,7 +1818,7 @@ def __init__(self, data=None, endpoint_id=None): class ServiceEndpointExecutionRecordsInput(Model): """ :param data: - :type data: :class:`ServiceEndpointExecutionData ` + :type data: :class:`ServiceEndpointExecutionData ` :param endpoint_ids: :type endpoint_ids: list of str """ @@ -1883,11 +1837,11 @@ def __init__(self, data=None, endpoint_ids=None): class ServiceEndpointRequest(Model): """ :param data_source_details: - :type data_source_details: :class:`DataSourceDetails ` + :type data_source_details: :class:`DataSourceDetails ` :param result_transformation_details: - :type result_transformation_details: :class:`ResultTransformationDetails ` + :type result_transformation_details: :class:`ResultTransformationDetails ` :param service_endpoint_details: - :type service_endpoint_details: :class:`ServiceEndpointDetails ` + :type service_endpoint_details: :class:`ServiceEndpointDetails ` """ _attribute_map = { @@ -1908,7 +1862,7 @@ class ServiceEndpointRequestResult(Model): :param error_message: :type error_message: str :param result: - :type result: :class:`object ` + :type result: :class:`object ` :param status_code: :type status_code: object """ @@ -1931,25 +1885,25 @@ class ServiceEndpointType(Model): Represents type of the service endpoint. :param authentication_schemes: Authentication scheme of service endpoint type. - :type authentication_schemes: list of :class:`ServiceEndpointAuthenticationScheme ` + :type authentication_schemes: list of :class:`ServiceEndpointAuthenticationScheme ` :param data_sources: Data sources of service endpoint type. - :type data_sources: list of :class:`DataSource ` + :type data_sources: list of :class:`DataSource ` :param dependency_data: Dependency data of service endpoint type. - :type dependency_data: list of :class:`DependencyData ` + :type dependency_data: list of :class:`DependencyData ` :param description: Gets or sets the description of service endpoint type. :type description: str :param display_name: Gets or sets the display name of service endpoint type. :type display_name: str :param endpoint_url: Gets or sets the endpoint url of service endpoint type. - :type endpoint_url: :class:`EndpointUrl ` + :type endpoint_url: :class:`EndpointUrl ` :param help_link: Gets or sets the help link of service endpoint type. - :type help_link: :class:`HelpLink ` + :type help_link: :class:`HelpLink ` :param help_mark_down: :type help_mark_down: str :param icon_url: Gets or sets the icon url of service endpoint type. :type icon_url: str :param input_descriptors: Input descriptor of service endpoint type. - :type input_descriptors: list of :class:`InputDescriptor ` + :type input_descriptors: list of :class:`InputDescriptor ` :param name: Gets or sets the name of service endpoint type. :type name: str :param trusted_hosts: Trusted hosts of a service endpoint type. @@ -2000,7 +1954,7 @@ class TaskAgentAuthorization(Model): :param client_id: Client identifier for this agent. :type client_id: str :param public_key: Public key used to verify the identity of this agent. - :type public_key: :class:`TaskAgentPublicKey ` + :type public_key: :class:`TaskAgentPublicKey ` """ _attribute_map = { @@ -2082,17 +2036,17 @@ def __init__(self, acquire_agent_endpoint=None, acquisition_timeout=None, agent_ class TaskAgentCloudRequest(Model): """ :param agent: - :type agent: :class:`TaskAgentReference ` + :type agent: :class:`TaskAgentReference ` :param agent_cloud_id: :type agent_cloud_id: int :param agent_connected_time: :type agent_connected_time: datetime :param agent_data: - :type agent_data: :class:`object ` + :type agent_data: :class:`object ` :param agent_specification: - :type agent_specification: :class:`object ` + :type agent_specification: :class:`object ` :param pool: - :type pool: :class:`TaskAgentPoolReference ` + :type pool: :class:`TaskAgentPoolReference ` :param provisioned_time: :type provisioned_time: datetime :param provision_request_time: @@ -2135,7 +2089,7 @@ class TaskAgentCloudType(Model): :param display_name: Gets or sets the display name of agent cloud type. :type display_name: str :param input_descriptors: Gets or sets the input descriptors - :type input_descriptors: list of :class:`InputDescriptor ` + :type input_descriptors: list of :class:`InputDescriptor ` :param name: Gets or sets the name of agent cloud type. :type name: str """ @@ -2158,15 +2112,15 @@ class TaskAgentJobRequest(Model): A job request for an agent. :param agent_specification: - :type agent_specification: :class:`object ` + :type agent_specification: :class:`object ` :param assign_time: The date/time this request was assigned. :type assign_time: datetime :param data: Additional data about the request. :type data: dict :param definition: The pipeline definition associated with this request - :type definition: :class:`TaskOrchestrationOwner ` + :type definition: :class:`TaskOrchestrationOwner ` :param demands: A list of demands required to fulfill this request. - :type demands: list of :class:`object ` + :type demands: list of :class:`object ` :param finish_time: The date/time this request was finished. :type finish_time: datetime :param host_id: The host which triggered this request. @@ -2178,13 +2132,13 @@ class TaskAgentJobRequest(Model): :param locked_until: The deadline for the agent to renew the lock. :type locked_until: datetime :param matched_agents: - :type matched_agents: list of :class:`TaskAgentReference ` + :type matched_agents: list of :class:`TaskAgentReference ` :param matches_all_agents_in_pool: :type matches_all_agents_in_pool: bool :param orchestration_id: :type orchestration_id: str :param owner: The pipeline associated with this request - :type owner: :class:`TaskOrchestrationOwner ` + :type owner: :class:`TaskOrchestrationOwner ` :param plan_group: :type plan_group: str :param plan_id: Internal ID for the orchestration plan connected with this request. @@ -2204,7 +2158,7 @@ class TaskAgentJobRequest(Model): :param request_id: ID of the request. :type request_id: long :param reserved_agent: The agent allocated for this request. - :type reserved_agent: :class:`TaskAgentReference ` + :type reserved_agent: :class:`TaskAgentReference ` :param result: The result of this request. :type result: object :param scope_id: Scope of the pipeline; matches the project ID. @@ -2322,13 +2276,13 @@ class TaskAgentPoolMaintenanceDefinition(Model): :param max_concurrent_agents_percentage: Max percentage of agents within a pool running maintenance job at given time :type max_concurrent_agents_percentage: int :param options: - :type options: :class:`TaskAgentPoolMaintenanceOptions ` + :type options: :class:`TaskAgentPoolMaintenanceOptions ` :param pool: Pool reference for the maintenance definition - :type pool: :class:`TaskAgentPoolReference ` + :type pool: :class:`TaskAgentPoolReference ` :param retention_policy: - :type retention_policy: :class:`TaskAgentPoolMaintenanceRetentionPolicy ` + :type retention_policy: :class:`TaskAgentPoolMaintenanceRetentionPolicy ` :param schedule_setting: - :type schedule_setting: :class:`TaskAgentPoolMaintenanceSchedule ` + :type schedule_setting: :class:`TaskAgentPoolMaintenanceSchedule ` """ _attribute_map = { @@ -2369,11 +2323,11 @@ class TaskAgentPoolMaintenanceJob(Model): :param orchestration_id: Orchestration/Plan Id for the maintenance job :type orchestration_id: str :param pool: Pool reference for the maintenance job - :type pool: :class:`TaskAgentPoolReference ` + :type pool: :class:`TaskAgentPoolReference ` :param queue_time: Time that the maintenance job was queued :type queue_time: datetime :param requested_by: The identity that queued the maintenance job - :type requested_by: :class:`IdentityRef ` + :type requested_by: :class:`IdentityRef ` :param result: The maintenance job result :type result: object :param start_time: Time that the maintenance job was started @@ -2381,7 +2335,7 @@ class TaskAgentPoolMaintenanceJob(Model): :param status: Status of the maintenance job :type status: object :param target_agents: - :type target_agents: list of :class:`TaskAgentPoolMaintenanceJobTargetAgent ` + :type target_agents: list of :class:`TaskAgentPoolMaintenanceJobTargetAgent ` :param warning_count: The total warning counts during the maintenance job :type warning_count: int """ @@ -2424,7 +2378,7 @@ def __init__(self, definition_id=None, error_count=None, finish_time=None, job_i class TaskAgentPoolMaintenanceJobTargetAgent(Model): """ :param agent: - :type agent: :class:`TaskAgentReference ` + :type agent: :class:`TaskAgentReference ` :param job_id: :type job_id: int :param result: @@ -2582,7 +2536,7 @@ class TaskAgentQueue(Model): :param name: Name of the queue :type name: str :param pool: Pool reference for this queue - :type pool: :class:`TaskAgentPoolReference ` + :type pool: :class:`TaskAgentPoolReference ` :param project_id: Project ID :type project_id: str """ @@ -2607,7 +2561,7 @@ class TaskAgentReference(Model): A reference to an agent. :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param access_point: This agent's access point. :type access_point: str :param enabled: Whether or not this agent should run jobs. @@ -2656,9 +2610,9 @@ class TaskAgentSession(Model): Represents a session for performing message exchanges from an agent. :param agent: Gets or sets the agent which is the target of the session. - :type agent: :class:`TaskAgentReference ` + :type agent: :class:`TaskAgentReference ` :param encryption_key: Gets the key used to encrypt message traffic for this session. - :type encryption_key: :class:`TaskAgentSessionKey ` + :type encryption_key: :class:`TaskAgentSessionKey ` :param owner_name: Gets or sets the owner name of this session. Generally this will be the machine of origination. :type owner_name: str :param session_id: Gets the unique identifier for this session. @@ -2712,15 +2666,15 @@ class TaskAgentUpdate(Model): :param current_state: Current state of this agent update. :type current_state: str :param reason: Reason for this update. - :type reason: :class:`TaskAgentUpdateReason ` + :type reason: :class:`TaskAgentUpdateReason ` :param requested_by: Identity which requested this update. - :type requested_by: :class:`IdentityRef ` + :type requested_by: :class:`IdentityRef ` :param request_time: Date on which this update was requested. :type request_time: datetime :param source_version: Source agent version of the update. - :type source_version: :class:`PackageVersion ` + :type source_version: :class:`PackageVersion ` :param target_version: Target agent version of the update. - :type target_version: :class:`PackageVersion ` + :type target_version: :class:`PackageVersion ` """ _attribute_map = { @@ -2774,8 +2728,10 @@ def __init__(self, mode=None): class TaskDefinition(Model): """ + :param _build_config_mapping: + :type _build_config_mapping: dict :param agent_execution: - :type agent_execution: :class:`TaskExecution ` + :type agent_execution: :class:`TaskExecution ` :param author: :type author: str :param category: @@ -2787,11 +2743,11 @@ class TaskDefinition(Model): :param contribution_version: :type contribution_version: str :param data_source_bindings: - :type data_source_bindings: list of :class:`DataSourceBinding ` + :type data_source_bindings: list of :class:`DataSourceBinding ` :param definition_type: :type definition_type: str :param demands: - :type demands: list of :class:`object ` + :type demands: list of :class:`object ` :param deprecated: :type deprecated: bool :param description: @@ -2805,7 +2761,7 @@ class TaskDefinition(Model): :param friendly_name: :type friendly_name: str :param groups: - :type groups: list of :class:`TaskGroupDefinition ` + :type groups: list of :class:`TaskGroupDefinition ` :param help_mark_down: :type help_mark_down: str :param help_url: @@ -2817,7 +2773,7 @@ class TaskDefinition(Model): :param id: :type id: str :param inputs: - :type inputs: list of :class:`TaskInputDefinition ` + :type inputs: list of :class:`TaskInputDefinition ` :param instance_name_format: :type instance_name_format: str :param minimum_agent_version: @@ -2825,7 +2781,7 @@ class TaskDefinition(Model): :param name: :type name: str :param output_variables: - :type output_variables: list of :class:`TaskOutputVariable ` + :type output_variables: list of :class:`TaskOutputVariable ` :param package_location: :type package_location: str :param package_type: @@ -2839,7 +2795,7 @@ class TaskDefinition(Model): :param release_notes: :type release_notes: str :param restrictions: - :type restrictions: :class:`TaskRestrictions ` + :type restrictions: :class:`TaskRestrictions ` :param runs_on: :type runs_on: list of str :param satisfies: @@ -2849,16 +2805,17 @@ class TaskDefinition(Model): :param show_environment_variables: :type show_environment_variables: bool :param source_definitions: - :type source_definitions: list of :class:`TaskSourceDefinition ` + :type source_definitions: list of :class:`TaskSourceDefinition ` :param source_location: :type source_location: str :param version: - :type version: :class:`TaskVersion ` + :type version: :class:`TaskVersion ` :param visibility: :type visibility: list of str """ _attribute_map = { + '_build_config_mapping': {'key': '_buildConfigMapping', 'type': '{str}'}, 'agent_execution': {'key': 'agentExecution', 'type': 'TaskExecution'}, 'author': {'key': 'author', 'type': 'str'}, 'category': {'key': 'category', 'type': 'str'}, @@ -2902,8 +2859,9 @@ class TaskDefinition(Model): 'visibility': {'key': 'visibility', 'type': '[str]'} } - def __init__(self, agent_execution=None, author=None, category=None, contents_uploaded=None, contribution_identifier=None, contribution_version=None, data_source_bindings=None, definition_type=None, demands=None, deprecated=None, description=None, disabled=None, ecosystem=None, execution=None, friendly_name=None, groups=None, help_mark_down=None, help_url=None, host_type=None, icon_url=None, id=None, inputs=None, instance_name_format=None, minimum_agent_version=None, name=None, output_variables=None, package_location=None, package_type=None, post_job_execution=None, pre_job_execution=None, preview=None, release_notes=None, restrictions=None, runs_on=None, satisfies=None, server_owned=None, show_environment_variables=None, source_definitions=None, source_location=None, version=None, visibility=None): + def __init__(self, _build_config_mapping=None, agent_execution=None, author=None, category=None, contents_uploaded=None, contribution_identifier=None, contribution_version=None, data_source_bindings=None, definition_type=None, demands=None, deprecated=None, description=None, disabled=None, ecosystem=None, execution=None, friendly_name=None, groups=None, help_mark_down=None, help_url=None, host_type=None, icon_url=None, id=None, inputs=None, instance_name_format=None, minimum_agent_version=None, name=None, output_variables=None, package_location=None, package_type=None, post_job_execution=None, pre_job_execution=None, preview=None, release_notes=None, restrictions=None, runs_on=None, satisfies=None, server_owned=None, show_environment_variables=None, source_definitions=None, source_location=None, version=None, visibility=None): super(TaskDefinition, self).__init__() + self._build_config_mapping = _build_config_mapping self.agent_execution = agent_execution self.author = author self.category = category @@ -3008,7 +2966,7 @@ def __init__(self, definition_type=None, id=None, version_spec=None): class TaskExecution(Model): """ :param exec_task: The utility task to run. Specifying this means that this task definition is simply a meta task to call another task. This is useful for tasks that call utility tasks like powershell and commandline - :type exec_task: :class:`TaskReference ` + :type exec_task: :class:`TaskReference ` :param platform_instructions: If a task is going to run code, then this provides the type/script etc... information by platform. For example, it might look like. net45: { typeName: "Microsoft.TeamFoundation.Automation.Tasks.PowerShellTask", assemblyName: "Microsoft.TeamFoundation.Automation.Tasks.PowerShell.dll" } net20: { typeName: "Microsoft.TeamFoundation.Automation.Tasks.PowerShellTask", assemblyName: "Microsoft.TeamFoundation.Automation.Tasks.PowerShell.dll" } java: { jar: "powershelltask.tasks.automation.teamfoundation.microsoft.com", } node: { script: "powershellhost.js", } :type platform_instructions: dict """ @@ -3026,8 +2984,10 @@ def __init__(self, exec_task=None, platform_instructions=None): class TaskGroup(TaskDefinition): """ + :param _build_config_mapping: + :type _build_config_mapping: dict :param agent_execution: - :type agent_execution: :class:`TaskExecution ` + :type agent_execution: :class:`TaskExecution ` :param author: :type author: str :param category: @@ -3039,11 +2999,11 @@ class TaskGroup(TaskDefinition): :param contribution_version: :type contribution_version: str :param data_source_bindings: - :type data_source_bindings: list of :class:`DataSourceBinding ` + :type data_source_bindings: list of :class:`DataSourceBinding ` :param definition_type: :type definition_type: str :param demands: - :type demands: list of :class:`object ` + :type demands: list of :class:`object ` :param deprecated: :type deprecated: bool :param description: @@ -3057,7 +3017,7 @@ class TaskGroup(TaskDefinition): :param friendly_name: :type friendly_name: str :param groups: - :type groups: list of :class:`TaskGroupDefinition ` + :type groups: list of :class:`TaskGroupDefinition ` :param help_mark_down: :type help_mark_down: str :param help_url: @@ -3069,7 +3029,7 @@ class TaskGroup(TaskDefinition): :param id: :type id: str :param inputs: - :type inputs: list of :class:`TaskInputDefinition ` + :type inputs: list of :class:`TaskInputDefinition ` :param instance_name_format: :type instance_name_format: str :param minimum_agent_version: @@ -3077,7 +3037,7 @@ class TaskGroup(TaskDefinition): :param name: :type name: str :param output_variables: - :type output_variables: list of :class:`TaskOutputVariable ` + :type output_variables: list of :class:`TaskOutputVariable ` :param package_location: :type package_location: str :param package_type: @@ -3091,7 +3051,7 @@ class TaskGroup(TaskDefinition): :param release_notes: :type release_notes: str :param restrictions: - :type restrictions: :class:`TaskRestrictions ` + :type restrictions: :class:`TaskRestrictions ` :param runs_on: :type runs_on: list of str :param satisfies: @@ -3101,23 +3061,23 @@ class TaskGroup(TaskDefinition): :param show_environment_variables: :type show_environment_variables: bool :param source_definitions: - :type source_definitions: list of :class:`TaskSourceDefinition ` + :type source_definitions: list of :class:`TaskSourceDefinition ` :param source_location: :type source_location: str :param version: - :type version: :class:`TaskVersion ` + :type version: :class:`TaskVersion ` :param visibility: :type visibility: list of str :param comment: Gets or sets comment. :type comment: str :param created_by: Gets or sets the identity who created. - :type created_by: :class:`IdentityRef ` + :type created_by: :class:`IdentityRef ` :param created_on: Gets or sets date on which it got created. :type created_on: datetime :param deleted: Gets or sets as 'true' to indicate as deleted, 'false' otherwise. :type deleted: bool :param modified_by: Gets or sets the identity who modified. - :type modified_by: :class:`IdentityRef ` + :type modified_by: :class:`IdentityRef ` :param modified_on: Gets or sets date on which it got modified. :type modified_on: datetime :param owner: Gets or sets the owner. @@ -3127,10 +3087,11 @@ class TaskGroup(TaskDefinition): :param revision: Gets or sets revision. :type revision: int :param tasks: Gets or sets the tasks. - :type tasks: list of :class:`TaskGroupStep ` + :type tasks: list of :class:`TaskGroupStep ` """ _attribute_map = { + '_build_config_mapping': {'key': '_buildConfigMapping', 'type': '{str}'}, 'agent_execution': {'key': 'agentExecution', 'type': 'TaskExecution'}, 'author': {'key': 'author', 'type': 'str'}, 'category': {'key': 'category', 'type': 'str'}, @@ -3184,8 +3145,8 @@ class TaskGroup(TaskDefinition): 'tasks': {'key': 'tasks', 'type': '[TaskGroupStep]'} } - def __init__(self, agent_execution=None, author=None, category=None, contents_uploaded=None, contribution_identifier=None, contribution_version=None, data_source_bindings=None, definition_type=None, demands=None, deprecated=None, description=None, disabled=None, ecosystem=None, execution=None, friendly_name=None, groups=None, help_mark_down=None, help_url=None, host_type=None, icon_url=None, id=None, inputs=None, instance_name_format=None, minimum_agent_version=None, name=None, output_variables=None, package_location=None, package_type=None, post_job_execution=None, pre_job_execution=None, preview=None, release_notes=None, restrictions=None, runs_on=None, satisfies=None, server_owned=None, show_environment_variables=None, source_definitions=None, source_location=None, version=None, visibility=None, comment=None, created_by=None, created_on=None, deleted=None, modified_by=None, modified_on=None, owner=None, parent_definition_id=None, revision=None, tasks=None): - super(TaskGroup, self).__init__(agent_execution=agent_execution, author=author, category=category, contents_uploaded=contents_uploaded, contribution_identifier=contribution_identifier, contribution_version=contribution_version, data_source_bindings=data_source_bindings, definition_type=definition_type, demands=demands, deprecated=deprecated, description=description, disabled=disabled, ecosystem=ecosystem, execution=execution, friendly_name=friendly_name, groups=groups, help_mark_down=help_mark_down, help_url=help_url, host_type=host_type, icon_url=icon_url, id=id, inputs=inputs, instance_name_format=instance_name_format, minimum_agent_version=minimum_agent_version, name=name, output_variables=output_variables, package_location=package_location, package_type=package_type, post_job_execution=post_job_execution, pre_job_execution=pre_job_execution, preview=preview, release_notes=release_notes, restrictions=restrictions, runs_on=runs_on, satisfies=satisfies, server_owned=server_owned, show_environment_variables=show_environment_variables, source_definitions=source_definitions, source_location=source_location, version=version, visibility=visibility) + def __init__(self, _build_config_mapping=None, agent_execution=None, author=None, category=None, contents_uploaded=None, contribution_identifier=None, contribution_version=None, data_source_bindings=None, definition_type=None, demands=None, deprecated=None, description=None, disabled=None, ecosystem=None, execution=None, friendly_name=None, groups=None, help_mark_down=None, help_url=None, host_type=None, icon_url=None, id=None, inputs=None, instance_name_format=None, minimum_agent_version=None, name=None, output_variables=None, package_location=None, package_type=None, post_job_execution=None, pre_job_execution=None, preview=None, release_notes=None, restrictions=None, runs_on=None, satisfies=None, server_owned=None, show_environment_variables=None, source_definitions=None, source_location=None, version=None, visibility=None, comment=None, created_by=None, created_on=None, deleted=None, modified_by=None, modified_on=None, owner=None, parent_definition_id=None, revision=None, tasks=None): + super(TaskGroup, self).__init__(_build_config_mapping=_build_config_mapping, agent_execution=agent_execution, author=author, category=category, contents_uploaded=contents_uploaded, contribution_identifier=contribution_identifier, contribution_version=contribution_version, data_source_bindings=data_source_bindings, definition_type=definition_type, demands=demands, deprecated=deprecated, description=description, disabled=disabled, ecosystem=ecosystem, execution=execution, friendly_name=friendly_name, groups=groups, help_mark_down=help_mark_down, help_url=help_url, host_type=host_type, icon_url=icon_url, id=id, inputs=inputs, instance_name_format=instance_name_format, minimum_agent_version=minimum_agent_version, name=name, output_variables=output_variables, package_location=package_location, package_type=package_type, post_job_execution=post_job_execution, pre_job_execution=pre_job_execution, preview=preview, release_notes=release_notes, restrictions=restrictions, runs_on=runs_on, satisfies=satisfies, server_owned=server_owned, show_environment_variables=show_environment_variables, source_definitions=source_definitions, source_location=source_location, version=version, visibility=visibility) self.comment = comment self.created_by = created_by self.created_on = created_on @@ -3211,7 +3172,7 @@ class TaskGroupCreateParameter(Model): :param icon_url: Sets url icon of the task group. :type icon_url: str :param inputs: Sets input for the task group. - :type inputs: list of :class:`TaskInputDefinition ` + :type inputs: list of :class:`TaskInputDefinition ` :param instance_name_format: Sets display name of the task group. :type instance_name_format: str :param name: Sets name of the task group. @@ -3221,9 +3182,9 @@ class TaskGroupCreateParameter(Model): :param runs_on: Sets RunsOn of the task group. Value can be 'Agent', 'Server' or 'DeploymentGroup'. :type runs_on: list of str :param tasks: Sets tasks for the task group. - :type tasks: list of :class:`TaskGroupStep ` + :type tasks: list of :class:`TaskGroupStep ` :param version: Sets version of the task group. - :type version: :class:`TaskVersion ` + :type version: :class:`TaskVersion ` """ _attribute_map = { @@ -3290,16 +3251,16 @@ def __init__(self, display_name=None, is_expanded=None, name=None, tags=None, vi class TaskGroupRevision(Model): """ - :param comment: - :type comment: str - :param file_id: - :type file_id: int :param changed_by: - :type changed_by: :class:`IdentityRef ` + :type changed_by: :class:`IdentityRef ` :param changed_date: :type changed_date: datetime :param change_type: :type change_type: object + :param comment: + :type comment: str + :param file_id: + :type file_id: int :param major_version: :type major_version: int :param revision: @@ -3309,23 +3270,23 @@ class TaskGroupRevision(Model): """ _attribute_map = { - 'comment': {'key': 'comment', 'type': 'str'}, - 'file_id': {'key': 'fileId', 'type': 'int'}, 'changed_by': {'key': 'changedBy', 'type': 'IdentityRef'}, 'changed_date': {'key': 'changedDate', 'type': 'iso-8601'}, 'change_type': {'key': 'changeType', 'type': 'object'}, + 'comment': {'key': 'comment', 'type': 'str'}, + 'file_id': {'key': 'fileId', 'type': 'int'}, 'major_version': {'key': 'majorVersion', 'type': 'int'}, 'revision': {'key': 'revision', 'type': 'int'}, 'task_group_id': {'key': 'taskGroupId', 'type': 'str'} } - def __init__(self, comment=None, file_id=None, changed_by=None, changed_date=None, change_type=None, major_version=None, revision=None, task_group_id=None): + def __init__(self, changed_by=None, changed_date=None, change_type=None, comment=None, file_id=None, major_version=None, revision=None, task_group_id=None): super(TaskGroupRevision, self).__init__() - self.comment = comment - self.file_id = file_id self.changed_by = changed_by self.changed_date = changed_date self.change_type = change_type + self.comment = comment + self.file_id = file_id self.major_version = major_version self.revision = revision self.task_group_id = task_group_id @@ -3352,7 +3313,7 @@ class TaskGroupStep(Model): :param retry_count_on_task_failure: Gets or sets the maximum number of retries :type retry_count_on_task_failure: int :param task: Gets or sets the reference of the task. - :type task: :class:`TaskDefinitionReference ` + :type task: :class:`TaskDefinitionReference ` :param timeout_in_minutes: Gets or sets the maximum time, in minutes, that a task is allowed to execute on agent before being cancelled by server. A zero value indicates an infinite timeout. :type timeout_in_minutes: int """ @@ -3401,7 +3362,7 @@ class TaskGroupUpdateParameter(Model): :param id: Sets the unique identifier of this field. :type id: str :param inputs: Sets input for the task group. - :type inputs: list of :class:`TaskInputDefinition ` + :type inputs: list of :class:`TaskInputDefinition ` :param instance_name_format: Sets display name of the task group. :type instance_name_format: str :param name: Sets name of the task group. @@ -3413,9 +3374,9 @@ class TaskGroupUpdateParameter(Model): :param runs_on: Sets RunsOn of the task group. Value can be 'Agent', 'Server' or 'DeploymentGroup'. :type runs_on: list of str :param tasks: Sets tasks for the task group. - :type tasks: list of :class:`TaskGroupStep ` + :type tasks: list of :class:`TaskGroupStep ` :param version: Sets version of the task group. - :type version: :class:`TaskVersion ` + :type version: :class:`TaskVersion ` """ _attribute_map = { @@ -3560,7 +3521,7 @@ class TaskInputDefinitionBase(Model): :param type: :type type: str :param validation: - :type validation: :class:`TaskInputValidation ` + :type validation: :class:`TaskInputValidation ` :param visible_rule: :type visible_rule: str """ @@ -3618,7 +3579,7 @@ def __init__(self, expression=None, message=None): class TaskOrchestrationOwner(Model): """ :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param id: :type id: int :param name: @@ -3682,13 +3643,15 @@ def __init__(self, type=None, url=None, version=None): class TaskReference(Model): """ - :param id: + A reference to a task. + + :param id: The ID of the task definition. Corresponds to the id value of task.json file.
Example: CmdLineV2 { "id": "D9BAFED4-0B18-4F58-968D-86655B4D2CE9" } :type id: str - :param inputs: + :param inputs: A dictionary of inputs specific to a task definition. Corresponds to inputs value of task.json file. :type inputs: dict - :param name: + :param name: The name of the task definition. Corresponds to the name value of task.json file.
Example: CmdLineV2 { "name": "CmdLine" } :type name: str - :param version: + :param version: The version of the task definition. Corresponds to the version value of task.json file.
Example: CmdLineV2 { "version": { "Major": 2, "Minor": 212, "Patch": 0 } } :type version: str """ @@ -3710,9 +3673,9 @@ def __init__(self, id=None, inputs=None, name=None, version=None): class TaskRestrictions(Model): """ :param commands: - :type commands: :class:`TaskCommandRestrictions ` + :type commands: :class:`TaskCommandRestrictions ` :param settable_variables: - :type settable_variables: :class:`TaskVariableRestrictions ` + :type settable_variables: :class:`TaskVariableRestrictions ` """ _attribute_map = { @@ -3831,7 +3794,7 @@ class VariableGroup(Model): A variable group is a collection of related variables. :param created_by: Gets or sets the identity who created the variable group. - :type created_by: :class:`IdentityRef ` + :type created_by: :class:`IdentityRef ` :param created_on: Gets or sets the time when variable group was created. :type created_on: datetime :param description: Gets or sets description of the variable group. @@ -3841,17 +3804,17 @@ class VariableGroup(Model): :param is_shared: Indicates whether variable group is shared with other projects or not. :type is_shared: bool :param modified_by: Gets or sets the identity who modified the variable group. - :type modified_by: :class:`IdentityRef ` + :type modified_by: :class:`IdentityRef ` :param modified_on: Gets or sets the time when variable group was modified :type modified_on: datetime :param name: Gets or sets name of the variable group. :type name: str :param provider_data: Gets or sets provider data. - :type provider_data: :class:`VariableGroupProviderData ` + :type provider_data: :class:`VariableGroupProviderData ` :param type: Gets or sets type of the variable group. :type type: str :param variable_group_project_references: all project references where the variable group is shared with other projects. - :type variable_group_project_references: list of :class:`VariableGroupProjectReference ` + :type variable_group_project_references: list of :class:`VariableGroupProjectReference ` :param variables: Gets or sets variables contained in the variable group. :type variables: dict """ @@ -3894,11 +3857,11 @@ class VariableGroupParameters(Model): :param name: Sets name of the variable group. :type name: str :param provider_data: Sets provider data. - :type provider_data: :class:`VariableGroupProviderData ` + :type provider_data: :class:`VariableGroupProviderData ` :param type: Sets type of the variable group. :type type: str :param variable_group_project_references: - :type variable_group_project_references: list of :class:`VariableGroupProjectReference ` + :type variable_group_project_references: list of :class:`VariableGroupProjectReference ` :param variables: Sets variables contained in the variable group. :type variables: dict """ @@ -3931,7 +3894,7 @@ class VariableGroupProjectReference(Model): :param name: Gets or sets name of the variable group. :type name: str :param project_reference: Gets or sets project reference of the variable group. - :type project_reference: :class:`ProjectReference ` + :type project_reference: :class:`ProjectReference ` """ _attribute_map = { @@ -3962,11 +3925,13 @@ def __init__(self): class VariableValue(Model): """ - :param is_read_only: + A wrapper class for a generic variable. + + :param is_read_only: Indicates whether the variable can be changed during script's execution runtime. :type is_read_only: bool - :param is_secret: + :param is_secret: Indicates whether the variable should be encrypted at rest. :type is_secret: bool - :param value: + :param value: The value of the variable. :type value: str """ @@ -3986,7 +3951,7 @@ def __init__(self, is_read_only=None, is_secret=None, value=None): class VirtualMachine(Model): """ :param agent: - :type agent: :class:`TaskAgent ` + :type agent: :class:`TaskAgent ` :param id: :type id: int :param tags: @@ -4009,15 +3974,15 @@ def __init__(self, agent=None, id=None, tags=None): class VirtualMachineGroup(EnvironmentResource): """ :param created_by: - :type created_by: :class:`IdentityRef ` + :type created_by: :class:`IdentityRef ` :param created_on: :type created_on: datetime :param environment_reference: - :type environment_reference: :class:`EnvironmentReference ` + :type environment_reference: :class:`EnvironmentReference ` :param id: :type id: int :param last_modified_by: - :type last_modified_by: :class:`IdentityRef ` + :type last_modified_by: :class:`IdentityRef ` :param last_modified_on: :type last_modified_on: datetime :param name: @@ -4076,7 +4041,7 @@ class DataSourceBinding(DataSourceBindingBase): :param endpoint_url: Gets or sets the url of the service endpoint. :type endpoint_url: str :param headers: Gets or sets the authorization headers. - :type headers: list of :class:`AuthorizationHeader ` + :type headers: list of :class:`AuthorizationHeader ` :param initial_context_template: Defines the initial value of the query params :type initial_context_template: str :param parameters: Gets or sets the parameters for the data source. @@ -4122,15 +4087,15 @@ class DeploymentGroup(DeploymentGroupReference): :param name: Name of the deployment group. :type name: str :param pool: Deployment pool in which deployment agents are registered. - :type pool: :class:`TaskAgentPoolReference ` + :type pool: :class:`TaskAgentPoolReference ` :param project: Project to which the deployment group belongs. - :type project: :class:`ProjectReference ` + :type project: :class:`ProjectReference ` :param description: Description of the deployment group. :type description: str :param machine_count: Number of deployment targets in the deployment group. :type machine_count: int :param machines: List of deployment targets in the deployment group. - :type machines: list of :class:`DeploymentMachine ` + :type machines: list of :class:`DeploymentMachine ` :param machine_tags: List of unique tags across all deployment targets in the deployment group. :type machine_tags: list of str """ @@ -4161,11 +4126,11 @@ class DeploymentMachineGroup(DeploymentMachineGroupReference): :param name: :type name: str :param pool: - :type pool: :class:`TaskAgentPoolReference ` + :type pool: :class:`TaskAgentPoolReference ` :param project: - :type project: :class:`ProjectReference ` + :type project: :class:`ProjectReference ` :param machines: - :type machines: list of :class:`DeploymentMachine ` + :type machines: list of :class:`DeploymentMachine ` :param size: :type size: int """ @@ -4190,7 +4155,7 @@ class TaskAgent(TaskAgentReference): A task agent. :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param access_point: This agent's access point. :type access_point: str :param enabled: Whether or not this agent should run jobs. @@ -4208,21 +4173,21 @@ class TaskAgent(TaskAgentReference): :param version: Agent version. :type version: str :param assigned_agent_cloud_request: The agent cloud request that's currently associated with this agent. - :type assigned_agent_cloud_request: :class:`TaskAgentCloudRequest ` + :type assigned_agent_cloud_request: :class:`TaskAgentCloudRequest ` :param assigned_request: The request which is currently assigned to this agent. - :type assigned_request: :class:`TaskAgentJobRequest ` + :type assigned_request: :class:`TaskAgentJobRequest ` :param authorization: Authorization information for this agent. - :type authorization: :class:`TaskAgentAuthorization ` + :type authorization: :class:`TaskAgentAuthorization ` :param created_on: Date on which this agent was created. :type created_on: datetime :param last_completed_request: The last request which was completed by this agent. - :type last_completed_request: :class:`TaskAgentJobRequest ` + :type last_completed_request: :class:`TaskAgentJobRequest ` :param max_parallelism: Maximum job parallelism allowed for this agent. :type max_parallelism: int :param pending_update: Pending update for this agent. - :type pending_update: :class:`TaskAgentUpdate ` + :type pending_update: :class:`TaskAgentUpdate ` :param properties: - :type properties: :class:`object ` + :type properties: :class:`object ` :param status_changed_on: Date on which the last connectivity status change occurred. :type status_changed_on: datetime :param system_capabilities: System-defined capabilities supported by this agent's host. Warning: To set capabilities use the PUT method, PUT will completely overwrite existing capabilities. @@ -4298,14 +4263,14 @@ class TaskAgentPool(TaskAgentPoolReference): :param auto_update: Whether or not agents in this pool are allowed to automatically update :type auto_update: bool :param created_by: Creator of the pool. The creator of the pool is automatically added into the administrators group for the pool on creation. - :type created_by: :class:`IdentityRef ` + :type created_by: :class:`IdentityRef ` :param created_on: The date/time of the pool creation. :type created_on: datetime :param owner: Owner or administrator of the pool. - :type owner: :class:`IdentityRef ` + :type owner: :class:`IdentityRef ` :param properties: - :type properties: :class:`object ` - :param target_size: Target parallelism. + :type properties: :class:`object ` + :param target_size: Target parallelism - Only applies to agent pools that are backed by pool providers. It will be null for regular pools. :type target_size: int """ @@ -4365,7 +4330,7 @@ class TaskInputDefinition(TaskInputDefinitionBase): :param type: :type type: str :param validation: - :type validation: :class:`TaskInputValidation ` + :type validation: :class:`TaskInputValidation ` :param visible_rule: :type visible_rule: str """ @@ -4416,8 +4381,6 @@ def __init__(self, auth_key=None, endpoint=None, key_selector=None, selector=Non __all__ = [ - 'AadOauthTokenRequest', - 'AadOauthTokenResult', 'AuthenticationSchemeReference', 'AuthorizationHeader', 'AzureManagementGroup', diff --git a/azure-devops/azure/devops/v7_0/task_agent/task_agent_client.py b/azure-devops/azure/devops/v7_2/task_agent/task_agent_client.py similarity index 75% rename from azure-devops/azure/devops/v7_0/task_agent/task_agent_client.py rename to azure-devops/azure/devops/v7_2/task_agent/task_agent_client.py index 72c55f8f..7c0263af 100644 --- a/azure-devops/azure/devops/v7_0/task_agent/task_agent_client.py +++ b/azure-devops/azure/devops/v7_2/task_agent/task_agent_client.py @@ -27,58 +27,63 @@ def __init__(self, base_url=None, creds=None): def add_agent_cloud(self, agent_cloud): """AddAgentCloud. - :param :class:` ` agent_cloud: - :rtype: :class:` ` + [Preview API] + :param :class:` ` agent_cloud: + :rtype: :class:` ` """ content = self._serialize.body(agent_cloud, 'TaskAgentCloud') response = self._send(http_method='POST', location_id='bfa72b3d-0fc6-43fb-932b-a7f6559f93b9', - version='7.0', + version='7.2-preview.1', content=content) return self._deserialize('TaskAgentCloud', response) def delete_agent_cloud(self, agent_cloud_id): """DeleteAgentCloud. + [Preview API] :param int agent_cloud_id: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if agent_cloud_id is not None: route_values['agentCloudId'] = self._serialize.url('agent_cloud_id', agent_cloud_id, 'int') response = self._send(http_method='DELETE', location_id='bfa72b3d-0fc6-43fb-932b-a7f6559f93b9', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('TaskAgentCloud', response) def get_agent_cloud(self, agent_cloud_id): """GetAgentCloud. + [Preview API] :param int agent_cloud_id: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if agent_cloud_id is not None: route_values['agentCloudId'] = self._serialize.url('agent_cloud_id', agent_cloud_id, 'int') response = self._send(http_method='GET', location_id='bfa72b3d-0fc6-43fb-932b-a7f6559f93b9', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('TaskAgentCloud', response) def get_agent_clouds(self): """GetAgentClouds. + [Preview API] :rtype: [TaskAgentCloud] """ response = self._send(http_method='GET', location_id='bfa72b3d-0fc6-43fb-932b-a7f6559f93b9', - version='7.0') + version='7.2-preview.1') return self._deserialize('[TaskAgentCloud]', self._unwrap_collection(response)) def update_agent_cloud(self, updated_cloud, agent_cloud_id): """UpdateAgentCloud. - :param :class:` ` updated_cloud: + [Preview API] + :param :class:` ` updated_cloud: :param int agent_cloud_id: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if agent_cloud_id is not None: @@ -86,7 +91,7 @@ def update_agent_cloud(self, updated_cloud, agent_cloud_id): content = self._serialize.body(updated_cloud, 'TaskAgentCloud') response = self._send(http_method='PATCH', location_id='bfa72b3d-0fc6-43fb-932b-a7f6559f93b9', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('TaskAgentCloud', response) @@ -98,15 +103,15 @@ def get_agent_cloud_types(self): """ response = self._send(http_method='GET', location_id='5932e193-f376-469d-9c3e-e5588ce12cb5', - version='7.0-preview.1') + version='7.2-preview.1') return self._deserialize('[TaskAgentCloudType]', self._unwrap_collection(response)) def add_agent(self, agent, pool_id): """AddAgent. - Adds an agent to a pool. You probably don't want to call this endpoint directly. Instead, [configure an agent](https://docs.microsoft.com/azure/devops/pipelines/agents/agents) using the agent download package. - :param :class:` ` agent: Details about the agent being added + [Preview API] Adds an agent to a pool. You probably don't want to call this endpoint directly. Instead, [configure an agent](https://docs.microsoft.com/azure/devops/pipelines/agents/agents) using the agent download package. + :param :class:` ` agent: Details about the agent being added :param int pool_id: The agent pool in which to add the agent - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if pool_id is not None: @@ -114,14 +119,14 @@ def add_agent(self, agent, pool_id): content = self._serialize.body(agent, 'TaskAgent') response = self._send(http_method='POST', location_id='e298ef32-5878-4cab-993c-043836571f42', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('TaskAgent', response) def delete_agent(self, pool_id, agent_id): """DeleteAgent. - Delete an agent. You probably don't want to call this endpoint directly. Instead, [use the agent configuration script](https://docs.microsoft.com/azure/devops/pipelines/agents/agents) to remove an agent from your organization. + [Preview API] Delete an agent. You probably don't want to call this endpoint directly. Instead, [use the agent configuration script](https://docs.microsoft.com/azure/devops/pipelines/agents/agents) to remove an agent from your organization. :param int pool_id: The pool ID to remove the agent from :param int agent_id: The agent ID to remove """ @@ -132,19 +137,19 @@ def delete_agent(self, pool_id, agent_id): route_values['agentId'] = self._serialize.url('agent_id', agent_id, 'int') self._send(http_method='DELETE', location_id='e298ef32-5878-4cab-993c-043836571f42', - version='7.0', + version='7.2-preview.1', route_values=route_values) def get_agent(self, pool_id, agent_id, include_capabilities=None, include_assigned_request=None, include_last_completed_request=None, property_filters=None): """GetAgent. - Get information about an agent. + [Preview API] Get information about an agent. :param int pool_id: The agent pool containing the agent :param int agent_id: The agent ID to get information about :param bool include_capabilities: Whether to include the agent's capabilities in the response :param bool include_assigned_request: Whether to include details about the agent's current work :param bool include_last_completed_request: Whether to include details about the agents' most recent completed work :param [str] property_filters: Filter which custom properties will be returned - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if pool_id is not None: @@ -163,14 +168,14 @@ def get_agent(self, pool_id, agent_id, include_capabilities=None, include_assign query_parameters['propertyFilters'] = self._serialize.query('property_filters', property_filters, 'str') response = self._send(http_method='GET', location_id='e298ef32-5878-4cab-993c-043836571f42', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('TaskAgent', response) def get_agents(self, pool_id, agent_name=None, include_capabilities=None, include_assigned_request=None, include_last_completed_request=None, property_filters=None, demands=None): """GetAgents. - Get a list of agents. + [Preview API] Get a list of agents. :param int pool_id: The agent pool containing the agents :param str agent_name: Filter on agent name :param bool include_capabilities: Whether to include the agents' capabilities in the response @@ -200,18 +205,18 @@ def get_agents(self, pool_id, agent_name=None, include_capabilities=None, includ query_parameters['demands'] = self._serialize.query('demands', demands, 'str') response = self._send(http_method='GET', location_id='e298ef32-5878-4cab-993c-043836571f42', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TaskAgent]', self._unwrap_collection(response)) def replace_agent(self, agent, pool_id, agent_id): """ReplaceAgent. - Replace an agent. You probably don't want to call this endpoint directly. Instead, [use the agent configuration script](https://docs.microsoft.com/azure/devops/pipelines/agents/agents) to remove and reconfigure an agent from your organization. - :param :class:` ` agent: Updated details about the replacing agent + [Preview API] Replace an agent. You probably don't want to call this endpoint directly. Instead, [use the agent configuration script](https://docs.microsoft.com/azure/devops/pipelines/agents/agents) to remove and reconfigure an agent from your organization. + :param :class:` ` agent: Updated details about the replacing agent :param int pool_id: The agent pool to use :param int agent_id: The agent to replace - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if pool_id is not None: @@ -221,18 +226,18 @@ def replace_agent(self, agent, pool_id, agent_id): content = self._serialize.body(agent, 'TaskAgent') response = self._send(http_method='PUT', location_id='e298ef32-5878-4cab-993c-043836571f42', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('TaskAgent', response) def update_agent(self, agent, pool_id, agent_id): """UpdateAgent. - Update agent details. - :param :class:` ` agent: Updated details about the agent + [Preview API] Update agent details. + :param :class:` ` agent: Updated details about the agent :param int pool_id: The agent pool to use :param int agent_id: The agent to update - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if pool_id is not None: @@ -242,17 +247,17 @@ def update_agent(self, agent, pool_id, agent_id): content = self._serialize.body(agent, 'TaskAgent') response = self._send(http_method='PATCH', location_id='e298ef32-5878-4cab-993c-043836571f42', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('TaskAgent', response) def add_deployment_group(self, deployment_group, project): """AddDeploymentGroup. - Create a deployment group. - :param :class:` ` deployment_group: Deployment group to create. + [Preview API] Create a deployment group. + :param :class:` ` deployment_group: Deployment group to create. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -260,14 +265,14 @@ def add_deployment_group(self, deployment_group, project): content = self._serialize.body(deployment_group, 'DeploymentGroupCreateParameter') response = self._send(http_method='POST', location_id='083c4d89-ab35-45af-aa11-7cf66895c53e', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('DeploymentGroup', response) def delete_deployment_group(self, project, deployment_group_id): """DeleteDeploymentGroup. - Delete a deployment group. + [Preview API] Delete a deployment group. :param str project: Project ID or project name :param int deployment_group_id: ID of the deployment group to be deleted. """ @@ -278,17 +283,17 @@ def delete_deployment_group(self, project, deployment_group_id): route_values['deploymentGroupId'] = self._serialize.url('deployment_group_id', deployment_group_id, 'int') self._send(http_method='DELETE', location_id='083c4d89-ab35-45af-aa11-7cf66895c53e', - version='7.0', + version='7.2-preview.1', route_values=route_values) def get_deployment_group(self, project, deployment_group_id, action_filter=None, expand=None): """GetDeploymentGroup. - Get a deployment group by its ID. + [Preview API] Get a deployment group by its ID. :param str project: Project ID or project name :param int deployment_group_id: ID of the deployment group. :param str action_filter: Get the deployment group only if this action can be performed on it. :param str expand: Include these additional details in the returned object. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -302,14 +307,14 @@ def get_deployment_group(self, project, deployment_group_id, action_filter=None, query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') response = self._send(http_method='GET', location_id='083c4d89-ab35-45af-aa11-7cf66895c53e', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('DeploymentGroup', response) def get_deployment_groups(self, project, name=None, action_filter=None, expand=None, continuation_token=None, top=None, ids=None): """GetDeploymentGroups. - Get a list of deployment groups by name or IDs. + [Preview API] Get a list of deployment groups by name or IDs. :param str project: Project ID or project name :param str name: Name of the deployment group. :param str action_filter: Get only deployment groups on which this action can be performed. @@ -317,7 +322,7 @@ def get_deployment_groups(self, project, name=None, action_filter=None, expand=N :param str continuation_token: Get deployment groups with names greater than this continuationToken lexicographically. :param int top: Maximum number of deployment groups to return. Default is **1000**. :param [int] ids: Comma separated list of IDs of the deployment groups. - :rtype: :class:`<[DeploymentGroup]> ` + :rtype: :class:`<[DeploymentGroup]> ` """ route_values = {} if project is not None: @@ -338,18 +343,18 @@ def get_deployment_groups(self, project, name=None, action_filter=None, expand=N query_parameters['ids'] = self._serialize.query('ids', ids, 'str') response = self._send(http_method='GET', location_id='083c4d89-ab35-45af-aa11-7cf66895c53e', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[DeploymentGroup]', self._unwrap_collection(response)) def update_deployment_group(self, deployment_group, project, deployment_group_id): """UpdateDeploymentGroup. - Update a deployment group. - :param :class:` ` deployment_group: Deployment group to update. + [Preview API] Update a deployment group. + :param :class:` ` deployment_group: Deployment group to update. :param str project: Project ID or project name :param int deployment_group_id: ID of the deployment group. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -359,215 +364,45 @@ def update_deployment_group(self, deployment_group, project, deployment_group_id content = self._serialize.body(deployment_group, 'DeploymentGroupUpdateParameter') response = self._send(http_method='PATCH', location_id='083c4d89-ab35-45af-aa11-7cf66895c53e', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('DeploymentGroup', response) - def get_environment_deployment_execution_records(self, project, environment_id, continuation_token=None, top=None): - """GetEnvironmentDeploymentExecutionRecords. - Get environment deployment execution history - :param str project: Project ID or project name - :param int environment_id: - :param str continuation_token: - :param int top: - :rtype: :class:`<[EnvironmentDeploymentExecutionRecord]> ` - """ - route_values = {} - if project is not None: - route_values['project'] = self._serialize.url('project', project, 'str') - if environment_id is not None: - route_values['environmentId'] = self._serialize.url('environment_id', environment_id, 'int') - query_parameters = {} - if continuation_token is not None: - query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'str') - if top is not None: - query_parameters['top'] = self._serialize.query('top', top, 'int') - response = self._send(http_method='GET', - location_id='51bb5d21-4305-4ea6-9dbb-b7488af73334', - version='7.0', - route_values=route_values, - query_parameters=query_parameters) - return self._deserialize('[EnvironmentDeploymentExecutionRecord]', self._unwrap_collection(response)) - - def add_environment(self, environment_create_parameter, project): - """AddEnvironment. - Create an environment. - :param :class:` ` environment_create_parameter: Environment to create. - :param str project: Project ID or project name - :rtype: :class:` ` - """ - route_values = {} - if project is not None: - route_values['project'] = self._serialize.url('project', project, 'str') - content = self._serialize.body(environment_create_parameter, 'EnvironmentCreateParameter') - response = self._send(http_method='POST', - location_id='8572b1fc-2482-47fa-8f74-7e3ed53ee54b', - version='7.0', - route_values=route_values, - content=content) - return self._deserialize('EnvironmentInstance', response) - - def delete_environment(self, project, environment_id): - """DeleteEnvironment. - Delete the specified environment. - :param str project: Project ID or project name - :param int environment_id: ID of the environment. - """ - route_values = {} - if project is not None: - route_values['project'] = self._serialize.url('project', project, 'str') - if environment_id is not None: - route_values['environmentId'] = self._serialize.url('environment_id', environment_id, 'int') - self._send(http_method='DELETE', - location_id='8572b1fc-2482-47fa-8f74-7e3ed53ee54b', - version='7.0', - route_values=route_values) - - def get_environment_by_id(self, project, environment_id, expands=None): - """GetEnvironmentById. - Get an environment by its ID. - :param str project: Project ID or project name - :param int environment_id: ID of the environment. - :param str expands: Include these additional details in the returned objects. - :rtype: :class:` ` - """ - route_values = {} - if project is not None: - route_values['project'] = self._serialize.url('project', project, 'str') - if environment_id is not None: - route_values['environmentId'] = self._serialize.url('environment_id', environment_id, 'int') - query_parameters = {} - if expands is not None: - query_parameters['expands'] = self._serialize.query('expands', expands, 'str') - response = self._send(http_method='GET', - location_id='8572b1fc-2482-47fa-8f74-7e3ed53ee54b', - version='7.0', - route_values=route_values, - query_parameters=query_parameters) - return self._deserialize('EnvironmentInstance', response) - - def get_environments(self, project, name=None, continuation_token=None, top=None): - """GetEnvironments. - Get all environments. - :param str project: Project ID or project name - :param str name: - :param str continuation_token: - :param int top: - :rtype: :class:`<[EnvironmentInstance]> ` + def has_pool_permissions(self, pool_id, permissions): + """HasPoolPermissions. + [Preview API] Checks if current identity has passed permissions on a pool. + :param int pool_id: Id of the pool to check + :param int permissions: Permissions to check. Multiple permissions might be merged into single value using bitwise OR operator (e.g. AgentPoolPermissions.Manage | AgentPoolPermissions.View) + :rtype: bool """ route_values = {} - if project is not None: - route_values['project'] = self._serialize.url('project', project, 'str') - query_parameters = {} - if name is not None: - query_parameters['name'] = self._serialize.query('name', name, 'str') - if continuation_token is not None: - query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query('top', top, 'int') - response = self._send(http_method='GET', - location_id='8572b1fc-2482-47fa-8f74-7e3ed53ee54b', - version='7.0', - route_values=route_values, - query_parameters=query_parameters) - return self._deserialize('[EnvironmentInstance]', self._unwrap_collection(response)) - - def update_environment(self, environment_update_parameter, project, environment_id): - """UpdateEnvironment. - Update the specified environment. - :param :class:` ` environment_update_parameter: Environment data to update. - :param str project: Project ID or project name - :param int environment_id: ID of the environment. - :rtype: :class:` ` - """ - route_values = {} - if project is not None: - route_values['project'] = self._serialize.url('project', project, 'str') - if environment_id is not None: - route_values['environmentId'] = self._serialize.url('environment_id', environment_id, 'int') - content = self._serialize.body(environment_update_parameter, 'EnvironmentUpdateParameter') - response = self._send(http_method='PATCH', - location_id='8572b1fc-2482-47fa-8f74-7e3ed53ee54b', - version='7.0', - route_values=route_values, - content=content) - return self._deserialize('EnvironmentInstance', response) - - def add_kubernetes_resource(self, create_parameters, project, environment_id): - """AddKubernetesResource. - :param :class:` ` create_parameters: - :param str project: Project ID or project name - :param int environment_id: - :rtype: :class:` ` - """ - route_values = {} - if project is not None: - route_values['project'] = self._serialize.url('project', project, 'str') - if environment_id is not None: - route_values['environmentId'] = self._serialize.url('environment_id', environment_id, 'int') - content = self._serialize.body(create_parameters, 'KubernetesResourceCreateParameters') - response = self._send(http_method='POST', - location_id='73fba52f-15ab-42b3-a538-ce67a9223a04', - version='7.0', - route_values=route_values, - content=content) - return self._deserialize('KubernetesResource', response) - - def delete_kubernetes_resource(self, project, environment_id, resource_id): - """DeleteKubernetesResource. - :param str project: Project ID or project name - :param int environment_id: - :param int resource_id: - """ - route_values = {} - if project is not None: - route_values['project'] = self._serialize.url('project', project, 'str') - if environment_id is not None: - route_values['environmentId'] = self._serialize.url('environment_id', environment_id, 'int') - if resource_id is not None: - route_values['resourceId'] = self._serialize.url('resource_id', resource_id, 'int') - self._send(http_method='DELETE', - location_id='73fba52f-15ab-42b3-a538-ce67a9223a04', - version='7.0', - route_values=route_values) - - def get_kubernetes_resource(self, project, environment_id, resource_id): - """GetKubernetesResource. - :param str project: Project ID or project name - :param int environment_id: - :param int resource_id: - :rtype: :class:` ` - """ - route_values = {} - if project is not None: - route_values['project'] = self._serialize.url('project', project, 'str') - if environment_id is not None: - route_values['environmentId'] = self._serialize.url('environment_id', environment_id, 'int') - if resource_id is not None: - route_values['resourceId'] = self._serialize.url('resource_id', resource_id, 'int') + if pool_id is not None: + route_values['poolId'] = self._serialize.url('pool_id', pool_id, 'int') + if permissions is not None: + route_values['permissions'] = self._serialize.url('permissions', permissions, 'int') response = self._send(http_method='GET', - location_id='73fba52f-15ab-42b3-a538-ce67a9223a04', - version='7.0', + location_id='162778f3-4b48-48f3-9d58-436fb9c407bc', + version='7.2-preview.1', route_values=route_values) - return self._deserialize('KubernetesResource', response) + return self._deserialize('bool', response) def add_agent_pool(self, pool): """AddAgentPool. - Create an agent pool. - :param :class:` ` pool: Details about the new agent pool - :rtype: :class:` ` + [Preview API] Create an agent pool. + :param :class:` ` pool: Details about the new agent pool + :rtype: :class:` ` """ content = self._serialize.body(pool, 'TaskAgentPool') response = self._send(http_method='POST', location_id='a8c47e17-4d56-4a56-92bb-de7ea7dc65be', - version='7.0', + version='7.2-preview.1', content=content) return self._deserialize('TaskAgentPool', response) def delete_agent_pool(self, pool_id): """DeleteAgentPool. - Delete an agent pool. + [Preview API] Delete an agent pool. :param int pool_id: ID of the agent pool to delete """ route_values = {} @@ -575,16 +410,16 @@ def delete_agent_pool(self, pool_id): route_values['poolId'] = self._serialize.url('pool_id', pool_id, 'int') self._send(http_method='DELETE', location_id='a8c47e17-4d56-4a56-92bb-de7ea7dc65be', - version='7.0', + version='7.2-preview.1', route_values=route_values) def get_agent_pool(self, pool_id, properties=None, action_filter=None): """GetAgentPool. - Get information about an agent pool. + [Preview API] Get information about an agent pool. :param int pool_id: An agent pool ID :param [str] properties: Agent pool properties (comma-separated) :param str action_filter: Filter by whether the calling user has use or manage permissions - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if pool_id is not None: @@ -597,14 +432,14 @@ def get_agent_pool(self, pool_id, properties=None, action_filter=None): query_parameters['actionFilter'] = self._serialize.query('action_filter', action_filter, 'str') response = self._send(http_method='GET', location_id='a8c47e17-4d56-4a56-92bb-de7ea7dc65be', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('TaskAgentPool', response) def get_agent_pools(self, pool_name=None, properties=None, pool_type=None, action_filter=None): """GetAgentPools. - Get a list of agent pools. + [Preview API] Get a list of agent pools. :param str pool_name: Filter by name :param [str] properties: Filter by agent pool properties (comma-separated) :param str pool_type: Filter by pool type @@ -623,13 +458,13 @@ def get_agent_pools(self, pool_name=None, properties=None, pool_type=None, actio query_parameters['actionFilter'] = self._serialize.query('action_filter', action_filter, 'str') response = self._send(http_method='GET', location_id='a8c47e17-4d56-4a56-92bb-de7ea7dc65be', - version='7.0', + version='7.2-preview.1', query_parameters=query_parameters) return self._deserialize('[TaskAgentPool]', self._unwrap_collection(response)) def get_agent_pools_by_ids(self, pool_ids, action_filter=None): """GetAgentPoolsByIds. - Get a list of agent pools. + [Preview API] Get a list of agent pools. :param [int] pool_ids: pool Ids to fetch :param str action_filter: Filter by whether the calling user has use or manage permissions :rtype: [TaskAgentPool] @@ -642,16 +477,16 @@ def get_agent_pools_by_ids(self, pool_ids, action_filter=None): query_parameters['actionFilter'] = self._serialize.query('action_filter', action_filter, 'str') response = self._send(http_method='GET', location_id='a8c47e17-4d56-4a56-92bb-de7ea7dc65be', - version='7.0', + version='7.2-preview.1', query_parameters=query_parameters) return self._deserialize('[TaskAgentPool]', self._unwrap_collection(response)) def update_agent_pool(self, pool, pool_id): """UpdateAgentPool. - Update properties on an agent pool - :param :class:` ` pool: Updated agent pool details + [Preview API] Update properties on an agent pool + :param :class:` ` pool: Updated agent pool details :param int pool_id: The agent pool to update - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if pool_id is not None: @@ -659,18 +494,18 @@ def update_agent_pool(self, pool, pool_id): content = self._serialize.body(pool, 'TaskAgentPool') response = self._send(http_method='PATCH', location_id='a8c47e17-4d56-4a56-92bb-de7ea7dc65be', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('TaskAgentPool', response) def add_agent_queue(self, queue, project=None, authorize_pipelines=None): """AddAgentQueue. - Create a new agent queue to connect a project to an agent pool. - :param :class:` ` queue: Details about the queue to create + [Preview API] Create a new agent queue to connect a project to an agent pool. + :param :class:` ` queue: Details about the queue to create :param str project: Project ID or project name :param bool authorize_pipelines: Automatically authorize this queue when using YAML - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -681,7 +516,7 @@ def add_agent_queue(self, queue, project=None, authorize_pipelines=None): content = self._serialize.body(queue, 'TaskAgentQueue') response = self._send(http_method='POST', location_id='900fa995-c559-4923-aae7-f8424fe4fbea', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters, content=content) @@ -689,7 +524,7 @@ def add_agent_queue(self, queue, project=None, authorize_pipelines=None): def delete_agent_queue(self, queue_id, project=None): """DeleteAgentQueue. - Removes an agent queue from a project. + [Preview API] Removes an agent queue from a project. :param int queue_id: The agent queue to remove :param str project: Project ID or project name """ @@ -700,16 +535,16 @@ def delete_agent_queue(self, queue_id, project=None): route_values['queueId'] = self._serialize.url('queue_id', queue_id, 'int') self._send(http_method='DELETE', location_id='900fa995-c559-4923-aae7-f8424fe4fbea', - version='7.0', + version='7.2-preview.1', route_values=route_values) def get_agent_queue(self, queue_id, project=None, action_filter=None): """GetAgentQueue. - Get information about an agent queue. + [Preview API] Get information about an agent queue. :param int queue_id: The agent queue to get information about :param str project: Project ID or project name :param str action_filter: Filter by whether the calling user has use or manage permissions - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -721,14 +556,14 @@ def get_agent_queue(self, queue_id, project=None, action_filter=None): query_parameters['actionFilter'] = self._serialize.query('action_filter', action_filter, 'str') response = self._send(http_method='GET', location_id='900fa995-c559-4923-aae7-f8424fe4fbea', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('TaskAgentQueue', response) def get_agent_queues(self, project=None, queue_name=None, action_filter=None): """GetAgentQueues. - Get a list of agent queues. + [Preview API] Get a list of agent queues. :param str project: Project ID or project name :param str queue_name: Filter on the agent queue name :param str action_filter: Filter by whether the calling user has use or manage permissions @@ -744,14 +579,14 @@ def get_agent_queues(self, project=None, queue_name=None, action_filter=None): query_parameters['actionFilter'] = self._serialize.query('action_filter', action_filter, 'str') response = self._send(http_method='GET', location_id='900fa995-c559-4923-aae7-f8424fe4fbea', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TaskAgentQueue]', self._unwrap_collection(response)) def get_agent_queues_by_ids(self, queue_ids, project=None, action_filter=None): """GetAgentQueuesByIds. - Get a list of agent queues by their IDs + [Preview API] Get a list of agent queues by their IDs :param [int] queue_ids: A comma-separated list of agent queue IDs to retrieve :param str project: Project ID or project name :param str action_filter: Filter by whether the calling user has use or manage permissions @@ -768,14 +603,14 @@ def get_agent_queues_by_ids(self, queue_ids, project=None, action_filter=None): query_parameters['actionFilter'] = self._serialize.query('action_filter', action_filter, 'str') response = self._send(http_method='GET', location_id='900fa995-c559-4923-aae7-f8424fe4fbea', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TaskAgentQueue]', self._unwrap_collection(response)) def get_agent_queues_by_names(self, queue_names, project=None, action_filter=None): """GetAgentQueuesByNames. - Get a list of agent queues by their names + [Preview API] Get a list of agent queues by their names :param [str] queue_names: A comma-separated list of agent names to retrieve :param str project: Project ID or project name :param str action_filter: Filter by whether the calling user has use or manage permissions @@ -792,14 +627,14 @@ def get_agent_queues_by_names(self, queue_names, project=None, action_filter=Non query_parameters['actionFilter'] = self._serialize.query('action_filter', action_filter, 'str') response = self._send(http_method='GET', location_id='900fa995-c559-4923-aae7-f8424fe4fbea', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TaskAgentQueue]', self._unwrap_collection(response)) def get_agent_queues_for_pools(self, pool_ids, project=None, action_filter=None): """GetAgentQueuesForPools. - Get a list of agent queues by pool ids + [Preview API] Get a list of agent queues by pool ids :param [int] pool_ids: A comma-separated list of pool ids to get the corresponding queues for :param str project: Project ID or project name :param str action_filter: Filter by whether the calling user has use or manage permissions @@ -816,13 +651,14 @@ def get_agent_queues_for_pools(self, pool_ids, project=None, action_filter=None) query_parameters['actionFilter'] = self._serialize.query('action_filter', action_filter, 'str') response = self._send(http_method='GET', location_id='900fa995-c559-4923-aae7-f8424fe4fbea', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TaskAgentQueue]', self._unwrap_collection(response)) def get_agent_cloud_requests(self, agent_cloud_id): """GetAgentCloudRequests. + [Preview API] :param int agent_cloud_id: :rtype: [TaskAgentCloudRequest] """ @@ -831,13 +667,13 @@ def get_agent_cloud_requests(self, agent_cloud_id): route_values['agentCloudId'] = self._serialize.url('agent_cloud_id', agent_cloud_id, 'int') response = self._send(http_method='GET', location_id='20189bd7-5134-49c2-b8e9-f9e856eea2b2', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('[TaskAgentCloudRequest]', self._unwrap_collection(response)) def delete_deployment_target(self, project, deployment_group_id, target_id): """DeleteDeploymentTarget. - Delete a deployment target in a deployment group. This deletes the agent from associated deployment pool too. + [Preview API] Delete a deployment target in a deployment group. This deletes the agent from associated deployment pool too. :param str project: Project ID or project name :param int deployment_group_id: ID of the deployment group in which deployment target is deleted. :param int target_id: ID of the deployment target to delete. @@ -851,17 +687,17 @@ def delete_deployment_target(self, project, deployment_group_id, target_id): route_values['targetId'] = self._serialize.url('target_id', target_id, 'int') self._send(http_method='DELETE', location_id='2f0aa599-c121-4256-a5fd-ba370e0ae7b6', - version='7.0', + version='7.2-preview.1', route_values=route_values) def get_deployment_target(self, project, deployment_group_id, target_id, expand=None): """GetDeploymentTarget. - Get a deployment target by its ID in a deployment group + [Preview API] Get a deployment target by its ID in a deployment group :param str project: Project ID or project name :param int deployment_group_id: ID of the deployment group to which deployment target belongs. :param int target_id: ID of the deployment target to return. :param str expand: Include these additional details in the returned objects. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -875,14 +711,14 @@ def get_deployment_target(self, project, deployment_group_id, target_id, expand= query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') response = self._send(http_method='GET', location_id='2f0aa599-c121-4256-a5fd-ba370e0ae7b6', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('DeploymentMachine', response) def get_deployment_targets(self, project, deployment_group_id, tags=None, name=None, partial_name_match=None, expand=None, agent_status=None, agent_job_result=None, continuation_token=None, top=None, enabled=None, property_filters=None): """GetDeploymentTargets. - Get a list of deployment targets in a deployment group. + [Preview API] Get a list of deployment targets in a deployment group. :param str project: Project ID or project name :param int deployment_group_id: ID of the deployment group. :param [str] tags: Get only the deployment targets that contain all these comma separted list of tags. @@ -895,7 +731,7 @@ def get_deployment_targets(self, project, deployment_group_id, tags=None, name=N :param int top: Maximum number of deployment targets to return. Default is **1000**. :param bool enabled: Get only deployment targets that are enabled or disabled. Default is 'null' which returns all the targets. :param [str] property_filters: - :rtype: :class:`<[DeploymentMachine]> ` + :rtype: :class:`<[DeploymentMachine]> ` """ route_values = {} if project is not None: @@ -927,14 +763,14 @@ def get_deployment_targets(self, project, deployment_group_id, tags=None, name=N query_parameters['propertyFilters'] = self._serialize.query('property_filters', property_filters, 'str') response = self._send(http_method='GET', location_id='2f0aa599-c121-4256-a5fd-ba370e0ae7b6', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[DeploymentMachine]', self._unwrap_collection(response)) def update_deployment_targets(self, machines, project, deployment_group_id): """UpdateDeploymentTargets. - Update tags of a list of deployment targets in a deployment group. + [Preview API] Update tags of a list of deployment targets in a deployment group. :param [DeploymentTargetUpdateParameter] machines: Deployment targets with tags to udpdate. :param str project: Project ID or project name :param int deployment_group_id: ID of the deployment group in which deployment targets are updated. @@ -948,17 +784,17 @@ def update_deployment_targets(self, machines, project, deployment_group_id): content = self._serialize.body(machines, '[DeploymentTargetUpdateParameter]') response = self._send(http_method='PATCH', location_id='2f0aa599-c121-4256-a5fd-ba370e0ae7b6', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('[DeploymentMachine]', self._unwrap_collection(response)) def add_task_group(self, task_group, project): """AddTaskGroup. - Create a task group. - :param :class:` ` task_group: Task group object to create. + [Preview API] Create a task group. + :param :class:` ` task_group: Task group object to create. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -966,14 +802,14 @@ def add_task_group(self, task_group, project): content = self._serialize.body(task_group, 'TaskGroupCreateParameter') response = self._send(http_method='POST', location_id='6c08ffbf-dbf1-4f9a-94e5-a1cbd47005e7', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('TaskGroup', response) def delete_task_group(self, project, task_group_id, comment=None): """DeleteTaskGroup. - Delete a task group. + [Preview API] Delete a task group. :param str project: Project ID or project name :param str task_group_id: Id of the task group to be deleted. :param str comment: Comments to delete. @@ -988,13 +824,13 @@ def delete_task_group(self, project, task_group_id, comment=None): query_parameters['comment'] = self._serialize.query('comment', comment, 'str') self._send(http_method='DELETE', location_id='6c08ffbf-dbf1-4f9a-94e5-a1cbd47005e7', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) def get_task_groups(self, project, task_group_id=None, expanded=None, task_id_filter=None, deleted=None, top=None, continuation_token=None, query_order=None): """GetTaskGroups. - List task groups. + [Preview API] List task groups. :param str project: Project ID or project name :param str task_group_id: Id of the task group. :param bool expanded: 'true' to recursively expand task groups. Default is 'false'. @@ -1025,18 +861,18 @@ def get_task_groups(self, project, task_group_id=None, expanded=None, task_id_fi query_parameters['queryOrder'] = self._serialize.query('query_order', query_order, 'str') response = self._send(http_method='GET', location_id='6c08ffbf-dbf1-4f9a-94e5-a1cbd47005e7', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TaskGroup]', self._unwrap_collection(response)) def update_task_group(self, task_group, project, task_group_id=None): """UpdateTaskGroup. - Update a task group. - :param :class:` ` task_group: Task group to update. + [Preview API] Update a task group. + :param :class:` ` task_group: Task group to update. :param str project: Project ID or project name :param str task_group_id: Id of the task group to update. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -1046,27 +882,27 @@ def update_task_group(self, task_group, project, task_group_id=None): content = self._serialize.body(task_group, 'TaskGroupUpdateParameter') response = self._send(http_method='PUT', location_id='6c08ffbf-dbf1-4f9a-94e5-a1cbd47005e7', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('TaskGroup', response) def add_variable_group(self, variable_group_parameters): """AddVariableGroup. - Add a variable group. - :param :class:` ` variable_group_parameters: - :rtype: :class:` ` + [Preview API] Add a variable group. + :param :class:` ` variable_group_parameters: + :rtype: :class:` ` """ content = self._serialize.body(variable_group_parameters, 'VariableGroupParameters') response = self._send(http_method='POST', location_id='ef5b7057-ffc3-4c77-bbad-c10b4a4abcc7', - version='7.0', + version='7.2-preview.2', content=content) return self._deserialize('VariableGroup', response) def delete_variable_group(self, group_id, project_ids): """DeleteVariableGroup. - Delete a variable group + [Preview API] Delete a variable group :param int group_id: Id of the variable group. :param [str] project_ids: """ @@ -1079,13 +915,13 @@ def delete_variable_group(self, group_id, project_ids): query_parameters['projectIds'] = self._serialize.query('project_ids', project_ids, 'str') self._send(http_method='DELETE', location_id='ef5b7057-ffc3-4c77-bbad-c10b4a4abcc7', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters) def share_variable_group(self, variable_group_project_references, variable_group_id): """ShareVariableGroup. - Add a variable group. + [Preview API] Add a variable group. :param [VariableGroupProjectReference] variable_group_project_references: :param int variable_group_id: """ @@ -1095,16 +931,16 @@ def share_variable_group(self, variable_group_project_references, variable_group content = self._serialize.body(variable_group_project_references, '[VariableGroupProjectReference]') self._send(http_method='PATCH', location_id='ef5b7057-ffc3-4c77-bbad-c10b4a4abcc7', - version='7.0', + version='7.2-preview.2', query_parameters=query_parameters, content=content) def update_variable_group(self, variable_group_parameters, group_id): """UpdateVariableGroup. - Update a variable group. - :param :class:` ` variable_group_parameters: + [Preview API] Update a variable group. + :param :class:` ` variable_group_parameters: :param int group_id: Id of the variable group to update. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if group_id is not None: @@ -1112,17 +948,17 @@ def update_variable_group(self, variable_group_parameters, group_id): content = self._serialize.body(variable_group_parameters, 'VariableGroupParameters') response = self._send(http_method='PUT', location_id='ef5b7057-ffc3-4c77-bbad-c10b4a4abcc7', - version='7.0', + version='7.2-preview.2', route_values=route_values, content=content) return self._deserialize('VariableGroup', response) def get_variable_group(self, project, group_id): """GetVariableGroup. - Get a variable group. + [Preview API] Get a variable group. :param str project: Project ID or project name :param int group_id: Id of the variable group. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -1131,13 +967,13 @@ def get_variable_group(self, project, group_id): route_values['groupId'] = self._serialize.url('group_id', group_id, 'int') response = self._send(http_method='GET', location_id='f5b09dd5-9d54-45a1-8b5a-1c8287d634cc', - version='7.0', + version='7.2-preview.2', route_values=route_values) return self._deserialize('VariableGroup', response) def get_variable_groups(self, project, group_name=None, action_filter=None, top=None, continuation_token=None, query_order=None): """GetVariableGroups. - Get variable groups. + [Preview API] Get variable groups. :param str project: Project ID or project name :param str group_name: Name of variable group. :param str action_filter: Action filter for the variable group. It specifies the action which can be performed on the variable groups. @@ -1162,14 +998,14 @@ def get_variable_groups(self, project, group_name=None, action_filter=None, top= query_parameters['queryOrder'] = self._serialize.query('query_order', query_order, 'str') response = self._send(http_method='GET', location_id='f5b09dd5-9d54-45a1-8b5a-1c8287d634cc', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[VariableGroup]', self._unwrap_collection(response)) def get_variable_groups_by_id(self, project, group_ids): """GetVariableGroupsById. - Get variable groups by ids. + [Preview API] Get variable groups by ids. :param str project: Project ID or project name :param [int] group_ids: Comma separated list of Ids of variable groups. :rtype: [VariableGroup] @@ -1183,14 +1019,14 @@ def get_variable_groups_by_id(self, project, group_ids): query_parameters['groupIds'] = self._serialize.query('group_ids', group_ids, 'str') response = self._send(http_method='GET', location_id='f5b09dd5-9d54-45a1-8b5a-1c8287d634cc', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[VariableGroup]', self._unwrap_collection(response)) def get_yaml_schema(self, validate_task_names=None): """GetYamlSchema. - GET the Yaml schema used for Yaml file validation. + [Preview API] GET the Yaml schema used for Yaml file validation. :param bool validate_task_names: Whether the schema should validate that tasks are actually installed (useful for offline tools where you don't want validation). :rtype: object """ @@ -1199,7 +1035,7 @@ def get_yaml_schema(self, validate_task_names=None): query_parameters['validateTaskNames'] = self._serialize.query('validate_task_names', validate_task_names, 'bool') response = self._send(http_method='GET', location_id='1f9990b9-1dba-441f-9c2e-6485888c42b6', - version='7.0', + version='7.2-preview.1', query_parameters=query_parameters) return self._deserialize('object', response) diff --git a/azure-devops/azure/devops/v7_0/test/__init__.py b/azure-devops/azure/devops/v7_2/test/__init__.py similarity index 100% rename from azure-devops/azure/devops/v7_0/test/__init__.py rename to azure-devops/azure/devops/v7_2/test/__init__.py diff --git a/azure-devops/azure/devops/v7_0/test/models.py b/azure-devops/azure/devops/v7_2/test/models.py similarity index 94% rename from azure-devops/azure/devops/v7_0/test/models.py rename to azure-devops/azure/devops/v7_2/test/models.py index f9573697..e526b392 100644 --- a/azure-devops/azure/devops/v7_0/test/models.py +++ b/azure-devops/azure/devops/v7_2/test/models.py @@ -18,7 +18,7 @@ class AggregatedDataForResultTrend(Model): :param run_summary_by_state: :type run_summary_by_state: dict :param test_results_context: - :type test_results_context: :class:`TestResultsContext ` + :type test_results_context: :class:`TestResultsContext ` :param total_tests: :type total_tests: int """ @@ -47,11 +47,11 @@ class AggregatedResultsAnalysis(Model): :param not_reported_results_by_outcome: :type not_reported_results_by_outcome: dict :param previous_context: - :type previous_context: :class:`TestResultsContext ` + :type previous_context: :class:`TestResultsContext ` :param results_by_outcome: :type results_by_outcome: dict :param results_difference: - :type results_difference: :class:`AggregatedResultsDifference ` + :type results_difference: :class:`AggregatedResultsDifference ` :param run_summary_by_outcome: :type run_summary_by_outcome: dict :param run_summary_by_state: @@ -216,7 +216,7 @@ class BuildConfiguration(Model): :param platform: BuildConfiguration Platform. :type platform: str :param project: Project associated with this BuildConfiguration. - :type project: :class:`ShallowReference ` + :type project: :class:`ShallowReference ` :param repository_guid: Repository Guid for the Build. :type repository_guid: str :param repository_id: Repository Id. @@ -275,11 +275,11 @@ class BuildCoverage(Model): :param code_coverage_file_url: Code Coverage File Url :type code_coverage_file_url: str :param configuration: Build Configuration - :type configuration: :class:`BuildConfiguration ` + :type configuration: :class:`BuildConfiguration ` :param last_error: Last Error :type last_error: str :param modules: List of Modules - :type modules: list of :class:`ModuleCoverage ` + :type modules: list of :class:`ModuleCoverage ` :param state: State :type state: str """ @@ -347,17 +347,17 @@ class CloneOperationInformation(Model): Detail About Clone Operation. :param clone_statistics: Clone Statistics - :type clone_statistics: :class:`CloneStatistics ` + :type clone_statistics: :class:`CloneStatistics ` :param completion_date: If the operation is complete, the DateTime of completion. If operation is not complete, this is DateTime.MaxValue :type completion_date: datetime :param creation_date: DateTime when the operation was started :type creation_date: datetime :param destination_object: Shallow reference of the destination - :type destination_object: :class:`ShallowReference ` + :type destination_object: :class:`ShallowReference ` :param destination_plan: Shallow reference of the destination - :type destination_plan: :class:`ShallowReference ` + :type destination_plan: :class:`ShallowReference ` :param destination_project: Shallow reference of the destination - :type destination_project: :class:`ShallowReference ` + :type destination_project: :class:`ShallowReference ` :param message: If the operation has Failed, Message contains the reason for failure. Null otherwise. :type message: str :param op_id: The ID of the operation @@ -365,11 +365,11 @@ class CloneOperationInformation(Model): :param result_object_type: The type of the object generated as a result of the Clone operation :type result_object_type: object :param source_object: Shallow reference of the source - :type source_object: :class:`ShallowReference ` + :type source_object: :class:`ShallowReference ` :param source_plan: Shallow reference of the source - :type source_plan: :class:`ShallowReference ` + :type source_plan: :class:`ShallowReference ` :param source_project: Shallow reference of the source - :type source_project: :class:`ShallowReference ` + :type source_project: :class:`ShallowReference ` :param state: Current state of the operation. When State reaches Succeeded or Failed, the operation is complete :type state: object :param url: Url for getting the clone information @@ -490,7 +490,7 @@ class CodeCoverageData(Model): :param build_platform: Platform of build for which data is retrieved/published :type build_platform: str :param coverage_stats: List of coverage data for the build - :type coverage_stats: list of :class:`CodeCoverageStatistics ` + :type coverage_stats: list of :class:`CodeCoverageStatistics ` """ _attribute_map = { @@ -548,11 +548,13 @@ class CodeCoverageSummary(Model): Represents the code coverage summary results Used to publish or retrieve code coverage summary against a build :param build: Uri of build for which data is retrieved/published - :type build: :class:`ShallowReference ` + :type build: :class:`ShallowReference ` :param coverage_data: List of coverage data and details for the build - :type coverage_data: list of :class:`CodeCoverageData ` + :type coverage_data: list of :class:`CodeCoverageData ` + :param coverage_detailed_summary_status: + :type coverage_detailed_summary_status: object :param delta_build: Uri of build against which difference in coverage is computed - :type delta_build: :class:`ShallowReference ` + :type delta_build: :class:`ShallowReference ` :param status: Uri of build against which difference in coverage is computed :type status: object """ @@ -560,14 +562,16 @@ class CodeCoverageSummary(Model): _attribute_map = { 'build': {'key': 'build', 'type': 'ShallowReference'}, 'coverage_data': {'key': 'coverageData', 'type': '[CodeCoverageData]'}, + 'coverage_detailed_summary_status': {'key': 'coverageDetailedSummaryStatus', 'type': 'object'}, 'delta_build': {'key': 'deltaBuild', 'type': 'ShallowReference'}, 'status': {'key': 'status', 'type': 'object'} } - def __init__(self, build=None, coverage_data=None, delta_build=None, status=None): + def __init__(self, build=None, coverage_data=None, coverage_detailed_summary_status=None, delta_build=None, status=None): super(CodeCoverageSummary, self).__init__() self.build = build self.coverage_data = coverage_data + self.coverage_detailed_summary_status = coverage_detailed_summary_status self.delta_build = delta_build self.status = status @@ -681,11 +685,11 @@ class FailingSince(Model): Failing since information of a test result. :param build: Build reference since failing. - :type build: :class:`BuildReference ` + :type build: :class:`BuildReference ` :param date: Time since failing(UTC). :type date: datetime :param release: Release reference since failing. - :type release: :class:`ReleaseReference ` + :type release: :class:`ReleaseReference ` """ _attribute_map = { @@ -731,7 +735,7 @@ class FunctionCoverage(Model): :param source_file: :type source_file: str :param statistics: - :type statistics: :class:`CoverageStatistics ` + :type statistics: :class:`CoverageStatistics ` """ _attribute_map = { @@ -754,7 +758,7 @@ def __init__(self, class_=None, name=None, namespace=None, source_file=None, sta class GraphSubjectBase(Model): """ :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. :type descriptor: str :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. @@ -781,7 +785,7 @@ def __init__(self, _links=None, descriptor=None, display_name=None, url=None): class IdentityRef(GraphSubjectBase): """ :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. :type descriptor: str :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. @@ -867,7 +871,7 @@ class LastResultDetails(Model): :param duration: Duration of the last result in milliseconds. :type duration: long :param run_by: The user who executed the last result. - :type run_by: :class:`IdentityRef ` + :type run_by: :class:`IdentityRef ` """ _attribute_map = { @@ -931,7 +935,7 @@ class LinkedWorkItemsQueryResult(Model): :param test_case_id: :type test_case_id: int :param work_items: - :type work_items: list of :class:`WorkItemReference ` + :type work_items: list of :class:`WorkItemReference ` """ _attribute_map = { @@ -962,7 +966,7 @@ class ModuleCoverage(Model): :param file_url: Code Coverage File Url :type file_url: str :param functions: - :type functions: list of :class:`FunctionCoverage ` + :type functions: list of :class:`FunctionCoverage ` :param name: :type name: str :param signature: @@ -970,7 +974,7 @@ class ModuleCoverage(Model): :param signature_age: :type signature_age: int :param statistics: - :type statistics: :class:`CoverageStatistics ` + :type statistics: :class:`CoverageStatistics ` """ _attribute_map = { @@ -1043,13 +1047,13 @@ class PipelineReference(Model): Pipeline reference :param job_reference: Reference of the job - :type job_reference: :class:`JobReference ` + :type job_reference: :class:`JobReference ` :param phase_reference: Reference of the phase. - :type phase_reference: :class:`PhaseReference ` + :type phase_reference: :class:`PhaseReference ` :param pipeline_id: Reference of the pipeline with which this pipeline instance is related. :type pipeline_id: int :param stage_reference: Reference of the stage. - :type stage_reference: :class:`StageReference ` + :type stage_reference: :class:`StageReference ` """ _attribute_map = { @@ -1072,15 +1076,15 @@ class PlanUpdateModel(Model): A model class used for creating and updating test plans. :param area: Area path to which the test plan belongs. This should be set to area path of the team that works on this test plan. - :type area: :class:`ShallowReference ` + :type area: :class:`ShallowReference ` :param automated_test_environment: - :type automated_test_environment: :class:`TestEnvironment ` + :type automated_test_environment: :class:`TestEnvironment ` :param automated_test_settings: - :type automated_test_settings: :class:`TestSettings ` + :type automated_test_settings: :class:`TestSettings ` :param build: Build ID of the build whose quality is tested by the tests in this test plan. For automated testing, this build ID is used to find the test binaries that contain automated test methods. - :type build: :class:`ShallowReference ` + :type build: :class:`ShallowReference ` :param build_definition: The Build Definition that generates a build associated with this test plan. - :type build_definition: :class:`ShallowReference ` + :type build_definition: :class:`ShallowReference ` :param configuration_ids: IDs of configurations to be applied when new test suites and test cases are added to the test plan. :type configuration_ids: list of int :param description: Description of the test plan. @@ -1090,15 +1094,15 @@ class PlanUpdateModel(Model): :param iteration: Iteration path assigned to the test plan. This indicates when the target iteration by which the testing in this plan is supposed to be complete and the product is ready to be released. :type iteration: str :param manual_test_environment: - :type manual_test_environment: :class:`TestEnvironment ` + :type manual_test_environment: :class:`TestEnvironment ` :param manual_test_settings: - :type manual_test_settings: :class:`TestSettings ` + :type manual_test_settings: :class:`TestSettings ` :param name: Name of the test plan. :type name: str :param owner: Owner of the test plan. - :type owner: :class:`IdentityRef ` + :type owner: :class:`IdentityRef ` :param release_environment_definition: Release Environment to be used to deploy the build and run automated tests from this test plan. - :type release_environment_definition: :class:`ReleaseEnvironmentDefinitionReference ` + :type release_environment_definition: :class:`ReleaseEnvironmentDefinitionReference ` :param start_date: Start date for the test plan. :type start_date: str :param state: State of the test plan. @@ -1106,7 +1110,7 @@ class PlanUpdateModel(Model): :param status: :type status: str :param test_outcome_settings: Test Outcome settings - :type test_outcome_settings: :class:`TestOutcomeSettings ` + :type test_outcome_settings: :class:`TestOutcomeSettings ` """ _attribute_map = { @@ -1157,9 +1161,9 @@ class PointAssignment(Model): Adding test cases to a suite creates one of more test points based on the default configurations and testers assigned to the test suite. PointAssignment is the list of test points that were created for each of the test cases that were added to the test suite. :param configuration: Configuration that was assigned to the test case. - :type configuration: :class:`ShallowReference ` + :type configuration: :class:`ShallowReference ` :param tester: Tester that was assigned to the test case - :type tester: :class:`IdentityRef ` + :type tester: :class:`IdentityRef ` """ _attribute_map = { @@ -1182,7 +1186,7 @@ class PointsFilter(Model): :param testcase_ids: List of test case id for filtering. :type testcase_ids: list of int :param testers: List of tester for filtering. - :type testers: list of :class:`IdentityRef ` + :type testers: list of :class:`IdentityRef ` """ _attribute_map = { @@ -1207,7 +1211,7 @@ class PointUpdateModel(Model): :param reset_to_active: Reset test point to active. :type reset_to_active: bool :param tester: Tester to update. Type IdentityRef. - :type tester: :class:`IdentityRef ` + :type tester: :class:`IdentityRef ` """ _attribute_map = { @@ -1353,7 +1357,7 @@ class ResultRetentionSettings(Model): :param automated_results_retention_duration: Automated test result retention duration in days :type automated_results_retention_duration: int :param last_updated_by: Last Updated by identity - :type last_updated_by: :class:`IdentityRef ` + :type last_updated_by: :class:`IdentityRef ` :param last_updated_date: Last updated date :type last_updated_date: datetime :param manual_results_retention_duration: Manual test result retention duration in days @@ -1398,7 +1402,7 @@ class ResultsFilter(Model): :param test_point_ids: :type test_point_ids: list of int :param test_results_context: - :type test_results_context: :class:`TestResultsContext ` + :type test_results_context: :class:`TestResultsContext ` :param trend_days: :type trend_days: int """ @@ -1441,7 +1445,7 @@ class RunCreateModel(Model): :param automated: true if test run is automated, false otherwise. By default it will be false. :type automated: bool :param build: An abstracted reference to the build that it belongs. - :type build: :class:`ShallowReference ` + :type build: :class:`ShallowReference ` :param build_drop_location: Drop location of the build used for test run. :type build_drop_location: str :param build_flavor: Flavor of the build used for test run. (E.g: Release, Debug) @@ -1449,7 +1453,7 @@ class RunCreateModel(Model): :param build_platform: Platform of the build used for test run. (E.g.: x86, amd64) :type build_platform: str :param build_reference: BuildReference of the test run. - :type build_reference: :class:`BuildConfiguration ` + :type build_reference: :class:`BuildConfiguration ` :param comment: Comments entered by those analyzing the run. :type comment: str :param complete_date: Completed date time of the run. @@ -1459,39 +1463,39 @@ class RunCreateModel(Model): :param controller: Name of the test controller used for automated run. :type controller: str :param custom_test_fields: Additional properties of test Run. - :type custom_test_fields: list of :class:`CustomTestField ` + :type custom_test_fields: list of :class:`CustomTestField ` :param dtl_aut_environment: An abstracted reference to DtlAutEnvironment. - :type dtl_aut_environment: :class:`ShallowReference ` + :type dtl_aut_environment: :class:`ShallowReference ` :param dtl_test_environment: An abstracted reference to DtlTestEnvironment. - :type dtl_test_environment: :class:`ShallowReference ` + :type dtl_test_environment: :class:`ShallowReference ` :param due_date: Due date and time for test run. :type due_date: str :param environment_details: - :type environment_details: :class:`DtlEnvironmentDetails ` + :type environment_details: :class:`DtlEnvironmentDetails ` :param error_message: Error message associated with the run. :type error_message: str :param filter: Filter used for discovering the Run. - :type filter: :class:`RunFilter ` + :type filter: :class:`RunFilter ` :param iteration: The iteration in which to create the run. Root iteration of the team project will be default :type iteration: str :param name: Name of the test run. :type name: str :param owner: Display name of the owner of the run. - :type owner: :class:`IdentityRef ` + :type owner: :class:`IdentityRef ` :param pipeline_reference: Reference of the pipeline to which this test run belongs. PipelineReference.PipelineId should be equal to RunCreateModel.Build.Id - :type pipeline_reference: :class:`PipelineReference ` + :type pipeline_reference: :class:`PipelineReference ` :param plan: An abstracted reference to the plan that it belongs. - :type plan: :class:`ShallowReference ` + :type plan: :class:`ShallowReference ` :param point_ids: IDs of the test points to use in the run. :type point_ids: list of int :param release_environment_uri: URI of release environment associated with the run. :type release_environment_uri: str :param release_reference: Reference to release associated with test run. - :type release_reference: :class:`ReleaseReference ` + :type release_reference: :class:`ReleaseReference ` :param release_uri: URI of release associated with the run. :type release_uri: str :param run_summary: Run summary for run Type = NoConfigRun. - :type run_summary: list of :class:`RunSummaryModel ` + :type run_summary: list of :class:`RunSummaryModel ` :param run_timeout: Timespan till the run times out. :type run_timeout: object :param source_workflow: SourceWorkFlow(CI/CD) of the test run. @@ -1501,13 +1505,13 @@ class RunCreateModel(Model): :param state: The state of the run. Type TestRunState Valid states - NotStarted, InProgress, Waiting :type state: str :param tags: Tags to attach with the test run, maximum of 5 tags can be added to run. - :type tags: list of :class:`TestTag ` + :type tags: list of :class:`TestTag ` :param test_configurations_mapping: TestConfigurationMapping of the test run. :type test_configurations_mapping: str :param test_environment_id: ID of the test environment associated with the run. :type test_environment_id: str :param test_settings: An abstracted reference to the test settings resource. - :type test_settings: :class:`ShallowReference ` + :type test_settings: :class:`ShallowReference ` :param type: Type of the run(RunType) Valid Values : (Unspecified, Normal, Blocking, Web, MtrRunInitiatedFromWeb, RunWithDtlEnv, NoConfigRun) :type type: str """ @@ -1621,7 +1625,7 @@ class RunStatistic(Model): :param outcome: Test result outcome :type outcome: str :param resolution_state: Test run Resolution State. - :type resolution_state: :class:`TestResolutionState ` + :type resolution_state: :class:`TestResolutionState ` :param result_metadata: ResultMetadata for the given outcome/count. :type result_metadata: object :param state: State of the test run @@ -1673,7 +1677,7 @@ def __init__(self, duration=None, result_count=None, test_outcome=None): class RunUpdateModel(Model): """ :param build: An abstracted reference to the build that it belongs. - :type build: :class:`ShallowReference ` + :type build: :class:`ShallowReference ` :param build_drop_location: Drop location of the build used for test run. :type build_drop_location: str :param build_flavor: Flavor of the build used for test run. (E.g: Release, Debug) @@ -1689,11 +1693,11 @@ class RunUpdateModel(Model): :param delete_in_progress_results: true to delete inProgess Results , false otherwise. :type delete_in_progress_results: bool :param dtl_aut_environment: An abstracted reference to DtlAutEnvironment. - :type dtl_aut_environment: :class:`ShallowReference ` + :type dtl_aut_environment: :class:`ShallowReference ` :param dtl_environment: An abstracted reference to DtlEnvironment. - :type dtl_environment: :class:`ShallowReference ` + :type dtl_environment: :class:`ShallowReference ` :param dtl_environment_details: - :type dtl_environment_details: :class:`DtlEnvironmentDetails ` + :type dtl_environment_details: :class:`DtlEnvironmentDetails ` :param due_date: Due date and time for test run. :type due_date: str :param error_message: Error message associated with the run. @@ -1701,7 +1705,7 @@ class RunUpdateModel(Model): :param iteration: The iteration in which to create the run. :type iteration: str :param log_entries: Log entries associated with the run. Use a comma-separated list of multiple log entry objects. { logEntry }, { logEntry }, ... - :type log_entries: list of :class:`TestMessageLogDetails ` + :type log_entries: list of :class:`TestMessageLogDetails ` :param name: Name of the test run. :type name: str :param release_environment_uri: URI of release environment associated with the run. @@ -1709,7 +1713,7 @@ class RunUpdateModel(Model): :param release_uri: URI of release associated with the run. :type release_uri: str :param run_summary: Run summary for run Type = NoConfigRun. - :type run_summary: list of :class:`RunSummaryModel ` + :type run_summary: list of :class:`RunSummaryModel ` :param source_workflow: SourceWorkFlow(CI/CD) of the test run. :type source_workflow: str :param started_date: Start date time of the run. @@ -1719,11 +1723,11 @@ class RunUpdateModel(Model): :param substate: The types of sub states for test run. :type substate: object :param tags: Tags to attach with the test run. - :type tags: list of :class:`TestTag ` + :type tags: list of :class:`TestTag ` :param test_environment_id: ID of the test environment associated with the run. :type test_environment_id: str :param test_settings: An abstracted reference to test setting resource. - :type test_settings: :class:`ShallowReference ` + :type test_settings: :class:`ShallowReference ` """ _attribute_map = { @@ -1999,9 +2003,9 @@ class SuiteTestCase(Model): Test case for the suite. :param point_assignments: Point Assignment for test suite's test case. - :type point_assignments: list of :class:`PointAssignment ` + :type point_assignments: list of :class:`PointAssignment ` :param test_case: Test case workItem reference. - :type test_case: :class:`WorkItemReference ` + :type test_case: :class:`WorkItemReference ` """ _attribute_map = { @@ -2020,7 +2024,7 @@ class SuiteTestCaseUpdateModel(Model): Test suite update model. :param configurations: Shallow reference of configurations for the test cases in the suite. - :type configurations: list of :class:`ShallowReference ` + :type configurations: list of :class:`ShallowReference ` """ _attribute_map = { @@ -2037,15 +2041,15 @@ class SuiteUpdateModel(Model): Test suite update model. :param default_configurations: Shallow reference of default configurations for the suite. - :type default_configurations: list of :class:`ShallowReference ` + :type default_configurations: list of :class:`ShallowReference ` :param default_testers: Shallow reference of test suite. - :type default_testers: list of :class:`ShallowReference ` + :type default_testers: list of :class:`ShallowReference ` :param inherit_default_configurations: Specifies if the default configurations have to be inherited from the parent test suite in which the test suite is created. :type inherit_default_configurations: bool :param name: Test suite name :type name: str :param parent: Shallow reference of the parent. - :type parent: :class:`ShallowReference ` + :type parent: :class:`ShallowReference ` :param query_string: For query based suites, the new query string. :type query_string: str """ @@ -2247,9 +2251,9 @@ class TestCaseResult(Model): :param afn_strip_id: Test attachment ID of action recording. :type afn_strip_id: int :param area: Reference to area path of test. - :type area: :class:`ShallowReference ` + :type area: :class:`ShallowReference ` :param associated_bugs: Reference to bugs linked to test result. - :type associated_bugs: list of :class:`ShallowReference ` + :type associated_bugs: list of :class:`ShallowReference ` :param automated_test_id: ID representing test method in a dll. :type automated_test_id: str :param automated_test_name: Fully qualified name of test executed. @@ -2261,9 +2265,9 @@ class TestCaseResult(Model): :param automated_test_type_id: TypeId of automated test. :type automated_test_type_id: str :param build: Shallow reference to build associated with test result. - :type build: :class:`ShallowReference ` + :type build: :class:`ShallowReference ` :param build_reference: Reference to build associated with test result. - :type build_reference: :class:`BuildReference ` + :type build_reference: :class:`BuildReference ` :param comment: Comment in a test result with maxSize= 1000 chars. :type comment: str :param completed_date: Time when test execution completed(UTC). Completed date should be greater than StartedDate. @@ -2271,39 +2275,39 @@ class TestCaseResult(Model): :param computer_name: Machine name where test executed. :type computer_name: str :param configuration: Reference to test configuration. Type ShallowReference. - :type configuration: :class:`ShallowReference ` + :type configuration: :class:`ShallowReference ` :param created_date: Timestamp when test result created(UTC). :type created_date: datetime :param custom_fields: Additional properties of test result. - :type custom_fields: list of :class:`CustomTestField ` + :type custom_fields: list of :class:`CustomTestField ` :param duration_in_ms: Duration of test execution in milliseconds. If not provided value will be set as CompletedDate - StartedDate :type duration_in_ms: float :param error_message: Error message in test execution. :type error_message: str :param failing_since: Information when test results started failing. - :type failing_since: :class:`FailingSince ` + :type failing_since: :class:`FailingSince ` :param failure_type: Failure type of test result. Valid Value= (Known Issue, New Issue, Regression, Unknown, None) :type failure_type: str :param id: ID of a test result. :type id: int :param iteration_details: Test result details of test iterations used only for Manual Testing. - :type iteration_details: list of :class:`TestIterationDetailsModel ` + :type iteration_details: list of :class:`TestIterationDetailsModel ` :param last_updated_by: Reference to identity last updated test result. - :type last_updated_by: :class:`IdentityRef ` + :type last_updated_by: :class:`IdentityRef ` :param last_updated_date: Last updated datetime of test result(UTC). :type last_updated_date: datetime :param outcome: Test outcome of test result. Valid values = (Unspecified, None, Passed, Failed, Inconclusive, Timeout, Aborted, Blocked, NotExecuted, Warning, Error, NotApplicable, Paused, InProgress, NotImpacted) :type outcome: str :param owner: Reference to test owner. - :type owner: :class:`IdentityRef ` + :type owner: :class:`IdentityRef ` :param priority: Priority of test executed. :type priority: int :param project: Reference to team project. - :type project: :class:`ShallowReference ` + :type project: :class:`ShallowReference ` :param release: Shallow reference to release associated with test result. - :type release: :class:`ShallowReference ` + :type release: :class:`ShallowReference ` :param release_reference: Reference to release associated with test result. - :type release_reference: :class:`ReleaseReference ` + :type release_reference: :class:`ReleaseReference ` :param reset_count: ResetCount. :type reset_count: int :param resolution_state: Resolution state of test result. @@ -2315,7 +2319,7 @@ class TestCaseResult(Model): :param revision: Revision number of test result. :type revision: int :param run_by: Reference to identity executed the test. - :type run_by: :class:`IdentityRef ` + :type run_by: :class:`IdentityRef ` :param stack_trace: Stacktrace with maxSize= 1000 chars. :type stack_trace: str :param started_date: Time when test execution started(UTC). @@ -2323,9 +2327,9 @@ class TestCaseResult(Model): :param state: State of test result. Type TestRunState. :type state: str :param sub_results: List of sub results inside a test result, if ResultGroupType is not None, it holds corresponding type sub results. - :type sub_results: list of :class:`TestSubResult ` + :type sub_results: list of :class:`TestSubResult ` :param test_case: Reference to the test executed. - :type test_case: :class:`ShallowReference ` + :type test_case: :class:`ShallowReference ` :param test_case_reference_id: Reference ID of test used by test result. Type TestResultMetaData :type test_case_reference_id: int :param test_case_revision: TestCaseRevision Number. @@ -2333,13 +2337,13 @@ class TestCaseResult(Model): :param test_case_title: Name of test. :type test_case_title: str :param test_plan: Reference to test plan test case workitem is part of. - :type test_plan: :class:`ShallowReference ` + :type test_plan: :class:`ShallowReference ` :param test_point: Reference to the test point executed. - :type test_point: :class:`ShallowReference ` + :type test_point: :class:`ShallowReference ` :param test_run: Reference to test run. - :type test_run: :class:`ShallowReference ` + :type test_run: :class:`ShallowReference ` :param test_suite: Reference to test suite test case workitem is part of. - :type test_suite: :class:`ShallowReference ` + :type test_suite: :class:`ShallowReference ` :param url: Url of test result. :type url: str """ @@ -2520,7 +2524,7 @@ class TestCaseResultUpdateModel(Model): :param computer_name: :type computer_name: str :param custom_fields: - :type custom_fields: list of :class:`CustomTestField ` + :type custom_fields: list of :class:`CustomTestField ` :param duration_in_ms: :type duration_in_ms: str :param error_message: @@ -2530,11 +2534,11 @@ class TestCaseResultUpdateModel(Model): :param outcome: :type outcome: str :param owner: - :type owner: :class:`IdentityRef ` + :type owner: :class:`IdentityRef ` :param resolution_state: :type resolution_state: str :param run_by: - :type run_by: :class:`IdentityRef ` + :type run_by: :class:`IdentityRef ` :param stack_trace: :type stack_trace: str :param started_date: @@ -2544,7 +2548,7 @@ class TestCaseResultUpdateModel(Model): :param test_case_priority: :type test_case_priority: str :param test_result: - :type test_result: :class:`ShallowReference ` + :type test_result: :class:`ShallowReference ` """ _attribute_map = { @@ -2595,7 +2599,7 @@ class TestConfiguration(Model): Test configuration :param area: Area of the configuration - :type area: :class:`ShallowReference ` + :type area: :class:`ShallowReference ` :param description: Description of the configuration :type description: str :param id: Id of the configuration @@ -2603,21 +2607,21 @@ class TestConfiguration(Model): :param is_default: Is the configuration a default for the test plans :type is_default: bool :param last_updated_by: Last Updated By Reference - :type last_updated_by: :class:`IdentityRef ` + :type last_updated_by: :class:`IdentityRef ` :param last_updated_date: Last Updated Data :type last_updated_date: datetime :param name: Name of the configuration :type name: str :param project: Project to which the configuration belongs - :type project: :class:`ShallowReference ` - :param revision: Revision of the the configuration + :type project: :class:`ShallowReference ` + :param revision: Revision of the configuration :type revision: int :param state: State of the configuration :type state: object :param url: Url of Configuration Resource :type url: str :param values: Dictionary of Test Variable, Selected Value - :type values: list of :class:`NameValuePair ` + :type values: list of :class:`NameValuePair ` """ _attribute_map = { @@ -2677,7 +2681,7 @@ class TestFailureDetails(Model): :param count: :type count: int :param test_results: - :type test_results: list of :class:`TestCaseResultIdentifier ` + :type test_results: list of :class:`TestCaseResultIdentifier ` """ _attribute_map = { @@ -2694,13 +2698,13 @@ def __init__(self, count=None, test_results=None): class TestFailuresAnalysis(Model): """ :param existing_failures: - :type existing_failures: :class:`TestFailureDetails ` + :type existing_failures: :class:`TestFailureDetails ` :param fixed_tests: - :type fixed_tests: :class:`TestFailureDetails ` + :type fixed_tests: :class:`TestFailureDetails ` :param new_failures: - :type new_failures: :class:`TestFailureDetails ` + :type new_failures: :class:`TestFailureDetails ` :param previous_context: - :type previous_context: :class:`TestResultsContext ` + :type previous_context: :class:`TestResultsContext ` """ _attribute_map = { @@ -2758,7 +2762,7 @@ class TestHistoryQuery(Model): :param release_env_definition_id: Get the results history only for this ReleaseEnvDefinitionId. This to get used in query GroupBy should be Environment. :type release_env_definition_id: int :param results_for_group: List of TestResultHistoryForGroup which are grouped by GroupBy - :type results_for_group: list of :class:`TestResultHistoryForGroup ` + :type results_for_group: list of :class:`TestResultHistoryForGroup ` :param test_case_id: Get the results history only for this testCaseId. This to get used in query to filter the result along with automatedtestname :type test_case_id: int :param trend_days: Number of days for which history to collect. Maximum supported value is 7 days. Default is 7 days. @@ -2797,9 +2801,9 @@ class TestIterationDetailsModel(Model): Represents a test iteration result. :param action_results: Test step results in an iteration. - :type action_results: list of :class:`TestActionResultModel ` + :type action_results: list of :class:`TestActionResultModel ` :param attachments: Reference to attachments in test iteration result. - :type attachments: list of :class:`TestCaseResultAttachmentModel ` + :type attachments: list of :class:`TestCaseResultAttachmentModel ` :param comment: Comment in test iteration result. :type comment: str :param completed_date: Time when execution completed(UTC). @@ -2813,7 +2817,7 @@ class TestIterationDetailsModel(Model): :param outcome: Test outcome if test iteration result. :type outcome: str :param parameters: Test parameters in an iteration. - :type parameters: list of :class:`TestResultParameterModel ` + :type parameters: list of :class:`TestResultParameterModel ` :param started_date: Time when execution started(UTC). :type started_date: datetime :param url: Url to test iteration result. @@ -2940,15 +2944,15 @@ class TestPlan(Model): The test plan resource. :param area: Area of the test plan. - :type area: :class:`ShallowReference ` + :type area: :class:`ShallowReference ` :param automated_test_environment: - :type automated_test_environment: :class:`TestEnvironment ` + :type automated_test_environment: :class:`TestEnvironment ` :param automated_test_settings: - :type automated_test_settings: :class:`TestSettings ` + :type automated_test_settings: :class:`TestSettings ` :param build: Build to be tested. - :type build: :class:`ShallowReference ` + :type build: :class:`ShallowReference ` :param build_definition: The Build Definition that generates a build associated with this test plan. - :type build_definition: :class:`ShallowReference ` + :type build_definition: :class:`ShallowReference ` :param client_url: :type client_url: str :param description: Description of the test plan. @@ -2960,31 +2964,31 @@ class TestPlan(Model): :param iteration: Iteration path of the test plan. :type iteration: str :param manual_test_environment: - :type manual_test_environment: :class:`TestEnvironment ` + :type manual_test_environment: :class:`TestEnvironment ` :param manual_test_settings: - :type manual_test_settings: :class:`TestSettings ` + :type manual_test_settings: :class:`TestSettings ` :param name: Name of the test plan. :type name: str :param owner: Owner of the test plan. - :type owner: :class:`IdentityRef ` + :type owner: :class:`IdentityRef ` :param previous_build: - :type previous_build: :class:`ShallowReference ` + :type previous_build: :class:`ShallowReference ` :param project: Project which contains the test plan. - :type project: :class:`ShallowReference ` + :type project: :class:`ShallowReference ` :param release_environment_definition: Release Environment to be used to deploy the build and run automated tests from this test plan. - :type release_environment_definition: :class:`ReleaseEnvironmentDefinitionReference ` + :type release_environment_definition: :class:`ReleaseEnvironmentDefinitionReference ` :param revision: Revision of the test plan. :type revision: int :param root_suite: Root test suite of the test plan. - :type root_suite: :class:`ShallowReference ` + :type root_suite: :class:`ShallowReference ` :param start_date: Start date for the test plan. :type start_date: datetime :param state: State of the test plan. :type state: str :param test_outcome_settings: Value to configure how same tests across test suites under a test plan need to behave - :type test_outcome_settings: :class:`TestOutcomeSettings ` + :type test_outcome_settings: :class:`TestOutcomeSettings ` :param updated_by: - :type updated_by: :class:`IdentityRef ` + :type updated_by: :class:`IdentityRef ` :param updated_date: :type updated_date: datetime :param url: URL of the test plan resource. @@ -3051,9 +3055,9 @@ def __init__(self, area=None, automated_test_environment=None, automated_test_se class TestPlanCloneRequest(Model): """ :param destination_test_plan: - :type destination_test_plan: :class:`TestPlan ` + :type destination_test_plan: :class:`TestPlan ` :param options: - :type options: :class:`CloneOptions ` + :type options: :class:`CloneOptions ` :param suite_ids: :type suite_ids: list of int """ @@ -3076,13 +3080,13 @@ class TestPoint(Model): Test point. :param assigned_to: AssignedTo. Type IdentityRef. - :type assigned_to: :class:`IdentityRef ` + :type assigned_to: :class:`IdentityRef ` :param automated: Automated. :type automated: bool :param comment: Comment associated with test point. :type comment: str :param configuration: Configuration. Type ShallowReference. - :type configuration: :class:`ShallowReference ` + :type configuration: :class:`ShallowReference ` :param failure_type: Failure type of test point. :type failure_type: str :param id: ID of the test point. @@ -3092,17 +3096,17 @@ class TestPoint(Model): :param last_resolution_state_id: Last resolution state id of test point. :type last_resolution_state_id: int :param last_result: Last result of test point. Type ShallowReference. - :type last_result: :class:`ShallowReference ` + :type last_result: :class:`ShallowReference ` :param last_result_details: Last result details of test point. Type LastResultDetails. - :type last_result_details: :class:`LastResultDetails ` + :type last_result_details: :class:`LastResultDetails ` :param last_result_state: Last result state of test point. :type last_result_state: str :param last_run_build_number: LastRun build number of test point. :type last_run_build_number: str :param last_test_run: Last testRun of test point. Type ShallowReference. - :type last_test_run: :class:`ShallowReference ` + :type last_test_run: :class:`ShallowReference ` :param last_updated_by: Test point last updated by. Type IdentityRef. - :type last_updated_by: :class:`IdentityRef ` + :type last_updated_by: :class:`IdentityRef ` :param last_updated_date: Last updated date of test point. :type last_updated_date: datetime :param outcome: Outcome of test point. @@ -3112,11 +3116,11 @@ class TestPoint(Model): :param state: State of test point. :type state: str :param suite: Suite of test point. Type ShallowReference. - :type suite: :class:`ShallowReference ` + :type suite: :class:`ShallowReference ` :param test_case: TestCase associated to test point. Type WorkItemReference. - :type test_case: :class:`WorkItemReference ` + :type test_case: :class:`WorkItemReference ` :param test_plan: TestPlan of test point. Type ShallowReference. - :type test_plan: :class:`ShallowReference ` + :type test_plan: :class:`ShallowReference ` :param url: Test point Url. :type url: str :param work_item_properties: Work item properties of test point. @@ -3183,9 +3187,9 @@ class TestPointsQuery(Model): :param order_by: Order by results. :type order_by: str :param points: List of test points - :type points: list of :class:`TestPoint ` + :type points: list of :class:`TestPoint ` :param points_filter: Filter - :type points_filter: :class:`PointsFilter ` + :type points_filter: :class:`PointsFilter ` :param wit_fields: List of workitem fields to get. :type wit_fields: list of str """ @@ -3214,7 +3218,7 @@ class TestResolutionState(Model): :param name: Test Resolution State Name. :type name: str :param project: - :type project: :class:`ShallowReference ` + :type project: :class:`ShallowReference ` """ _attribute_map = { @@ -3233,7 +3237,7 @@ def __init__(self, id=None, name=None, project=None): class TestResultCreateModel(Model): """ :param area: - :type area: :class:`ShallowReference ` + :type area: :class:`ShallowReference ` :param associated_work_items: :type associated_work_items: list of int :param automated_test_id: @@ -3253,9 +3257,9 @@ class TestResultCreateModel(Model): :param computer_name: :type computer_name: str :param configuration: - :type configuration: :class:`ShallowReference ` + :type configuration: :class:`ShallowReference ` :param custom_fields: - :type custom_fields: list of :class:`CustomTestField ` + :type custom_fields: list of :class:`CustomTestField ` :param duration_in_ms: :type duration_in_ms: str :param error_message: @@ -3265,11 +3269,11 @@ class TestResultCreateModel(Model): :param outcome: :type outcome: str :param owner: - :type owner: :class:`IdentityRef ` + :type owner: :class:`IdentityRef ` :param resolution_state: :type resolution_state: str :param run_by: - :type run_by: :class:`IdentityRef ` + :type run_by: :class:`IdentityRef ` :param stack_trace: :type stack_trace: str :param started_date: @@ -3277,13 +3281,13 @@ class TestResultCreateModel(Model): :param state: :type state: str :param test_case: - :type test_case: :class:`ShallowReference ` + :type test_case: :class:`ShallowReference ` :param test_case_priority: :type test_case_priority: str :param test_case_title: :type test_case_title: str :param test_point: - :type test_point: :class:`ShallowReference ` + :type test_point: :class:`ShallowReference ` """ _attribute_map = { @@ -3348,9 +3352,9 @@ def __init__(self, area=None, associated_work_items=None, automated_test_id=None class TestResultDocument(Model): """ :param operation_reference: - :type operation_reference: :class:`TestOperationReference ` + :type operation_reference: :class:`TestOperationReference ` :param payload: - :type payload: :class:`TestResultPayload ` + :type payload: :class:`TestResultPayload ` """ _attribute_map = { @@ -3369,7 +3373,7 @@ class TestResultHistory(Model): :param group_by_field: :type group_by_field: str :param results_for_group: - :type results_for_group: list of :class:`TestResultHistoryDetailsForGroup ` + :type results_for_group: list of :class:`TestResultHistoryDetailsForGroup ` """ _attribute_map = { @@ -3388,7 +3392,7 @@ class TestResultHistoryDetailsForGroup(Model): :param group_by_value: :type group_by_value: object :param latest_result: - :type latest_result: :class:`TestCaseResult ` + :type latest_result: :class:`TestCaseResult ` """ _attribute_map = { @@ -3411,7 +3415,7 @@ class TestResultHistoryForGroup(Model): :param group_by_value: Name or Id of the group identifier by which results are grouped together. :type group_by_value: str :param results: List of results for GroupByValue - :type results: list of :class:`TestCaseResult ` + :type results: list of :class:`TestCaseResult ` """ _attribute_map = { @@ -3436,7 +3440,7 @@ class TestResultMetaData(Model): :param automated_test_storage: AutomatedTestStorage of test result. :type automated_test_storage: str :param flaky_identifiers: List of Flaky Identifier for TestCaseReferenceId - :type flaky_identifiers: list of :class:`TestFlakyIdentifier ` + :type flaky_identifiers: list of :class:`TestFlakyIdentifier ` :param owner: Owner of test result. :type owner: str :param priority: Priority of test result. @@ -3566,13 +3570,13 @@ def __init__(self, comment=None, name=None, stream=None): class TestResultsContext(Model): """ :param build: - :type build: :class:`BuildReference ` + :type build: :class:`BuildReference ` :param context_type: :type context_type: object :param pipeline_reference: - :type pipeline_reference: :class:`PipelineReference ` + :type pipeline_reference: :class:`PipelineReference ` :param release: - :type release: :class:`ReleaseReference ` + :type release: :class:`ReleaseReference ` """ _attribute_map = { @@ -3595,7 +3599,7 @@ class TestResultsDetails(Model): :param group_by_field: :type group_by_field: str :param results_for_group: - :type results_for_group: list of :class:`TestResultsDetailsForGroup ` + :type results_for_group: list of :class:`TestResultsDetailsForGroup ` """ _attribute_map = { @@ -3614,7 +3618,7 @@ class TestResultsDetailsForGroup(Model): :param group_by_value: :type group_by_value: object :param results: - :type results: list of :class:`TestCaseResult ` + :type results: list of :class:`TestCaseResult ` :param results_count_by_outcome: :type results_count_by_outcome: dict :param tags: @@ -3641,7 +3645,7 @@ class TestResultsGroupsForBuild(Model): :param build_id: BuildId for which groupby result is fetched. :type build_id: int :param fields: The group by results - :type fields: list of :class:`FieldDetailsForTestResults ` + :type fields: list of :class:`FieldDetailsForTestResults ` """ _attribute_map = { @@ -3658,7 +3662,7 @@ def __init__(self, build_id=None, fields=None): class TestResultsGroupsForRelease(Model): """ :param fields: The group by results - :type fields: list of :class:`FieldDetailsForTestResults ` + :type fields: list of :class:`FieldDetailsForTestResults ` :param release_env_id: Release Environment Id for which groupby result is fetched. :type release_env_id: int :param release_id: ReleaseId for which groupby result is fetched. @@ -3683,9 +3687,9 @@ class TestResultsQuery(Model): :param fields: :type fields: list of str :param results: - :type results: list of :class:`TestCaseResult ` + :type results: list of :class:`TestCaseResult ` :param results_filter: - :type results_filter: :class:`ResultsFilter ` + :type results_filter: :class:`ResultsFilter ` """ _attribute_map = { @@ -3704,15 +3708,15 @@ def __init__(self, fields=None, results=None, results_filter=None): class TestResultSummary(Model): """ :param aggregated_results_analysis: - :type aggregated_results_analysis: :class:`AggregatedResultsAnalysis ` + :type aggregated_results_analysis: :class:`AggregatedResultsAnalysis ` :param no_config_runs_count: :type no_config_runs_count: int :param team_project: - :type team_project: :class:`TeamProjectReference ` + :type team_project: :class:`TeamProjectReference ` :param test_failures: - :type test_failures: :class:`TestFailuresAnalysis ` + :type test_failures: :class:`TestFailuresAnalysis ` :param test_results_context: - :type test_results_context: :class:`TestResultsContext ` + :type test_results_context: :class:`TestResultsContext ` :param total_runs_count: :type total_runs_count: int """ @@ -3784,9 +3788,9 @@ class TestRun(Model): Test run details. :param build: Build associated with this test run. - :type build: :class:`ShallowReference ` + :type build: :class:`ShallowReference ` :param build_configuration: Build configuration details associated with this test run. - :type build_configuration: :class:`BuildConfiguration ` + :type build_configuration: :class:`BuildConfiguration ` :param comment: Comments entered by those analyzing the run. :type comment: str :param completed_date: Completed date time of the run. @@ -3796,21 +3800,21 @@ class TestRun(Model): :param created_date: Test Run CreatedDate. :type created_date: datetime :param custom_fields: List of Custom Fields for TestRun. - :type custom_fields: list of :class:`CustomTestField ` + :type custom_fields: list of :class:`CustomTestField ` :param drop_location: Drop Location for the test Run. :type drop_location: str :param dtl_aut_environment: - :type dtl_aut_environment: :class:`ShallowReference ` + :type dtl_aut_environment: :class:`ShallowReference ` :param dtl_environment: - :type dtl_environment: :class:`ShallowReference ` + :type dtl_environment: :class:`ShallowReference ` :param dtl_environment_creation_details: - :type dtl_environment_creation_details: :class:`DtlEnvironmentDetails ` + :type dtl_environment_creation_details: :class:`DtlEnvironmentDetails ` :param due_date: Due date and time for test run. :type due_date: datetime :param error_message: Error message associated with the run. :type error_message: str :param filter: - :type filter: :class:`RunFilter ` + :type filter: :class:`RunFilter ` :param id: ID of the test run. :type id: int :param incomplete_tests: Number of Incomplete Tests. @@ -3820,7 +3824,7 @@ class TestRun(Model): :param iteration: The iteration to which the run belongs. :type iteration: str :param last_updated_by: Team foundation ID of the last updated the test run. - :type last_updated_by: :class:`IdentityRef ` + :type last_updated_by: :class:`IdentityRef ` :param last_updated_date: Last updated date and time :type last_updated_date: datetime :param name: Name of the test run. @@ -3828,21 +3832,21 @@ class TestRun(Model): :param not_applicable_tests: Number of Not Applicable Tests. :type not_applicable_tests: int :param owner: Team Foundation ID of the owner of the runs. - :type owner: :class:`IdentityRef ` + :type owner: :class:`IdentityRef ` :param passed_tests: Number of passed tests in the run :type passed_tests: int :param phase: Phase/State for the testRun. :type phase: str :param pipeline_reference: Reference of the pipeline to which this test run belongs. - :type pipeline_reference: :class:`PipelineReference ` + :type pipeline_reference: :class:`PipelineReference ` :param plan: Test plan associated with this test run. - :type plan: :class:`ShallowReference ` + :type plan: :class:`ShallowReference ` :param post_process_state: Post Process State. :type post_process_state: str :param project: Project associated with this run. - :type project: :class:`ShallowReference ` + :type project: :class:`ShallowReference ` :param release: Release Reference for the Test Run. - :type release: :class:`ReleaseReference ` + :type release: :class:`ReleaseReference ` :param release_environment_uri: Release Environment Uri for TestRun. :type release_environment_uri: str :param release_uri: Release Uri for TestRun. @@ -3850,7 +3854,7 @@ class TestRun(Model): :param revision: :type revision: int :param run_statistics: RunSummary by outcome. - :type run_statistics: list of :class:`RunStatistic ` + :type run_statistics: list of :class:`RunStatistic ` :param started_date: Start date time of the run. :type started_date: datetime :param state: The state of the run. Type TestRunState Valid states - Unspecified ,NotStarted, InProgress, Completed, Waiting, Aborted, NeedsInvestigation @@ -3858,13 +3862,13 @@ class TestRun(Model): :param substate: TestRun Substate. :type substate: object :param tags: Tags attached with this test run. - :type tags: list of :class:`TestTag ` + :type tags: list of :class:`TestTag ` :param test_environment: Test environment associated with the run. - :type test_environment: :class:`TestEnvironment ` + :type test_environment: :class:`TestEnvironment ` :param test_message_log_id: :type test_message_log_id: int :param test_settings: - :type test_settings: :class:`ShallowReference ` + :type test_settings: :class:`ShallowReference ` :param total_tests: Total tests in the run :type total_tests: int :param unanalyzed_tests: Number of failed tests in the run. @@ -3979,11 +3983,11 @@ class TestRunCoverage(Model): :param last_error: Last Error :type last_error: str :param modules: List of Modules Coverage - :type modules: list of :class:`ModuleCoverage ` + :type modules: list of :class:`ModuleCoverage ` :param state: State :type state: str :param test_run: Reference of test Run. - :type test_run: :class:`ShallowReference ` + :type test_run: :class:`ShallowReference ` """ _attribute_map = { @@ -4006,9 +4010,9 @@ class TestRunStatistic(Model): Test run statistics. :param run: - :type run: :class:`ShallowReference ` + :type run: :class:`ShallowReference ` :param run_statistics: - :type run_statistics: list of :class:`RunStatistic ` + :type run_statistics: list of :class:`RunStatistic ` """ _attribute_map = { @@ -4027,7 +4031,7 @@ class TestSession(Model): Test Session :param area: Area path of the test session - :type area: :class:`ShallowReference ` + :type area: :class:`ShallowReference ` :param comment: Comments in the test session :type comment: str :param end_date: Duration of the session @@ -4035,15 +4039,15 @@ class TestSession(Model): :param id: Id of the test session :type id: int :param last_updated_by: Last Updated By Reference - :type last_updated_by: :class:`IdentityRef ` + :type last_updated_by: :class:`IdentityRef ` :param last_updated_date: Last updated date :type last_updated_date: datetime :param owner: Owner of the test session - :type owner: :class:`IdentityRef ` + :type owner: :class:`IdentityRef ` :param project: Project to which the test session belongs - :type project: :class:`ShallowReference ` + :type project: :class:`ShallowReference ` :param property_bag: Generic store for test session data - :type property_bag: :class:`PropertyBag ` + :type property_bag: :class:`PropertyBag ` :param revision: Revision of the test session :type revision: int :param source: Source of the test session @@ -4147,9 +4151,9 @@ class TestSubResult(Model): :param computer_name: Machine where test executed. :type computer_name: str :param configuration: Reference to test configuration. - :type configuration: :class:`ShallowReference ` + :type configuration: :class:`ShallowReference ` :param custom_fields: Additional properties of sub result. - :type custom_fields: list of :class:`CustomTestField ` + :type custom_fields: list of :class:`CustomTestField ` :param display_name: Name of sub result. :type display_name: str :param duration_in_ms: Duration of test execution. @@ -4173,9 +4177,9 @@ class TestSubResult(Model): :param started_date: Time when test execution started(UTC). :type started_date: datetime :param sub_results: List of sub results inside a sub result, if ResultGroupType is not None, it holds corresponding type sub results. - :type sub_results: list of :class:`TestSubResult ` + :type sub_results: list of :class:`TestSubResult ` :param test_result: Reference to test result. - :type test_result: :class:`TestCaseResultIdentifier ` + :type test_result: :class:`TestCaseResultIdentifier ` :param url: Url of sub result. :type url: str """ @@ -4231,12 +4235,12 @@ class TestSuite(Model): :param area_uri: Area uri of the test suite. :type area_uri: str + :param children: Child test suites of current test suite. + :type children: list of :class:`TestSuite ` :param default_configurations: Test suite default configuration. - :type default_configurations: list of :class:`ShallowReference ` + :type default_configurations: list of :class:`ShallowReference ` :param default_testers: Test suite default testers. - :type default_testers: list of :class:`ShallowReference ` - :param children: Child test suites of current test suite. - :type children: list of :class:`TestSuite ` + :type default_testers: list of :class:`ShallowReference ` :param id: Id of test suite. :type id: int :param inherit_default_configurations: Default configuration was inherited or not. @@ -4246,17 +4250,17 @@ class TestSuite(Model): :param last_populated_date: Last populated date. :type last_populated_date: datetime :param last_updated_by: IdentityRef of user who has updated test suite recently. - :type last_updated_by: :class:`IdentityRef ` + :type last_updated_by: :class:`IdentityRef ` :param last_updated_date: Last update date. :type last_updated_date: datetime :param name: Name of test suite. :type name: str :param parent: Test suite parent shallow reference. - :type parent: :class:`ShallowReference ` + :type parent: :class:`ShallowReference ` :param plan: Test plan to which the test suite belongs. - :type plan: :class:`ShallowReference ` + :type plan: :class:`ShallowReference ` :param project: Test suite project shallow reference. - :type project: :class:`ShallowReference ` + :type project: :class:`ShallowReference ` :param query_string: Test suite query string, for dynamic suites. :type query_string: str :param requirement_id: Test suite requirement id. @@ -4266,7 +4270,7 @@ class TestSuite(Model): :param state: State of test suite. :type state: str :param suites: List of shallow reference of suites. - :type suites: list of :class:`ShallowReference ` + :type suites: list of :class:`ShallowReference ` :param suite_type: Test suite type. :type suite_type: str :param test_case_count: Test cases count. @@ -4281,9 +4285,9 @@ class TestSuite(Model): _attribute_map = { 'area_uri': {'key': 'areaUri', 'type': 'str'}, + 'children': {'key': 'children', 'type': '[TestSuite]'}, 'default_configurations': {'key': 'defaultConfigurations', 'type': '[ShallowReference]'}, 'default_testers': {'key': 'defaultTesters', 'type': '[ShallowReference]'}, - 'children': {'key': 'children', 'type': '[TestSuite]'}, 'id': {'key': 'id', 'type': 'int'}, 'inherit_default_configurations': {'key': 'inheritDefaultConfigurations', 'type': 'bool'}, 'last_error': {'key': 'lastError', 'type': 'str'}, @@ -4306,12 +4310,12 @@ class TestSuite(Model): 'url': {'key': 'url', 'type': 'str'} } - def __init__(self, area_uri=None, default_configurations=None, default_testers=None, children=None, id=None, inherit_default_configurations=None, last_error=None, last_populated_date=None, last_updated_by=None, last_updated_date=None, name=None, parent=None, plan=None, project=None, query_string=None, requirement_id=None, revision=None, state=None, suites=None, suite_type=None, test_case_count=None, test_cases_url=None, text=None, url=None): + def __init__(self, area_uri=None, children=None, default_configurations=None, default_testers=None, id=None, inherit_default_configurations=None, last_error=None, last_populated_date=None, last_updated_by=None, last_updated_date=None, name=None, parent=None, plan=None, project=None, query_string=None, requirement_id=None, revision=None, state=None, suites=None, suite_type=None, test_case_count=None, test_cases_url=None, text=None, url=None): super(TestSuite, self).__init__() self.area_uri = area_uri + self.children = children self.default_configurations = default_configurations self.default_testers = default_testers - self.children = children self.id = id self.inherit_default_configurations = inherit_default_configurations self.last_error = last_error @@ -4339,7 +4343,7 @@ class TestSuiteCloneRequest(Model): Test suite clone request :param clone_options: Clone options for cloning the test suite. - :type clone_options: :class:`CloneOptions ` + :type clone_options: :class:`CloneOptions ` :param destination_suite_id: Suite id under which, we have to clone the suite. :type destination_suite_id: int :param destination_suite_project_name: Destination suite project name. @@ -4362,9 +4366,9 @@ def __init__(self, clone_options=None, destination_suite_id=None, destination_su class TestSummaryForWorkItem(Model): """ :param summary: - :type summary: :class:`AggregatedDataForResultTrend ` + :type summary: :class:`AggregatedDataForResultTrend ` :param work_item: - :type work_item: :class:`WorkItemReference ` + :type work_item: :class:`WorkItemReference ` """ _attribute_map = { @@ -4398,9 +4402,9 @@ def __init__(self, name=None): class TestToWorkItemLinks(Model): """ :param test: - :type test: :class:`TestMethod ` + :type test: :class:`TestMethod ` :param work_items: - :type work_items: list of :class:`WorkItemReference ` + :type work_items: list of :class:`WorkItemReference ` """ _attribute_map = { @@ -4423,7 +4427,7 @@ class TestVariable(Model): :param name: Name of the test variable :type name: str :param project: Project to which the test variable belongs - :type project: :class:`ShallowReference ` + :type project: :class:`ShallowReference ` :param revision: Revision :type revision: int :param url: Url of the test variable @@ -4491,9 +4495,9 @@ class WorkItemToTestLinks(Model): :param executed_in: :type executed_in: object :param tests: - :type tests: list of :class:`TestMethod ` + :type tests: list of :class:`TestMethod ` :param work_item: - :type work_item: :class:`WorkItemReference ` + :type work_item: :class:`WorkItemReference ` """ _attribute_map = { @@ -4530,7 +4534,7 @@ class TestActionResultModel(TestResultModelBase): :param iteration_id: Iteration ID of test action result. :type iteration_id: int :param shared_step_model: Reference to shared step workitem. - :type shared_step_model: :class:`SharedStepModel ` + :type shared_step_model: :class:`SharedStepModel ` :param step_identifier: This is step Id of test case. For shared step, it is step Id of shared step in test case workitem; step Id in shared step. Example: TestCase workitem has two steps: 1) Normal step with Id = 1 2) Shared Step with Id = 2. Inside shared step: a) Normal Step with Id = 1 Value for StepIdentifier for First step: "1" Second step: "2;1" :type step_identifier: str :param url: Url of test action result. Deprecated in hosted environment. diff --git a/azure-devops/azure/devops/v7_0/test/test_client.py b/azure-devops/azure/devops/v7_2/test/test_client.py similarity index 89% rename from azure-devops/azure/devops/v7_0/test/test_client.py rename to azure-devops/azure/devops/v7_2/test/test_client.py index e4a299a3..d06feaa4 100644 --- a/azure-devops/azure/devops/v7_0/test/test_client.py +++ b/azure-devops/azure/devops/v7_2/test/test_client.py @@ -27,12 +27,12 @@ def __init__(self, base_url=None, creds=None): def create_test_result_attachment(self, attachment_request_model, project, run_id, test_case_result_id): """CreateTestResultAttachment. - Attach a file to a test result. - :param :class:` ` attachment_request_model: Attachment details TestAttachmentRequestModel + [Preview API] Attach a file to a test result. + :param :class:` ` attachment_request_model: Attachment details TestAttachmentRequestModel :param str project: Project ID or project name :param int run_id: ID of the test run that contains the result. :param int test_case_result_id: ID of the test result against which attachment has to be uploaded. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -44,20 +44,20 @@ def create_test_result_attachment(self, attachment_request_model, project, run_i content = self._serialize.body(attachment_request_model, 'TestAttachmentRequestModel') response = self._send(http_method='POST', location_id='2bffebe9-2f0f-4639-9af8-56129e9fed2d', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('TestAttachmentReference', response) def create_test_sub_result_attachment(self, attachment_request_model, project, run_id, test_case_result_id, test_sub_result_id): """CreateTestSubResultAttachment. - Attach a file to a test result - :param :class:` ` attachment_request_model: Attachment Request Model. + [Preview API] Attach a file to a test result + :param :class:` ` attachment_request_model: Attachment Request Model. :param str project: Project ID or project name :param int run_id: ID of the test run that contains the result. :param int test_case_result_id: ID of the test results that contains sub result. :param int test_sub_result_id: ID of the test sub results against which attachment has to be uploaded. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -72,7 +72,7 @@ def create_test_sub_result_attachment(self, attachment_request_model, project, r content = self._serialize.body(attachment_request_model, 'TestAttachmentRequestModel') response = self._send(http_method='POST', location_id='2bffebe9-2f0f-4639-9af8-56129e9fed2d', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters, content=content) @@ -80,7 +80,7 @@ def create_test_sub_result_attachment(self, attachment_request_model, project, r def get_test_result_attachment_content(self, project, run_id, test_case_result_id, attachment_id, **kwargs): """GetTestResultAttachmentContent. - Download a test result attachment by its ID. + [Preview API] Download a test result attachment by its ID. :param str project: Project ID or project name :param int run_id: ID of the test run that contains the testCaseResultId. :param int test_case_result_id: ID of the test result whose attachment has to be downloaded. @@ -98,7 +98,7 @@ def get_test_result_attachment_content(self, project, run_id, test_case_result_i route_values['attachmentId'] = self._serialize.url('attachment_id', attachment_id, 'int') response = self._send(http_method='GET', location_id='2bffebe9-2f0f-4639-9af8-56129e9fed2d', - version='7.0', + version='7.2-preview.1', route_values=route_values, accept_media_type='application/octet-stream') if "callback" in kwargs: @@ -109,7 +109,7 @@ def get_test_result_attachment_content(self, project, run_id, test_case_result_i def get_test_result_attachments(self, project, run_id, test_case_result_id): """GetTestResultAttachments. - Get list of test result attachments reference. + [Preview API] Get list of test result attachments reference. :param str project: Project ID or project name :param int run_id: ID of the test run that contains the result. :param int test_case_result_id: ID of the test result. @@ -124,13 +124,13 @@ def get_test_result_attachments(self, project, run_id, test_case_result_id): route_values['testCaseResultId'] = self._serialize.url('test_case_result_id', test_case_result_id, 'int') response = self._send(http_method='GET', location_id='2bffebe9-2f0f-4639-9af8-56129e9fed2d', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('[TestAttachment]', self._unwrap_collection(response)) def get_test_result_attachment_zip(self, project, run_id, test_case_result_id, attachment_id, **kwargs): """GetTestResultAttachmentZip. - Download a test result attachment by its ID. + [Preview API] Download a test result attachment by its ID. :param str project: Project ID or project name :param int run_id: ID of the test run that contains the testCaseResultId. :param int test_case_result_id: ID of the test result whose attachment has to be downloaded. @@ -148,7 +148,7 @@ def get_test_result_attachment_zip(self, project, run_id, test_case_result_id, a route_values['attachmentId'] = self._serialize.url('attachment_id', attachment_id, 'int') response = self._send(http_method='GET', location_id='2bffebe9-2f0f-4639-9af8-56129e9fed2d', - version='7.0', + version='7.2-preview.1', route_values=route_values, accept_media_type='application/zip') if "callback" in kwargs: @@ -159,7 +159,7 @@ def get_test_result_attachment_zip(self, project, run_id, test_case_result_id, a def get_test_sub_result_attachment_content(self, project, run_id, test_case_result_id, attachment_id, test_sub_result_id, **kwargs): """GetTestSubResultAttachmentContent. - Download a test sub result attachment + [Preview API] Download a test sub result attachment :param str project: Project ID or project name :param int run_id: ID of the test run that contains the result. :param int test_case_result_id: ID of the test results that contains sub result. @@ -181,7 +181,7 @@ def get_test_sub_result_attachment_content(self, project, run_id, test_case_resu query_parameters['testSubResultId'] = self._serialize.query('test_sub_result_id', test_sub_result_id, 'int') response = self._send(http_method='GET', location_id='2bffebe9-2f0f-4639-9af8-56129e9fed2d', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters, accept_media_type='application/octet-stream') @@ -193,7 +193,7 @@ def get_test_sub_result_attachment_content(self, project, run_id, test_case_resu def get_test_sub_result_attachments(self, project, run_id, test_case_result_id, test_sub_result_id): """GetTestSubResultAttachments. - Get list of test sub result attachments + [Preview API] Get list of test sub result attachments :param str project: Project ID or project name :param int run_id: ID of the test run that contains the result. :param int test_case_result_id: ID of the test results that contains sub result. @@ -212,14 +212,14 @@ def get_test_sub_result_attachments(self, project, run_id, test_case_result_id, query_parameters['testSubResultId'] = self._serialize.query('test_sub_result_id', test_sub_result_id, 'int') response = self._send(http_method='GET', location_id='2bffebe9-2f0f-4639-9af8-56129e9fed2d', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TestAttachment]', self._unwrap_collection(response)) def get_test_sub_result_attachment_zip(self, project, run_id, test_case_result_id, attachment_id, test_sub_result_id, **kwargs): """GetTestSubResultAttachmentZip. - Download a test sub result attachment + [Preview API] Download a test sub result attachment :param str project: Project ID or project name :param int run_id: ID of the test run that contains the result. :param int test_case_result_id: ID of the test results that contains sub result. @@ -241,7 +241,7 @@ def get_test_sub_result_attachment_zip(self, project, run_id, test_case_result_i query_parameters['testSubResultId'] = self._serialize.query('test_sub_result_id', test_sub_result_id, 'int') response = self._send(http_method='GET', location_id='2bffebe9-2f0f-4639-9af8-56129e9fed2d', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters, accept_media_type='application/zip') @@ -253,11 +253,11 @@ def get_test_sub_result_attachment_zip(self, project, run_id, test_case_result_i def create_test_run_attachment(self, attachment_request_model, project, run_id): """CreateTestRunAttachment. - Attach a file to a test run. - :param :class:` ` attachment_request_model: Attachment details TestAttachmentRequestModel + [Preview API] Attach a file to a test run. + :param :class:` ` attachment_request_model: Attachment details TestAttachmentRequestModel :param str project: Project ID or project name :param int run_id: ID of the test run against which attachment has to be uploaded. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -267,14 +267,14 @@ def create_test_run_attachment(self, attachment_request_model, project, run_id): content = self._serialize.body(attachment_request_model, 'TestAttachmentRequestModel') response = self._send(http_method='POST', location_id='4f004af4-a507-489c-9b13-cb62060beb11', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('TestAttachmentReference', response) def get_test_run_attachment_content(self, project, run_id, attachment_id, **kwargs): """GetTestRunAttachmentContent. - Download a test run attachment by its ID. + [Preview API] Download a test run attachment by its ID. :param str project: Project ID or project name :param int run_id: ID of the test run whose attachment has to be downloaded. :param int attachment_id: ID of the test run attachment to be downloaded. @@ -289,7 +289,7 @@ def get_test_run_attachment_content(self, project, run_id, attachment_id, **kwar route_values['attachmentId'] = self._serialize.url('attachment_id', attachment_id, 'int') response = self._send(http_method='GET', location_id='4f004af4-a507-489c-9b13-cb62060beb11', - version='7.0', + version='7.2-preview.1', route_values=route_values, accept_media_type='application/octet-stream') if "callback" in kwargs: @@ -300,7 +300,7 @@ def get_test_run_attachment_content(self, project, run_id, attachment_id, **kwar def get_test_run_attachments(self, project, run_id): """GetTestRunAttachments. - Get list of test run attachments reference. + [Preview API] Get list of test run attachments reference. :param str project: Project ID or project name :param int run_id: ID of the test run. :rtype: [TestAttachment] @@ -312,13 +312,13 @@ def get_test_run_attachments(self, project, run_id): route_values['runId'] = self._serialize.url('run_id', run_id, 'int') response = self._send(http_method='GET', location_id='4f004af4-a507-489c-9b13-cb62060beb11', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('[TestAttachment]', self._unwrap_collection(response)) def get_test_run_attachment_zip(self, project, run_id, attachment_id, **kwargs): """GetTestRunAttachmentZip. - Download a test run attachment by its ID. + [Preview API] Download a test run attachment by its ID. :param str project: Project ID or project name :param int run_id: ID of the test run whose attachment has to be downloaded. :param int attachment_id: ID of the test run attachment to be downloaded. @@ -333,7 +333,7 @@ def get_test_run_attachment_zip(self, project, run_id, attachment_id, **kwargs): route_values['attachmentId'] = self._serialize.url('attachment_id', attachment_id, 'int') response = self._send(http_method='GET', location_id='4f004af4-a507-489c-9b13-cb62060beb11', - version='7.0', + version='7.2-preview.1', route_values=route_values, accept_media_type='application/zip') if "callback" in kwargs: @@ -344,7 +344,7 @@ def get_test_run_attachment_zip(self, project, run_id, attachment_id, **kwargs): def get_build_code_coverage(self, project, build_id, flags): """GetBuildCodeCoverage. - Get code coverage data for a build. + [Preview API] Get code coverage data for a build. :param str project: Project ID or project name :param int build_id: ID of the build for which code coverage data needs to be fetched. :param int flags: Value of flags determine the level of code coverage details to be fetched. Flags are additive. Expected Values are 1 for Modules, 2 for Functions, 4 for BlockData. @@ -360,14 +360,14 @@ def get_build_code_coverage(self, project, build_id, flags): query_parameters['flags'] = self._serialize.query('flags', flags, 'int') response = self._send(http_method='GET', location_id='77560e8a-4e8c-4d59-894e-a5f264c24444', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[BuildCoverage]', self._unwrap_collection(response)) def get_test_run_code_coverage(self, project, run_id, flags): """GetTestRunCodeCoverage. - Get code coverage data for a test run + [Preview API] Get code coverage data for a test run :param str project: Project ID or project name :param int run_id: ID of the test run for which code coverage data needs to be fetched. :param int flags: Value of flags determine the level of code coverage details to be fetched. Flags are additive. Expected Values are 1 for Modules, 2 for Functions, 4 for BlockData. @@ -383,20 +383,20 @@ def get_test_run_code_coverage(self, project, run_id, flags): query_parameters['flags'] = self._serialize.query('flags', flags, 'int') response = self._send(http_method='GET', location_id='9629116f-3b89-4ed8-b358-d4694efda160', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TestRunCoverage]', self._unwrap_collection(response)) def get_test_iteration(self, project, run_id, test_case_result_id, iteration_id, include_action_results=None): """GetTestIteration. - Get iteration for a result + [Preview API] Get iteration for a result :param str project: Project ID or project name :param int run_id: ID of the test run that contains the result. :param int test_case_result_id: ID of the test result that contains the iterations. :param int iteration_id: Id of the test results Iteration. :param bool include_action_results: Include result details for each action performed in the test iteration. ActionResults refer to outcome (pass/fail) of test steps that are executed as part of a running a manual test. Including the ActionResults flag gets the outcome of test steps in the actionResults section and test parameters in the parameters section for each test iteration. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -412,14 +412,14 @@ def get_test_iteration(self, project, run_id, test_case_result_id, iteration_id, query_parameters['includeActionResults'] = self._serialize.query('include_action_results', include_action_results, 'bool') response = self._send(http_method='GET', location_id='73eb9074-3446-4c44-8296-2f811950ff8d', - version='7.0', + version='7.2-preview.3', route_values=route_values, query_parameters=query_parameters) return self._deserialize('TestIterationDetailsModel', response) def get_test_iterations(self, project, run_id, test_case_result_id, include_action_results=None): """GetTestIterations. - Get iterations for a result + [Preview API] Get iterations for a result :param str project: Project ID or project name :param int run_id: ID of the test run that contains the result. :param int test_case_result_id: ID of the test result that contains the iterations. @@ -438,20 +438,20 @@ def get_test_iterations(self, project, run_id, test_case_result_id, include_acti query_parameters['includeActionResults'] = self._serialize.query('include_action_results', include_action_results, 'bool') response = self._send(http_method='GET', location_id='73eb9074-3446-4c44-8296-2f811950ff8d', - version='7.0', + version='7.2-preview.3', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TestIterationDetailsModel]', self._unwrap_collection(response)) def get_point(self, project, plan_id, suite_id, point_ids, wit_fields=None): """GetPoint. - Get a test point. + [Preview API] Get a test point. :param str project: Project ID or project name :param int plan_id: ID of the test plan. :param int suite_id: ID of the suite that contains the point. :param int point_ids: ID of the test point to get. :param str wit_fields: Comma-separated list of work item field names. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -467,14 +467,14 @@ def get_point(self, project, plan_id, suite_id, point_ids, wit_fields=None): query_parameters['witFields'] = self._serialize.query('wit_fields', wit_fields, 'str') response = self._send(http_method='GET', location_id='3bcfd5c8-be62-488e-b1da-b8289ce9299c', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters) return self._deserialize('TestPoint', response) def get_points(self, project, plan_id, suite_id, wit_fields=None, configuration_id=None, test_case_id=None, test_point_ids=None, include_point_details=None, skip=None, top=None): """GetPoints. - Get a list of test points. + [Preview API] Get a list of test points. :param str project: Project ID or project name :param int plan_id: ID of the test plan. :param int suite_id: ID of the suite that contains the points. @@ -511,15 +511,15 @@ def get_points(self, project, plan_id, suite_id, wit_fields=None, configuration_ query_parameters['$top'] = self._serialize.query('top', top, 'int') response = self._send(http_method='GET', location_id='3bcfd5c8-be62-488e-b1da-b8289ce9299c', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TestPoint]', self._unwrap_collection(response)) def update_test_points(self, point_update_model, project, plan_id, suite_id, point_ids): """UpdateTestPoints. - Update test points. - :param :class:` ` point_update_model: Data to update. + [Preview API] Update test points. + :param :class:` ` point_update_model: Data to update. :param str project: Project ID or project name :param int plan_id: ID of the test plan. :param int suite_id: ID of the suite that contains the points. @@ -538,19 +538,19 @@ def update_test_points(self, point_update_model, project, plan_id, suite_id, poi content = self._serialize.body(point_update_model, 'PointUpdateModel') response = self._send(http_method='PATCH', location_id='3bcfd5c8-be62-488e-b1da-b8289ce9299c', - version='7.0', + version='7.2-preview.2', route_values=route_values, content=content) return self._deserialize('[TestPoint]', self._unwrap_collection(response)) def get_points_by_query(self, query, project, skip=None, top=None): """GetPointsByQuery. - Get test points using query. - :param :class:` ` query: TestPointsQuery to get test points. + [Preview API] Get test points using query. + :param :class:` ` query: TestPointsQuery to get test points. :param str project: Project ID or project name :param int skip: Number of test points to skip.. :param int top: Number of test points to return. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -563,7 +563,7 @@ def get_points_by_query(self, query, project, skip=None, top=None): content = self._serialize.body(query, 'TestPointsQuery') response = self._send(http_method='POST', location_id='b4264fd0-a5d1-43e2-82a5-b9c46b7da9ce', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters, content=content) @@ -571,25 +571,25 @@ def get_points_by_query(self, query, project, skip=None, top=None): def get_result_retention_settings(self, project): """GetResultRetentionSettings. - Get test result retention settings + [Preview API] Get test result retention settings :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') response = self._send(http_method='GET', location_id='a3206d9e-fa8d-42d3-88cb-f75c51e69cde', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('ResultRetentionSettings', response) def update_result_retention_settings(self, retention_settings, project): """UpdateResultRetentionSettings. - Update test result retention settings - :param :class:` ` retention_settings: Test result retention settings details to be updated + [Preview API] Update test result retention settings + :param :class:` ` retention_settings: Test result retention settings details to be updated :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -597,14 +597,14 @@ def update_result_retention_settings(self, retention_settings, project): content = self._serialize.body(retention_settings, 'ResultRetentionSettings') response = self._send(http_method='PATCH', location_id='a3206d9e-fa8d-42d3-88cb-f75c51e69cde', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('ResultRetentionSettings', response) def add_test_results_to_test_run(self, results, project, run_id): """AddTestResultsToTestRun. - Add test results to a test run. + [Preview API] Add test results to a test run. :param [TestCaseResult] results: List of test results to add. :param str project: Project ID or project name :param int run_id: Test run ID into which test results to add. @@ -618,19 +618,19 @@ def add_test_results_to_test_run(self, results, project, run_id): content = self._serialize.body(results, '[TestCaseResult]') response = self._send(http_method='POST', location_id='4637d869-3a76-4468-8057-0bb02aa385cf', - version='7.0', + version='7.2-preview.6', route_values=route_values, content=content) return self._deserialize('[TestCaseResult]', self._unwrap_collection(response)) def get_test_result_by_id(self, project, run_id, test_case_result_id, details_to_include=None): """GetTestResultById. - Get a test result for a test run. + [Preview API] Get a test result for a test run. :param str project: Project ID or project name :param int run_id: Test run ID of a test result to fetch. :param int test_case_result_id: Test result ID. :param str details_to_include: Details to include with test results. Default is None. Other values are Iterations, WorkItems and SubResults. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -644,14 +644,14 @@ def get_test_result_by_id(self, project, run_id, test_case_result_id, details_to query_parameters['detailsToInclude'] = self._serialize.query('details_to_include', details_to_include, 'str') response = self._send(http_method='GET', location_id='4637d869-3a76-4468-8057-0bb02aa385cf', - version='7.0', + version='7.2-preview.6', route_values=route_values, query_parameters=query_parameters) return self._deserialize('TestCaseResult', response) def get_test_results(self, project, run_id, details_to_include=None, skip=None, top=None, outcomes=None): """GetTestResults. - Get test results for a test run. + [Preview API] Get test results for a test run. :param str project: Project ID or project name :param int run_id: Test run ID of test results to fetch. :param str details_to_include: Details to include with test results. Default is None. Other values are Iterations and WorkItems. @@ -677,14 +677,14 @@ def get_test_results(self, project, run_id, details_to_include=None, skip=None, query_parameters['outcomes'] = self._serialize.query('outcomes', outcomes, 'str') response = self._send(http_method='GET', location_id='4637d869-3a76-4468-8057-0bb02aa385cf', - version='7.0', + version='7.2-preview.6', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TestCaseResult]', self._unwrap_collection(response)) def update_test_results(self, results, project, run_id): """UpdateTestResults. - Update test results in a test run. + [Preview API] Update test results in a test run. :param [TestCaseResult] results: List of test results to update. :param str project: Project ID or project name :param int run_id: Test run ID whose test results to update. @@ -698,17 +698,17 @@ def update_test_results(self, results, project, run_id): content = self._serialize.body(results, '[TestCaseResult]') response = self._send(http_method='PATCH', location_id='4637d869-3a76-4468-8057-0bb02aa385cf', - version='7.0', + version='7.2-preview.6', route_values=route_values, content=content) return self._deserialize('[TestCaseResult]', self._unwrap_collection(response)) def get_test_run_statistics(self, project, run_id): """GetTestRunStatistics. - Get test run statistics , used when we want to get summary of a run by outcome. + [Preview API] Get test run statistics , used when we want to get summary of a run by outcome. :param str project: Project ID or project name :param int run_id: ID of the run to get. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -717,16 +717,16 @@ def get_test_run_statistics(self, project, run_id): route_values['runId'] = self._serialize.url('run_id', run_id, 'int') response = self._send(http_method='GET', location_id='0a42c424-d764-4a16-a2d5-5c85f87d0ae8', - version='7.0', + version='7.2-preview.3', route_values=route_values) return self._deserialize('TestRunStatistic', response) def create_test_run(self, test_run, project): """CreateTestRun. - Create new test run. - :param :class:` ` test_run: Run details RunCreateModel + [Preview API] Create new test run. + :param :class:` ` test_run: Run details RunCreateModel :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -734,14 +734,14 @@ def create_test_run(self, test_run, project): content = self._serialize.body(test_run, 'RunCreateModel') response = self._send(http_method='POST', location_id='cadb3810-d47d-4a3c-a234-fe5f3be50138', - version='7.0', + version='7.2-preview.3', route_values=route_values, content=content) return self._deserialize('TestRun', response) def delete_test_run(self, project, run_id): """DeleteTestRun. - Delete a test run by its ID. + [Preview API] Delete a test run by its ID. :param str project: Project ID or project name :param int run_id: ID of the run to delete. """ @@ -752,16 +752,16 @@ def delete_test_run(self, project, run_id): route_values['runId'] = self._serialize.url('run_id', run_id, 'int') self._send(http_method='DELETE', location_id='cadb3810-d47d-4a3c-a234-fe5f3be50138', - version='7.0', + version='7.2-preview.3', route_values=route_values) def get_test_run_by_id(self, project, run_id, include_details=None): """GetTestRunById. - Get a test run by its ID. + [Preview API] Get a test run by its ID. :param str project: Project ID or project name :param int run_id: ID of the run to get. :param bool include_details: Default value is true. It includes details like run statistics, release, build, test environment, post process state, and more. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -773,14 +773,14 @@ def get_test_run_by_id(self, project, run_id, include_details=None): query_parameters['includeDetails'] = self._serialize.query('include_details', include_details, 'bool') response = self._send(http_method='GET', location_id='cadb3810-d47d-4a3c-a234-fe5f3be50138', - version='7.0', + version='7.2-preview.3', route_values=route_values, query_parameters=query_parameters) return self._deserialize('TestRun', response) def get_test_runs(self, project, build_uri=None, owner=None, tmi_run_id=None, plan_id=None, include_run_details=None, automated=None, skip=None, top=None): """GetTestRuns. - Get a list of test runs. + [Preview API] Get a list of test runs. :param str project: Project ID or project name :param str build_uri: URI of the build that the runs used. :param str owner: Team foundation ID of the owner of the runs. @@ -814,14 +814,14 @@ def get_test_runs(self, project, build_uri=None, owner=None, tmi_run_id=None, pl query_parameters['$top'] = self._serialize.query('top', top, 'int') response = self._send(http_method='GET', location_id='cadb3810-d47d-4a3c-a234-fe5f3be50138', - version='7.0', + version='7.2-preview.3', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TestRun]', self._unwrap_collection(response)) def query_test_runs(self, project, min_last_updated_date, max_last_updated_date, state=None, plan_ids=None, is_automated=None, publish_context=None, build_ids=None, build_def_ids=None, branch_name=None, release_ids=None, release_def_ids=None, release_env_ids=None, release_env_def_ids=None, run_title=None, top=None, continuation_token=None): """QueryTestRuns. - Query Test Runs based on filters. Mandatory fields are minLastUpdatedDate and maxLastUpdatedDate. + [Preview API] Query Test Runs based on filters. Mandatory fields are minLastUpdatedDate and maxLastUpdatedDate. :param str project: Project ID or project name :param datetime min_last_updated_date: Minimum Last Modified Date of run to be queried (Mandatory). :param datetime max_last_updated_date: Maximum Last Modified Date of run to be queried (Mandatory, difference between min and max date can be atmost 7 days). @@ -839,7 +839,7 @@ def query_test_runs(self, project, min_last_updated_date, max_last_updated_date, :param str run_title: Run Title of the Runs to be queried. :param int top: Number of runs to be queried. Limit is 100 :param str continuation_token: continuationToken received from previous batch or null for first batch. It is not supposed to be created (or altered, if received from last batch) by user. - :rtype: :class:`<[TestRun]> ` + :rtype: :class:`<[TestRun]> ` """ route_values = {} if project is not None: @@ -886,18 +886,18 @@ def query_test_runs(self, project, min_last_updated_date, max_last_updated_date, query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'str') response = self._send(http_method='GET', location_id='cadb3810-d47d-4a3c-a234-fe5f3be50138', - version='7.0', + version='7.2-preview.3', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TestRun]', self._unwrap_collection(response)) def update_test_run(self, run_update_model, project, run_id): """UpdateTestRun. - Update test run by its ID. - :param :class:` ` run_update_model: Run details RunUpdateModel + [Preview API] Update test run by its ID. + :param :class:` ` run_update_model: Run details RunUpdateModel :param str project: Project ID or project name :param int run_id: ID of the run to update. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -907,17 +907,17 @@ def update_test_run(self, run_update_model, project, run_id): content = self._serialize.body(run_update_model, 'RunUpdateModel') response = self._send(http_method='PATCH', location_id='cadb3810-d47d-4a3c-a234-fe5f3be50138', - version='7.0', + version='7.2-preview.3', route_values=route_values, content=content) return self._deserialize('TestRun', response) def create_test_session(self, test_session, team_context): """CreateTestSession. - Create a test session - :param :class:` ` test_session: Test session details for creation - :param :class:` ` team_context: The team context for the operation - :rtype: :class:` ` + [Preview API] Create a test session + :param :class:` ` test_session: Test session details for creation + :param :class:` ` team_context: The team context for the operation + :rtype: :class:` ` """ project = None team = None @@ -939,15 +939,15 @@ def create_test_session(self, test_session, team_context): content = self._serialize.body(test_session, 'TestSession') response = self._send(http_method='POST', location_id='1500b4b4-6c69-4ca6-9b18-35e9e97fe2ac', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('TestSession', response) def get_test_sessions(self, team_context, period=None, all_sessions=None, include_all_properties=None, source=None, include_only_completed_sessions=None): """GetTestSessions. - Get a list of test sessions - :param :class:` ` team_context: The team context for the operation + [Preview API] Get a list of test sessions + :param :class:` ` team_context: The team context for the operation :param int period: Period in days from now, for which test sessions are fetched. :param bool all_sessions: If false, returns test sessions for current user. Otherwise, it returns test sessions for all users :param bool include_all_properties: If true, it returns all properties of the test sessions. Otherwise, it returns the skinny version. @@ -985,17 +985,17 @@ def get_test_sessions(self, team_context, period=None, all_sessions=None, includ query_parameters['includeOnlyCompletedSessions'] = self._serialize.query('include_only_completed_sessions', include_only_completed_sessions, 'bool') response = self._send(http_method='GET', location_id='1500b4b4-6c69-4ca6-9b18-35e9e97fe2ac', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TestSession]', self._unwrap_collection(response)) def update_test_session(self, test_session, team_context): """UpdateTestSession. - Update a test session - :param :class:` ` test_session: Test session details for update - :param :class:` ` team_context: The team context for the operation - :rtype: :class:` ` + [Preview API] Update a test session + :param :class:` ` test_session: Test session details for update + :param :class:` ` team_context: The team context for the operation + :rtype: :class:` ` """ project = None team = None @@ -1017,14 +1017,14 @@ def update_test_session(self, test_session, team_context): content = self._serialize.body(test_session, 'TestSession') response = self._send(http_method='PATCH', location_id='1500b4b4-6c69-4ca6-9b18-35e9e97fe2ac', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('TestSession', response) def add_test_cases_to_suite(self, project, plan_id, suite_id, test_case_ids): """AddTestCasesToSuite. - Add test cases to suite. + [Preview API] Add test cases to suite. :param str project: Project ID or project name :param int plan_id: ID of the test plan that contains the suite. :param int suite_id: ID of the test suite to which the test cases must be added. @@ -1043,18 +1043,18 @@ def add_test_cases_to_suite(self, project, plan_id, suite_id, test_case_ids): route_values['action'] = 'TestCases' response = self._send(http_method='POST', location_id='a4a1ec1c-b03f-41ca-8857-704594ecf58e', - version='7.0', + version='7.2-preview.3', route_values=route_values) return self._deserialize('[SuiteTestCase]', self._unwrap_collection(response)) def get_test_case_by_id(self, project, plan_id, suite_id, test_case_ids): """GetTestCaseById. - Get a specific test case in a test suite with test case id. + [Preview API] Get a specific test case in a test suite with test case id. :param str project: Project ID or project name :param int plan_id: ID of the test plan that contains the suites. :param int suite_id: ID of the suite that contains the test case. :param int test_case_ids: ID of the test case to get. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -1068,13 +1068,13 @@ def get_test_case_by_id(self, project, plan_id, suite_id, test_case_ids): route_values['action'] = 'TestCases' response = self._send(http_method='GET', location_id='a4a1ec1c-b03f-41ca-8857-704594ecf58e', - version='7.0', + version='7.2-preview.3', route_values=route_values) return self._deserialize('SuiteTestCase', response) def get_test_cases(self, project, plan_id, suite_id): """GetTestCases. - Get all test cases in a suite. + [Preview API] Get all test cases in a suite. :param str project: Project ID or project name :param int plan_id: ID of the test plan that contains the suites. :param int suite_id: ID of the suite to get. @@ -1090,13 +1090,13 @@ def get_test_cases(self, project, plan_id, suite_id): route_values['action'] = 'TestCases' response = self._send(http_method='GET', location_id='a4a1ec1c-b03f-41ca-8857-704594ecf58e', - version='7.0', + version='7.2-preview.3', route_values=route_values) return self._deserialize('[SuiteTestCase]', self._unwrap_collection(response)) def remove_test_cases_from_suite_url(self, project, plan_id, suite_id, test_case_ids): """RemoveTestCasesFromSuiteUrl. - The test points associated with the test cases are removed from the test suite. The test case work item is not deleted from the system. See test cases resource to delete a test case permanently. + [Preview API] The test points associated with the test cases are removed from the test suite. The test case work item is not deleted from the system. See test cases resource to delete a test case permanently. :param str project: Project ID or project name :param int plan_id: ID of the test plan that contains the suite. :param int suite_id: ID of the suite to get. @@ -1114,13 +1114,13 @@ def remove_test_cases_from_suite_url(self, project, plan_id, suite_id, test_case route_values['action'] = 'TestCases' self._send(http_method='DELETE', location_id='a4a1ec1c-b03f-41ca-8857-704594ecf58e', - version='7.0', + version='7.2-preview.3', route_values=route_values) def update_suite_test_cases(self, suite_test_case_update_model, project, plan_id, suite_id, test_case_ids): """UpdateSuiteTestCases. - Updates the properties of the test case association in a suite. - :param :class:` ` suite_test_case_update_model: Model for updation of the properties of test case suite association. + [Preview API] Updates the properties of the test case association in a suite. + :param :class:` ` suite_test_case_update_model: Model for updation of the properties of test case suite association. :param str project: Project ID or project name :param int plan_id: ID of the test plan that contains the suite. :param int suite_id: ID of the test suite to which the test cases must be added. @@ -1140,14 +1140,14 @@ def update_suite_test_cases(self, suite_test_case_update_model, project, plan_id content = self._serialize.body(suite_test_case_update_model, 'SuiteTestCaseUpdateModel') response = self._send(http_method='PATCH', location_id='a4a1ec1c-b03f-41ca-8857-704594ecf58e', - version='7.0', + version='7.2-preview.3', route_values=route_values, content=content) return self._deserialize('[SuiteTestCase]', self._unwrap_collection(response)) def delete_test_case(self, project, test_case_id): """DeleteTestCase. - Delete a test case. + [Preview API] Delete a test case. :param str project: Project ID or project name :param int test_case_id: Id of test case to delete. """ @@ -1158,15 +1158,15 @@ def delete_test_case(self, project, test_case_id): route_values['testCaseId'] = self._serialize.url('test_case_id', test_case_id, 'int') self._send(http_method='DELETE', location_id='4d472e0f-e32c-4ef8-adf4-a4078772889c', - version='7.0', + version='7.2-preview.1', route_values=route_values) def query_test_history(self, filter, project): """QueryTestHistory. - Get history of a test method using TestHistoryQuery - :param :class:` ` filter: TestHistoryQuery to get history + [Preview API] Get history of a test method using TestHistoryQuery + :param :class:` ` filter: TestHistoryQuery to get history :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -1174,7 +1174,7 @@ def query_test_history(self, filter, project): content = self._serialize.body(filter, 'TestHistoryQuery') response = self._send(http_method='POST', location_id='929fd86c-3e38-4d8c-b4b6-90df256e5971', - version='7.0', + version='7.2-preview.2', route_values=route_values, content=content) return self._deserialize('TestHistoryQuery', response) diff --git a/azure-devops/azure/devops/v7_0/test_plan/__init__.py b/azure-devops/azure/devops/v7_2/test_plan/__init__.py similarity index 98% rename from azure-devops/azure/devops/v7_0/test_plan/__init__.py rename to azure-devops/azure/devops/v7_2/test_plan/__init__.py index e37d1710..55b399db 100644 --- a/azure-devops/azure/devops/v7_0/test_plan/__init__.py +++ b/azure-devops/azure/devops/v7_2/test_plan/__init__.py @@ -24,6 +24,7 @@ 'Configuration', 'DestinationTestPlanCloneParams', 'DestinationTestSuiteInfo', + 'ExportTestCaseParams', 'GraphSubjectBase', 'IdentityRef', 'LastResultDetails', diff --git a/azure-devops/azure/devops/v7_0/test_plan/models.py b/azure-devops/azure/devops/v7_2/test_plan/models.py similarity index 92% rename from azure-devops/azure/devops/v7_0/test_plan/models.py rename to azure-devops/azure/devops/v7_2/test_plan/models.py index d2ebf44b..b0dcbe87 100644 --- a/azure-devops/azure/devops/v7_0/test_plan/models.py +++ b/azure-devops/azure/devops/v7_2/test_plan/models.py @@ -35,13 +35,13 @@ class CloneOperationCommonResponse(Model): Common Response for clone operation :param clone_statistics: Various statistics related to the clone operation - :type clone_statistics: :class:`CloneStatistics ` + :type clone_statistics: :class:`CloneStatistics ` :param completion_date: Completion data of the operation :type completion_date: datetime :param creation_date: Creation data of the operation :type creation_date: datetime :param links: Reference links - :type links: :class:`ReferenceLinks ` + :type links: :class:`ReferenceLinks ` :param message: Message related to the job :type message: str :param op_id: Clone operation Id @@ -144,13 +144,13 @@ def __init__(self, cloned_requirements_count=None, cloned_shared_steps_count=Non class CloneTestCaseOperationInformation(Model): """ :param clone_operation_response: Various information related to the clone - :type clone_operation_response: :class:`CloneOperationCommonResponse ` + :type clone_operation_response: :class:`CloneOperationCommonResponse ` :param clone_options: Test Plan Clone create parameters - :type clone_options: :class:`CloneTestCaseOptions ` + :type clone_options: :class:`CloneTestCaseOptions ` :param destination_test_suite: Information of destination Test Suite - :type destination_test_suite: :class:`TestSuiteReferenceWithProject ` + :type destination_test_suite: :class:`TestSuiteReferenceWithProject ` :param source_test_suite: Information of source Test Suite - :type source_test_suite: :class:`SourceTestSuiteResponse ` + :type source_test_suite: :class:`SourceTestSuiteResponse ` """ _attribute_map = { @@ -196,15 +196,15 @@ class CloneTestCaseParams(Model): Parameters for Test Suite clone operation :param clone_options: Test Case Clone create parameters - :type clone_options: :class:`CloneTestCaseOptions ` + :type clone_options: :class:`CloneTestCaseOptions ` :param destination_test_plan: Information about destination Test Plan - :type destination_test_plan: :class:`TestPlanReference ` + :type destination_test_plan: :class:`TestPlanReference ` :param destination_test_suite: Information about destination Test Suite - :type destination_test_suite: :class:`DestinationTestSuiteInfo ` + :type destination_test_suite: :class:`DestinationTestSuiteInfo ` :param source_test_plan: Information about source Test Plan - :type source_test_plan: :class:`TestPlanReference ` + :type source_test_plan: :class:`TestPlanReference ` :param source_test_suite: Information about source Test Suite - :type source_test_suite: :class:`SourceTestSuiteInfo ` + :type source_test_suite: :class:`SourceTestSuiteInfo ` :param test_case_ids: Test Case IDs :type test_case_ids: list of int """ @@ -233,13 +233,13 @@ class CloneTestPlanOperationInformation(Model): Response for Test Plan clone operation :param clone_operation_response: Various information related to the clone - :type clone_operation_response: :class:`CloneOperationCommonResponse ` + :type clone_operation_response: :class:`CloneOperationCommonResponse ` :param clone_options: Test Plan Clone create parameters - :type clone_options: :class:`CloneOptions ` + :type clone_options: :class:`CloneOptions ` :param destination_test_plan: Information of destination Test Plan - :type destination_test_plan: :class:`TestPlan ` + :type destination_test_plan: :class:`TestPlan ` :param source_test_plan: Information of source Test Plan - :type source_test_plan: :class:`SourceTestplanResponse ` + :type source_test_plan: :class:`SourceTestplanResponse ` """ _attribute_map = { @@ -262,11 +262,11 @@ class CloneTestPlanParams(Model): Parameters for Test Plan clone operation :param clone_options: Test Plan Clone create parameters - :type clone_options: :class:`CloneOptions ` + :type clone_options: :class:`CloneOptions ` :param destination_test_plan: Information about destination Test Plan - :type destination_test_plan: :class:`DestinationTestPlanCloneParams ` + :type destination_test_plan: :class:`DestinationTestPlanCloneParams ` :param source_test_plan: Information about source Test Plan - :type source_test_plan: :class:`SourceTestPlanInfo ` + :type source_test_plan: :class:`SourceTestPlanInfo ` """ _attribute_map = { @@ -287,15 +287,15 @@ class CloneTestSuiteOperationInformation(Model): Response for Test Suite clone operation :param cloned_test_suite: Information of newly cloned Test Suite - :type cloned_test_suite: :class:`TestSuiteReferenceWithProject ` + :type cloned_test_suite: :class:`TestSuiteReferenceWithProject ` :param clone_operation_response: Various information related to the clone - :type clone_operation_response: :class:`CloneOperationCommonResponse ` + :type clone_operation_response: :class:`CloneOperationCommonResponse ` :param clone_options: Test Plan Clone create parameters - :type clone_options: :class:`CloneOptions ` + :type clone_options: :class:`CloneOptions ` :param destination_test_suite: Information of destination Test Suite - :type destination_test_suite: :class:`TestSuiteReferenceWithProject ` + :type destination_test_suite: :class:`TestSuiteReferenceWithProject ` :param source_test_suite: Information of source Test Suite - :type source_test_suite: :class:`TestSuiteReferenceWithProject ` + :type source_test_suite: :class:`TestSuiteReferenceWithProject ` """ _attribute_map = { @@ -320,11 +320,11 @@ class CloneTestSuiteParams(Model): Parameters for Test Suite clone operation :param clone_options: Test Plan Clone create parameters - :type clone_options: :class:`CloneOptions ` + :type clone_options: :class:`CloneOptions ` :param destination_test_suite: Information about destination Test Suite - :type destination_test_suite: :class:`DestinationTestSuiteInfo ` + :type destination_test_suite: :class:`DestinationTestSuiteInfo ` :param source_test_suite: Information about source Test Suite - :type source_test_suite: :class:`SourceTestSuiteInfo ` + :type source_test_suite: :class:`SourceTestSuiteInfo ` """ _attribute_map = { @@ -378,10 +378,35 @@ def __init__(self, id=None, project=None): self.project = project +class ExportTestCaseParams(Model): + """ + Parameters for test case export operation + + :param test_case_ids: Test Case IDs to exported + :type test_case_ids: list of int + :param test_plan_id: ID of test plan containing test cases + :type test_plan_id: int + :param test_suite_id: ID of test suite containing test cases + :type test_suite_id: int + """ + + _attribute_map = { + 'test_case_ids': {'key': 'testCaseIds', 'type': '[int]'}, + 'test_plan_id': {'key': 'testPlanId', 'type': 'int'}, + 'test_suite_id': {'key': 'testSuiteId', 'type': 'int'} + } + + def __init__(self, test_case_ids=None, test_plan_id=None, test_suite_id=None): + super(ExportTestCaseParams, self).__init__() + self.test_case_ids = test_case_ids + self.test_plan_id = test_plan_id + self.test_suite_id = test_suite_id + + class GraphSubjectBase(Model): """ :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. :type descriptor: str :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. @@ -408,7 +433,7 @@ def __init__(self, _links=None, descriptor=None, display_name=None, url=None): class IdentityRef(GraphSubjectBase): """ :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. :type descriptor: str :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. @@ -473,7 +498,7 @@ class LastResultDetails(Model): :param duration: Duration of the last result in milliseconds. :type duration: long :param run_by: The user who executed the last result. - :type run_by: :class:`IdentityRef ` + :type run_by: :class:`IdentityRef ` """ _attribute_map = { @@ -506,7 +531,7 @@ class LibraryWorkItemsData(Model): :param work_item_ids: List of work items returned when OrderByField is sent something other than Id. :type work_item_ids: list of int :param work_items: List of work items to be returned. - :type work_items: list of :class:`WorkItemDetails ` + :type work_items: list of :class:`WorkItemDetails ` """ _attribute_map = { @@ -539,7 +564,7 @@ class LibraryWorkItemsDataProviderRequest(Model): :param continuation_token: The continuation token required for paging of work items. This is required when getting subsequent sets of work items when OrderByField is Id. :type continuation_token: str :param filter_values: List of filter values to be supplied. Currently supported filters are Title, State, AssignedTo, Priority, AreaPath. - :type filter_values: list of :class:`TestPlansLibraryWorkItemFilter ` + :type filter_values: list of :class:`TestPlansLibraryWorkItemFilter ` :param is_ascending: Whether the data is to be sorted in ascending or descending order. When not supplied, defaults to descending. :type is_ascending: bool :param library_query_type: The type of query to run. @@ -603,7 +628,7 @@ class PointAssignment(Configuration): :param id: Id of the Test Point :type id: int :param tester: Tester Assigned to the Test Point - :type tester: :class:`IdentityRef ` + :type tester: :class:`IdentityRef ` """ _attribute_map = { @@ -743,9 +768,9 @@ class SuiteTestCaseCreateUpdateParameters(Model): Create and Update Suite Test Case Parameters :param point_assignments: Configurations Ids - :type point_assignments: list of :class:`Configuration ` + :type point_assignments: list of :class:`Configuration ` :param work_item: Id of Test Case to be updated or created - :type work_item: :class:`WorkItem ` + :type work_item: :class:`WorkItem ` """ _attribute_map = { @@ -817,19 +842,19 @@ class TestCase(Model): Test Case Class :param links: Reference links - :type links: :class:`ReferenceLinks ` + :type links: :class:`ReferenceLinks ` :param order: Order of the TestCase in the Suite :type order: int :param point_assignments: List of Points associated with the Test Case - :type point_assignments: list of :class:`PointAssignment ` + :type point_assignments: list of :class:`PointAssignment ` :param project: Project under which the Test Case is - :type project: :class:`TeamProjectReference ` + :type project: :class:`TeamProjectReference ` :param test_plan: Test Plan under which the Test Case is - :type test_plan: :class:`TestPlanReference ` + :type test_plan: :class:`TestPlanReference ` :param test_suite: Test Suite under which the Test Case is - :type test_suite: :class:`TestSuiteReference ` + :type test_suite: :class:`TestSuiteReference ` :param work_item: Work Item details of the TestCase - :type work_item: :class:`WorkItemDetails ` + :type work_item: :class:`WorkItemDetails ` """ _attribute_map = { @@ -858,23 +883,23 @@ class TestCaseAssociatedResult(Model): :param completed_date: :type completed_date: datetime :param configuration: - :type configuration: :class:`TestConfigurationReference ` + :type configuration: :class:`TestConfigurationReference ` :param outcome: :type outcome: object :param plan: - :type plan: :class:`TestPlanReference ` + :type plan: :class:`TestPlanReference ` :param point_id: :type point_id: int :param result_id: :type result_id: int :param run_by: - :type run_by: :class:`IdentityRef ` + :type run_by: :class:`IdentityRef ` :param run_id: :type run_id: int :param suite: - :type suite: :class:`TestSuiteReference ` + :type suite: :class:`TestSuiteReference ` :param tester: - :type tester: :class:`IdentityRef ` + :type tester: :class:`IdentityRef ` """ _attribute_map = { @@ -909,7 +934,7 @@ class TestCaseReference(Model): Test Case Reference :param assigned_to: Identity to whom the test case is assigned - :type assigned_to: :class:`IdentityRef ` + :type assigned_to: :class:`IdentityRef ` :param id: Test Case Id :type id: int :param name: Test Case Name @@ -938,9 +963,9 @@ class TestCaseResultsData(Model): This data model is used in TestCaseResultsDataProvider and populates the data required for initial page load :param context_point: Point information from where the execution history was viewed. Used to set initial filters. - :type context_point: :class:`TestPointDetailedReference ` + :type context_point: :class:`TestPointDetailedReference ` :param results: Use to store the results displayed in the table - :type results: list of :class:`TestCaseAssociatedResult ` + :type results: list of :class:`TestCaseAssociatedResult ` :param test_case_name: Test Case Name to be displayed in the table header :type test_case_name: str """ @@ -971,7 +996,7 @@ class TestConfigurationCreateUpdateParameters(Model): :param state: State of the configuration :type state: object :param values: Dictionary of Test Variable, Selected Value - :type values: list of :class:`NameValuePair ` + :type values: list of :class:`NameValuePair ` """ _attribute_map = { @@ -1086,11 +1111,11 @@ class TestPlanCreateParams(Model): :param area_path: Area of the test plan. :type area_path: str :param automated_test_environment: - :type automated_test_environment: :class:`TestEnvironment ` + :type automated_test_environment: :class:`TestEnvironment ` :param automated_test_settings: - :type automated_test_settings: :class:`TestSettings ` + :type automated_test_settings: :class:`TestSettings ` :param build_definition: The Build Definition that generates a build associated with this test plan. - :type build_definition: :class:`BuildDefinitionReference ` + :type build_definition: :class:`BuildDefinitionReference ` :param build_id: Build to be tested. :type build_id: int :param description: Description of the test plan. @@ -1100,21 +1125,21 @@ class TestPlanCreateParams(Model): :param iteration: Iteration path of the test plan. :type iteration: str :param manual_test_environment: - :type manual_test_environment: :class:`TestEnvironment ` + :type manual_test_environment: :class:`TestEnvironment ` :param manual_test_settings: - :type manual_test_settings: :class:`TestSettings ` + :type manual_test_settings: :class:`TestSettings ` :param name: Name of the test plan. :type name: str :param owner: Owner of the test plan. - :type owner: :class:`IdentityRef ` + :type owner: :class:`IdentityRef ` :param release_environment_definition: Release Environment to be used to deploy the build and run automated tests from this test plan. - :type release_environment_definition: :class:`ReleaseEnvironmentDefinitionReference ` + :type release_environment_definition: :class:`ReleaseEnvironmentDefinitionReference ` :param start_date: Start date for the test plan. :type start_date: datetime :param state: State of the test plan. :type state: str :param test_outcome_settings: Value to configure how same tests across test suites under a test plan need to behave - :type test_outcome_settings: :class:`TestOutcomeSettings ` + :type test_outcome_settings: :class:`TestOutcomeSettings ` """ _attribute_map = { @@ -1200,19 +1225,19 @@ class TestPlansHubRefreshData(Model): :param test_case_page_size: :type test_case_page_size: int :param test_cases: - :type test_cases: list of :class:`TestCase ` + :type test_cases: list of :class:`TestCase ` :param test_cases_continuation_token: :type test_cases_continuation_token: str :param test_plan: - :type test_plan: :class:`TestPlanDetailedReference ` + :type test_plan: :class:`TestPlanDetailedReference ` :param test_point_page_size: :type test_point_page_size: int :param test_points: - :type test_points: list of :class:`TestPoint ` + :type test_points: list of :class:`TestPoint ` :param test_points_continuation_token: :type test_points_continuation_token: str :param test_suites: - :type test_suites: list of :class:`TestSuite ` + :type test_suites: list of :class:`TestSuite ` :param test_suites_continuation_token: :type test_suites_continuation_token: str """ @@ -1290,11 +1315,11 @@ class TestPlanUpdateParams(TestPlanCreateParams): :param area_path: Area of the test plan. :type area_path: str :param automated_test_environment: - :type automated_test_environment: :class:`TestEnvironment ` + :type automated_test_environment: :class:`TestEnvironment ` :param automated_test_settings: - :type automated_test_settings: :class:`TestSettings ` + :type automated_test_settings: :class:`TestSettings ` :param build_definition: The Build Definition that generates a build associated with this test plan. - :type build_definition: :class:`BuildDefinitionReference ` + :type build_definition: :class:`BuildDefinitionReference ` :param build_id: Build to be tested. :type build_id: int :param description: Description of the test plan. @@ -1304,21 +1329,21 @@ class TestPlanUpdateParams(TestPlanCreateParams): :param iteration: Iteration path of the test plan. :type iteration: str :param manual_test_environment: - :type manual_test_environment: :class:`TestEnvironment ` + :type manual_test_environment: :class:`TestEnvironment ` :param manual_test_settings: - :type manual_test_settings: :class:`TestSettings ` + :type manual_test_settings: :class:`TestSettings ` :param name: Name of the test plan. :type name: str :param owner: Owner of the test plan. - :type owner: :class:`IdentityRef ` + :type owner: :class:`IdentityRef ` :param release_environment_definition: Release Environment to be used to deploy the build and run automated tests from this test plan. - :type release_environment_definition: :class:`ReleaseEnvironmentDefinitionReference ` + :type release_environment_definition: :class:`ReleaseEnvironmentDefinitionReference ` :param start_date: Start date for the test plan. :type start_date: datetime :param state: State of the test plan. :type state: str :param test_outcome_settings: Value to configure how same tests across test suites under a test plan need to behave - :type test_outcome_settings: :class:`TestOutcomeSettings ` + :type test_outcome_settings: :class:`TestOutcomeSettings ` :param revision: Revision of the test plan. :type revision: int """ @@ -1355,7 +1380,7 @@ class TestPoint(Model): :param comment: Comment associated to the Test Point :type comment: str :param configuration: Configuration associated with the Test Point - :type configuration: :class:`TestConfigurationReference ` + :type configuration: :class:`TestConfigurationReference ` :param id: Id of the Test Point :type id: int :param is_active: Variable to decide whether the test case is Active or not @@ -1365,23 +1390,23 @@ class TestPoint(Model): :param last_reset_to_active: Last Reset to Active Time Stamp for the Test Point :type last_reset_to_active: datetime :param last_updated_by: Last Updated details for the Test Point - :type last_updated_by: :class:`IdentityRef ` + :type last_updated_by: :class:`IdentityRef ` :param last_updated_date: Last Update Time Stamp for the Test Point :type last_updated_date: datetime :param links: Reference links - :type links: :class:`ReferenceLinks ` + :type links: :class:`ReferenceLinks ` :param project: Project under which the Test Point is - :type project: :class:`TeamProjectReference ` + :type project: :class:`TeamProjectReference ` :param results: Results associated to the Test Point - :type results: :class:`TestPointResults ` + :type results: :class:`TestPointResults ` :param test_case_reference: Test Case Reference - :type test_case_reference: :class:`TestCaseReference ` + :type test_case_reference: :class:`TestCaseReference ` :param tester: Tester associated with the Test Point - :type tester: :class:`IdentityRef ` + :type tester: :class:`IdentityRef ` :param test_plan: Test Plan under which the Test Point is - :type test_plan: :class:`TestPlanReference ` + :type test_plan: :class:`TestPlanReference ` :param test_suite: Test Suite under which the Test Point is - :type test_suite: :class:`TestSuiteReference ` + :type test_suite: :class:`TestSuiteReference ` """ _attribute_map = { @@ -1424,15 +1449,15 @@ def __init__(self, comment=None, configuration=None, id=None, is_active=None, is class TestPointDetailedReference(Model): """ :param configuration: - :type configuration: :class:`TestConfigurationReference ` + :type configuration: :class:`TestConfigurationReference ` :param plan: - :type plan: :class:`TestPlanReference ` + :type plan: :class:`TestPlanReference ` :param point_id: :type point_id: int :param suite: - :type suite: :class:`TestSuiteReference ` + :type suite: :class:`TestSuiteReference ` :param tester: - :type tester: :class:`IdentityRef ` + :type tester: :class:`IdentityRef ` """ _attribute_map = { @@ -1461,7 +1486,7 @@ class TestPointResults(Model): :param last_resolution_state: Last Resolution State Id for the Test Point :type last_resolution_state: object :param last_result_details: Last Result Details for the Test Point - :type last_result_details: :class:`LastResultDetails ` + :type last_result_details: :class:`LastResultDetails ` :param last_result_id: Last Result Id :type last_result_id: int :param last_result_state: Last Result State of the Test Point @@ -1510,9 +1535,9 @@ class TestPointUpdateParams(Model): :param is_active: Reset the Test Point to Active :type is_active: bool :param results: Results of the test point - :type results: :class:`Results ` + :type results: :class:`Results ` :param tester: Tester of the Test Point - :type tester: :class:`IdentityRef ` + :type tester: :class:`IdentityRef ` """ _attribute_map = { @@ -1576,15 +1601,15 @@ class TestSuiteCreateUpdateCommonParams(Model): Test Suite Create/Update Common Parameters :param default_configurations: Test suite default configurations. - :type default_configurations: list of :class:`TestConfigurationReference ` + :type default_configurations: list of :class:`TestConfigurationReference ` :param default_testers: Test suite default testers. - :type default_testers: list of :class:`IdentityRef ` + :type default_testers: list of :class:`IdentityRef ` :param inherit_default_configurations: Default configuration was inherited or not. :type inherit_default_configurations: bool :param name: Name of test suite. :type name: str :param parent_suite: Test suite parent shallow reference. - :type parent_suite: :class:`TestSuiteReference ` + :type parent_suite: :class:`TestSuiteReference ` :param query_string: Test suite query string, for dynamic suites. :type query_string: str """ @@ -1638,7 +1663,7 @@ class TestSuiteReferenceWithProject(TestSuiteReference): :param name: Name of the test suite. :type name: str :param project: Reference of destination Project - :type project: :class:`TeamProjectReference ` + :type project: :class:`TeamProjectReference ` """ _attribute_map = { @@ -1657,15 +1682,15 @@ class TestSuiteUpdateParams(TestSuiteCreateUpdateCommonParams): Test Suite Update Parameters :param default_configurations: Test suite default configurations. - :type default_configurations: list of :class:`TestConfigurationReference ` + :type default_configurations: list of :class:`TestConfigurationReference ` :param default_testers: Test suite default testers. - :type default_testers: list of :class:`IdentityRef ` + :type default_testers: list of :class:`IdentityRef ` :param inherit_default_configurations: Default configuration was inherited or not. :type inherit_default_configurations: bool :param name: Name of test suite. :type name: str :param parent_suite: Test suite parent shallow reference. - :type parent_suite: :class:`TestSuiteReference ` + :type parent_suite: :class:`TestSuiteReference ` :param query_string: Test suite query string, for dynamic suites. :type query_string: str :param revision: Test suite revision. @@ -1761,11 +1786,11 @@ class DestinationTestPlanCloneParams(TestPlanCreateParams): :param area_path: Area of the test plan. :type area_path: str :param automated_test_environment: - :type automated_test_environment: :class:`TestEnvironment ` + :type automated_test_environment: :class:`TestEnvironment ` :param automated_test_settings: - :type automated_test_settings: :class:`TestSettings ` + :type automated_test_settings: :class:`TestSettings ` :param build_definition: The Build Definition that generates a build associated with this test plan. - :type build_definition: :class:`BuildDefinitionReference ` + :type build_definition: :class:`BuildDefinitionReference ` :param build_id: Build to be tested. :type build_id: int :param description: Description of the test plan. @@ -1775,21 +1800,21 @@ class DestinationTestPlanCloneParams(TestPlanCreateParams): :param iteration: Iteration path of the test plan. :type iteration: str :param manual_test_environment: - :type manual_test_environment: :class:`TestEnvironment ` + :type manual_test_environment: :class:`TestEnvironment ` :param manual_test_settings: - :type manual_test_settings: :class:`TestSettings ` + :type manual_test_settings: :class:`TestSettings ` :param name: Name of the test plan. :type name: str :param owner: Owner of the test plan. - :type owner: :class:`IdentityRef ` + :type owner: :class:`IdentityRef ` :param release_environment_definition: Release Environment to be used to deploy the build and run automated tests from this test plan. - :type release_environment_definition: :class:`ReleaseEnvironmentDefinitionReference ` + :type release_environment_definition: :class:`ReleaseEnvironmentDefinitionReference ` :param start_date: Start date for the test plan. :type start_date: datetime :param state: State of the test plan. :type state: str :param test_outcome_settings: Value to configure how same tests across test suites under a test plan need to behave - :type test_outcome_settings: :class:`TestOutcomeSettings ` + :type test_outcome_settings: :class:`TestOutcomeSettings ` :param project: Destination Project Name :type project: str """ @@ -1828,7 +1853,7 @@ class SourceTestplanResponse(TestPlanReference): :param name: Name of the test plan. :type name: str :param project: project reference - :type project: :class:`TeamProjectReference ` + :type project: :class:`TeamProjectReference ` :param suite_ids: Id of suites to be cloned inside source Test Plan :type suite_ids: list of int """ @@ -1855,7 +1880,7 @@ class SourceTestSuiteResponse(TestSuiteReference): :param name: Name of the test suite. :type name: str :param project: project reference - :type project: :class:`TeamProjectReference ` + :type project: :class:`TeamProjectReference ` :param test_case_ids: Id of suites to be cloned inside source Test Plan :type test_case_ids: list of int """ @@ -1912,11 +1937,11 @@ class TestConfiguration(TestConfigurationCreateUpdateParameters): :param state: State of the configuration :type state: object :param values: Dictionary of Test Variable, Selected Value - :type values: list of :class:`NameValuePair ` + :type values: list of :class:`NameValuePair ` :param id: Id of the configuration :type id: int :param project: Id of the test configuration variable - :type project: :class:`TeamProjectReference ` + :type project: :class:`TeamProjectReference ` """ _attribute_map = { @@ -1942,11 +1967,11 @@ class TestPlan(TestPlanUpdateParams): :param area_path: Area of the test plan. :type area_path: str :param automated_test_environment: - :type automated_test_environment: :class:`TestEnvironment ` + :type automated_test_environment: :class:`TestEnvironment ` :param automated_test_settings: - :type automated_test_settings: :class:`TestSettings ` + :type automated_test_settings: :class:`TestSettings ` :param build_definition: The Build Definition that generates a build associated with this test plan. - :type build_definition: :class:`BuildDefinitionReference ` + :type build_definition: :class:`BuildDefinitionReference ` :param build_id: Build to be tested. :type build_id: int :param description: Description of the test plan. @@ -1956,35 +1981,35 @@ class TestPlan(TestPlanUpdateParams): :param iteration: Iteration path of the test plan. :type iteration: str :param manual_test_environment: - :type manual_test_environment: :class:`TestEnvironment ` + :type manual_test_environment: :class:`TestEnvironment ` :param manual_test_settings: - :type manual_test_settings: :class:`TestSettings ` + :type manual_test_settings: :class:`TestSettings ` :param name: Name of the test plan. :type name: str :param owner: Owner of the test plan. - :type owner: :class:`IdentityRef ` + :type owner: :class:`IdentityRef ` :param release_environment_definition: Release Environment to be used to deploy the build and run automated tests from this test plan. - :type release_environment_definition: :class:`ReleaseEnvironmentDefinitionReference ` + :type release_environment_definition: :class:`ReleaseEnvironmentDefinitionReference ` :param start_date: Start date for the test plan. :type start_date: datetime :param state: State of the test plan. :type state: str :param test_outcome_settings: Value to configure how same tests across test suites under a test plan need to behave - :type test_outcome_settings: :class:`TestOutcomeSettings ` + :type test_outcome_settings: :class:`TestOutcomeSettings ` :param revision: Revision of the test plan. :type revision: int :param _links: Relevant links - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param id: ID of the test plan. :type id: int :param previous_build_id: Previous build Id associated with the test plan :type previous_build_id: int :param project: Project which contains the test plan. - :type project: :class:`TeamProjectReference ` + :type project: :class:`TeamProjectReference ` :param root_suite: Root test suite of the test plan. - :type root_suite: :class:`TestSuiteReference ` + :type root_suite: :class:`TestSuiteReference ` :param updated_by: Identity Reference for the last update of the test plan - :type updated_by: :class:`IdentityRef ` + :type updated_by: :class:`IdentityRef ` :param updated_date: Updated date of the test plan :type updated_date: datetime """ @@ -2071,15 +2096,15 @@ class TestSuiteCreateParams(TestSuiteCreateUpdateCommonParams): Test suite Create Parameters :param default_configurations: Test suite default configurations. - :type default_configurations: list of :class:`TestConfigurationReference ` + :type default_configurations: list of :class:`TestConfigurationReference ` :param default_testers: Test suite default testers. - :type default_testers: list of :class:`IdentityRef ` + :type default_testers: list of :class:`IdentityRef ` :param inherit_default_configurations: Default configuration was inherited or not. :type inherit_default_configurations: bool :param name: Name of test suite. :type name: str :param parent_suite: Test suite parent shallow reference. - :type parent_suite: :class:`TestSuiteReference ` + :type parent_suite: :class:`TestSuiteReference ` :param query_string: Test suite query string, for dynamic suites. :type query_string: str :param requirement_id: Test suite requirement id. @@ -2118,7 +2143,7 @@ class TestVariable(TestVariableCreateUpdateParameters): :param id: Id of the test variable :type id: int :param project: Id of the test variable - :type project: :class:`TeamProjectReference ` + :type project: :class:`TeamProjectReference ` """ _attribute_map = { @@ -2140,15 +2165,15 @@ class TestSuite(TestSuiteCreateParams): Test suite :param default_configurations: Test suite default configurations. - :type default_configurations: list of :class:`TestConfigurationReference ` + :type default_configurations: list of :class:`TestConfigurationReference ` :param default_testers: Test suite default testers. - :type default_testers: list of :class:`IdentityRef ` + :type default_testers: list of :class:`IdentityRef ` :param inherit_default_configurations: Default configuration was inherited or not. :type inherit_default_configurations: bool :param name: Name of test suite. :type name: str :param parent_suite: Test suite parent shallow reference. - :type parent_suite: :class:`TestSuiteReference ` + :type parent_suite: :class:`TestSuiteReference ` :param query_string: Test suite query string, for dynamic suites. :type query_string: str :param requirement_id: Test suite requirement id. @@ -2156,11 +2181,11 @@ class TestSuite(TestSuiteCreateParams): :param suite_type: Test suite type. :type suite_type: object :param _links: Links: self, testPoints, testCases, parent - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` + :param children: Child test suites of current test suite. + :type children: list of :class:`TestSuite ` :param has_children: Boolean value dictating if Child test suites are present :type has_children: bool - :param children: Child test suites of current test suite. - :type children: list of :class:`TestSuite ` :param id: Id of test suite. :type id: int :param last_error: Last error for test suite. @@ -2168,13 +2193,13 @@ class TestSuite(TestSuiteCreateParams): :param last_populated_date: Last populated date. :type last_populated_date: datetime :param last_updated_by: IdentityRef of user who has updated test suite recently. - :type last_updated_by: :class:`IdentityRef ` + :type last_updated_by: :class:`IdentityRef ` :param last_updated_date: Last update date. :type last_updated_date: datetime :param plan: Test plan to which the test suite belongs. - :type plan: :class:`TestPlanReference ` + :type plan: :class:`TestPlanReference ` :param project: Test suite project shallow reference. - :type project: :class:`TeamProjectReference ` + :type project: :class:`TeamProjectReference ` :param revision: Test suite revision. :type revision: int """ @@ -2189,8 +2214,8 @@ class TestSuite(TestSuiteCreateParams): 'requirement_id': {'key': 'requirementId', 'type': 'int'}, 'suite_type': {'key': 'suiteType', 'type': 'object'}, '_links': {'key': '_links', 'type': 'ReferenceLinks'}, - 'has_children': {'key': 'hasChildren', 'type': 'bool'}, 'children': {'key': 'children', 'type': '[TestSuite]'}, + 'has_children': {'key': 'hasChildren', 'type': 'bool'}, 'id': {'key': 'id', 'type': 'int'}, 'last_error': {'key': 'lastError', 'type': 'str'}, 'last_populated_date': {'key': 'lastPopulatedDate', 'type': 'iso-8601'}, @@ -2201,11 +2226,11 @@ class TestSuite(TestSuiteCreateParams): 'revision': {'key': 'revision', 'type': 'int'} } - def __init__(self, default_configurations=None, default_testers=None, inherit_default_configurations=None, name=None, parent_suite=None, query_string=None, requirement_id=None, suite_type=None, _links=None, has_children=None, children=None, id=None, last_error=None, last_populated_date=None, last_updated_by=None, last_updated_date=None, plan=None, project=None, revision=None): + def __init__(self, default_configurations=None, default_testers=None, inherit_default_configurations=None, name=None, parent_suite=None, query_string=None, requirement_id=None, suite_type=None, _links=None, children=None, has_children=None, id=None, last_error=None, last_populated_date=None, last_updated_by=None, last_updated_date=None, plan=None, project=None, revision=None): super(TestSuite, self).__init__(default_configurations=default_configurations, default_testers=default_testers, inherit_default_configurations=inherit_default_configurations, name=name, parent_suite=parent_suite, query_string=query_string, requirement_id=requirement_id, suite_type=suite_type) self._links = _links - self.has_children = has_children self.children = children + self.has_children = has_children self.id = id self.last_error = last_error self.last_populated_date = last_populated_date @@ -2230,6 +2255,7 @@ def __init__(self, default_configurations=None, default_testers=None, inherit_de 'CloneTestSuiteParams', 'Configuration', 'DestinationTestSuiteInfo', + 'ExportTestCaseParams', 'GraphSubjectBase', 'IdentityRef', 'LastResultDetails', diff --git a/azure-devops/azure/devops/v7_0/test_plan/test_plan_client.py b/azure-devops/azure/devops/v7_2/test_plan/test_plan_client.py similarity index 87% rename from azure-devops/azure/devops/v7_0/test_plan/test_plan_client.py rename to azure-devops/azure/devops/v7_2/test_plan/test_plan_client.py index a5a059c1..7e55ae9c 100644 --- a/azure-devops/azure/devops/v7_0/test_plan/test_plan_client.py +++ b/azure-devops/azure/devops/v7_2/test_plan/test_plan_client.py @@ -27,10 +27,10 @@ def __init__(self, base_url=None, creds=None): def create_test_configuration(self, test_configuration_create_update_parameters, project): """CreateTestConfiguration. - Create a test configuration. - :param :class:` ` test_configuration_create_update_parameters: TestConfigurationCreateUpdateParameters + [Preview API] Create a test configuration. + :param :class:` ` test_configuration_create_update_parameters: TestConfigurationCreateUpdateParameters :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -38,14 +38,14 @@ def create_test_configuration(self, test_configuration_create_update_parameters, content = self._serialize.body(test_configuration_create_update_parameters, 'TestConfigurationCreateUpdateParameters') response = self._send(http_method='POST', location_id='8369318e-38fa-4e84-9043-4b2a75d2c256', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('TestConfiguration', response) def delete_test_confguration(self, project, test_configuartion_id): """DeleteTestConfguration. - Delete a test configuration by its ID. + [Preview API] Delete a test configuration by its ID. :param str project: Project ID or project name :param int test_configuartion_id: ID of the test configuration to delete. """ @@ -57,16 +57,16 @@ def delete_test_confguration(self, project, test_configuartion_id): query_parameters['testConfiguartionId'] = self._serialize.query('test_configuartion_id', test_configuartion_id, 'int') self._send(http_method='DELETE', location_id='8369318e-38fa-4e84-9043-4b2a75d2c256', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) def get_test_configuration_by_id(self, project, test_configuration_id): """GetTestConfigurationById. - Get a test configuration + [Preview API] Get a test configuration :param str project: Project ID or project name :param int test_configuration_id: ID of the test configuration to get. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -75,16 +75,16 @@ def get_test_configuration_by_id(self, project, test_configuration_id): route_values['testConfigurationId'] = self._serialize.url('test_configuration_id', test_configuration_id, 'int') response = self._send(http_method='GET', location_id='8369318e-38fa-4e84-9043-4b2a75d2c256', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('TestConfiguration', response) def get_test_configurations(self, project, continuation_token=None): """GetTestConfigurations. - Get a list of test configurations. + [Preview API] Get a list of test configurations. :param str project: Project ID or project name :param str continuation_token: If the list of configurations returned is not complete, a continuation token to query next batch of configurations is included in the response header as "x-ms-continuationtoken". Omit this parameter to get the first batch of test configurations. - :rtype: :class:`<[TestConfiguration]> ` + :rtype: :class:`<[TestConfiguration]> ` """ route_values = {} if project is not None: @@ -94,18 +94,18 @@ def get_test_configurations(self, project, continuation_token=None): query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'str') response = self._send(http_method='GET', location_id='8369318e-38fa-4e84-9043-4b2a75d2c256', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TestConfiguration]', self._unwrap_collection(response)) def update_test_configuration(self, test_configuration_create_update_parameters, project, test_configuartion_id): """UpdateTestConfiguration. - Update a test configuration by its ID. - :param :class:` ` test_configuration_create_update_parameters: TestConfigurationCreateUpdateParameters + [Preview API] Update a test configuration by its ID. + :param :class:` ` test_configuration_create_update_parameters: TestConfigurationCreateUpdateParameters :param str project: Project ID or project name :param int test_configuartion_id: ID of the test configuration to update. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -116,7 +116,7 @@ def update_test_configuration(self, test_configuration_create_update_parameters, content = self._serialize.body(test_configuration_create_update_parameters, 'TestConfigurationCreateUpdateParameters') response = self._send(http_method='PATCH', location_id='8369318e-38fa-4e84-9043-4b2a75d2c256', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters, content=content) @@ -124,10 +124,10 @@ def update_test_configuration(self, test_configuration_create_update_parameters, def create_test_plan(self, test_plan_create_params, project): """CreateTestPlan. - Create a test plan. - :param :class:` ` test_plan_create_params: A testPlanCreateParams object.TestPlanCreateParams + [Preview API] Create a test plan. + :param :class:` ` test_plan_create_params: A testPlanCreateParams object.TestPlanCreateParams :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -135,14 +135,14 @@ def create_test_plan(self, test_plan_create_params, project): content = self._serialize.body(test_plan_create_params, 'TestPlanCreateParams') response = self._send(http_method='POST', location_id='0e292477-a0c2-47f3-a9b6-34f153d627f4', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('TestPlan', response) def delete_test_plan(self, project, plan_id): """DeleteTestPlan. - Delete a test plan. + [Preview API] Delete a test plan. :param str project: Project ID or project name :param int plan_id: ID of the test plan to be deleted. """ @@ -153,15 +153,15 @@ def delete_test_plan(self, project, plan_id): route_values['planId'] = self._serialize.url('plan_id', plan_id, 'int') self._send(http_method='DELETE', location_id='0e292477-a0c2-47f3-a9b6-34f153d627f4', - version='7.0', + version='7.2-preview.1', route_values=route_values) def get_test_plan_by_id(self, project, plan_id): """GetTestPlanById. - Get a test plan by Id. + [Preview API] Get a test plan by Id. :param str project: Project ID or project name :param int plan_id: ID of the test plan to get. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -170,19 +170,19 @@ def get_test_plan_by_id(self, project, plan_id): route_values['planId'] = self._serialize.url('plan_id', plan_id, 'int') response = self._send(http_method='GET', location_id='0e292477-a0c2-47f3-a9b6-34f153d627f4', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('TestPlan', response) def get_test_plans(self, project, owner=None, continuation_token=None, include_plan_details=None, filter_active_plans=None): """GetTestPlans. - Get a list of test plans + [Preview API] Get a list of test plans :param str project: Project ID or project name :param str owner: Filter for test plan by owner ID or name :param str continuation_token: If the list of plans returned is not complete, a continuation token to query next batch of plans is included in the response header as "x-ms-continuationtoken". Omit this parameter to get the first batch of test plans. :param bool include_plan_details: Get all properties of the test plan :param bool filter_active_plans: Get just the active plans - :rtype: :class:`<[TestPlan]> ` + :rtype: :class:`<[TestPlan]> ` """ route_values = {} if project is not None: @@ -198,18 +198,18 @@ def get_test_plans(self, project, owner=None, continuation_token=None, include_p query_parameters['filterActivePlans'] = self._serialize.query('filter_active_plans', filter_active_plans, 'bool') response = self._send(http_method='GET', location_id='0e292477-a0c2-47f3-a9b6-34f153d627f4', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TestPlan]', self._unwrap_collection(response)) def update_test_plan(self, test_plan_update_params, project, plan_id): """UpdateTestPlan. - Update a test plan. - :param :class:` ` test_plan_update_params: A testPlanUpdateParams object.TestPlanUpdateParams + [Preview API] Update a test plan. + :param :class:` ` test_plan_update_params: A testPlanUpdateParams object.TestPlanUpdateParams :param str project: Project ID or project name :param int plan_id: ID of the test plan to be updated. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -219,14 +219,14 @@ def update_test_plan(self, test_plan_update_params, project, plan_id): content = self._serialize.body(test_plan_update_params, 'TestPlanUpdateParams') response = self._send(http_method='PATCH', location_id='0e292477-a0c2-47f3-a9b6-34f153d627f4', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('TestPlan', response) def get_suite_entries(self, project, suite_id, suite_entry_type=None): """GetSuiteEntries. - Get a list of test suite entries in the test suite. + [Preview API] Get a list of test suite entries in the test suite. :param str project: Project ID or project name :param int suite_id: Id of the parent suite. :param str suite_entry_type: @@ -242,14 +242,14 @@ def get_suite_entries(self, project, suite_id, suite_entry_type=None): query_parameters['suiteEntryType'] = self._serialize.query('suite_entry_type', suite_entry_type, 'str') response = self._send(http_method='GET', location_id='d6733edf-72f1-4252-925b-c560dfe9b75a', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[SuiteEntry]', self._unwrap_collection(response)) def reorder_suite_entries(self, suite_entries, project, suite_id): """ReorderSuiteEntries. - Reorder test suite entries in the test suite. + [Preview API] Reorder test suite entries in the test suite. :param [SuiteEntryUpdateParams] suite_entries: List of SuiteEntry to reorder. :param str project: Project ID or project name :param int suite_id: Id of the parent test suite. @@ -263,18 +263,18 @@ def reorder_suite_entries(self, suite_entries, project, suite_id): content = self._serialize.body(suite_entries, '[SuiteEntryUpdateParams]') response = self._send(http_method='PATCH', location_id='d6733edf-72f1-4252-925b-c560dfe9b75a', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('[SuiteEntry]', self._unwrap_collection(response)) def create_test_suite(self, test_suite_create_params, project, plan_id): """CreateTestSuite. - Create test suite. - :param :class:` ` test_suite_create_params: Parameters for suite creation + [Preview API] Create test suite. + :param :class:` ` test_suite_create_params: Parameters for suite creation :param str project: Project ID or project name :param int plan_id: ID of the test plan that contains the suites. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -284,14 +284,14 @@ def create_test_suite(self, test_suite_create_params, project, plan_id): content = self._serialize.body(test_suite_create_params, 'TestSuiteCreateParams') response = self._send(http_method='POST', location_id='1046d5d3-ab61-4ca7-a65a-36118a978256', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('TestSuite', response) def delete_test_suite(self, project, plan_id, suite_id): """DeleteTestSuite. - Delete test suite. + [Preview API] Delete test suite. :param str project: Project ID or project name :param int plan_id: ID of the test plan that contains the suite. :param int suite_id: ID of the test suite to delete. @@ -305,17 +305,17 @@ def delete_test_suite(self, project, plan_id, suite_id): route_values['suiteId'] = self._serialize.url('suite_id', suite_id, 'int') self._send(http_method='DELETE', location_id='1046d5d3-ab61-4ca7-a65a-36118a978256', - version='7.0', + version='7.2-preview.1', route_values=route_values) def get_test_suite_by_id(self, project, plan_id, suite_id, expand=None): """GetTestSuiteById. - Get test suite by suite id. + [Preview API] Get test suite by suite id. :param str project: Project ID or project name :param int plan_id: ID of the test plan that contains the suites. :param int suite_id: ID of the suite to get. :param str expand: Include the children suites and testers details - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -329,20 +329,20 @@ def get_test_suite_by_id(self, project, plan_id, suite_id, expand=None): query_parameters['expand'] = self._serialize.query('expand', expand, 'str') response = self._send(http_method='GET', location_id='1046d5d3-ab61-4ca7-a65a-36118a978256', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('TestSuite', response) def get_test_suites_for_plan(self, project, plan_id, expand=None, continuation_token=None, as_tree_view=None): """GetTestSuitesForPlan. - Get test suites for plan. + [Preview API] Get test suites for plan. :param str project: Project ID or project name :param int plan_id: ID of the test plan for which suites are requested. :param str expand: Include the children suites and testers details. :param str continuation_token: If the list of suites returned is not complete, a continuation token to query next batch of suites is included in the response header as "x-ms-continuationtoken". Omit this parameter to get the first batch of test suites. :param bool as_tree_view: If the suites returned should be in a tree structure. - :rtype: :class:`<[TestSuite]> ` + :rtype: :class:`<[TestSuite]> ` """ route_values = {} if project is not None: @@ -358,19 +358,19 @@ def get_test_suites_for_plan(self, project, plan_id, expand=None, continuation_t query_parameters['asTreeView'] = self._serialize.query('as_tree_view', as_tree_view, 'bool') response = self._send(http_method='GET', location_id='1046d5d3-ab61-4ca7-a65a-36118a978256', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TestSuite]', self._unwrap_collection(response)) def update_test_suite(self, test_suite_update_params, project, plan_id, suite_id): """UpdateTestSuite. - Update test suite. - :param :class:` ` test_suite_update_params: Parameters for suite updation + [Preview API] Update test suite. + :param :class:` ` test_suite_update_params: Parameters for suite updation :param str project: Project ID or project name :param int plan_id: ID of the test plan that contains the suites. :param int suite_id: ID of the parent suite. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -382,14 +382,14 @@ def update_test_suite(self, test_suite_update_params, project, plan_id, suite_id content = self._serialize.body(test_suite_update_params, 'TestSuiteUpdateParams') response = self._send(http_method='PATCH', location_id='1046d5d3-ab61-4ca7-a65a-36118a978256', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('TestSuite', response) def get_suites_by_test_case_id(self, test_case_id): """GetSuitesByTestCaseId. - Find the list of all test suites in which a given test case is present. This is helpful if you need to find out which test suites are using a test case, when you need to make changes to a test case. + [Preview API] Find the list of all test suites in which a given test case is present. This is helpful if you need to find out which test suites are using a test case, when you need to make changes to a test case. :param int test_case_id: ID of the test case for which suites need to be fetched. :rtype: [TestSuite] """ @@ -398,13 +398,13 @@ def get_suites_by_test_case_id(self, test_case_id): query_parameters['testCaseId'] = self._serialize.query('test_case_id', test_case_id, 'int') response = self._send(http_method='GET', location_id='a4080e84-f17b-4fad-84f1-7960b6525bf2', - version='7.0', + version='7.2-preview.1', query_parameters=query_parameters) return self._deserialize('[TestSuite]', self._unwrap_collection(response)) def add_test_cases_to_suite(self, suite_test_case_create_update_parameters, project, plan_id, suite_id): """AddTestCasesToSuite. - Add test cases to a suite with specified configurations + [Preview API] Add test cases to a suite with specified configurations :param [SuiteTestCaseCreateUpdateParameters] suite_test_case_create_update_parameters: SuiteTestCaseCreateUpdateParameters object. :param str project: Project ID or project name :param int plan_id: ID of the test plan to which test cases are to be added. @@ -421,14 +421,14 @@ def add_test_cases_to_suite(self, suite_test_case_create_update_parameters, proj content = self._serialize.body(suite_test_case_create_update_parameters, '[SuiteTestCaseCreateUpdateParameters]') response = self._send(http_method='POST', location_id='a9bd61ac-45cf-4d13-9441-43dcd01edf8d', - version='7.0', + version='7.2-preview.3', route_values=route_values, content=content) return self._deserialize('[TestCase]', self._unwrap_collection(response)) def get_test_case(self, project, plan_id, suite_id, test_case_id, wit_fields=None, return_identity_ref=None): """GetTestCase. - Get a particular Test Case from a Suite. + [Preview API] Get a particular Test Case from a Suite. :param str project: Project ID or project name :param int plan_id: ID of the test plan for which test cases are requested. :param int suite_id: ID of the test suite for which test cases are requested. @@ -453,14 +453,14 @@ def get_test_case(self, project, plan_id, suite_id, test_case_id, wit_fields=Non query_parameters['returnIdentityRef'] = self._serialize.query('return_identity_ref', return_identity_ref, 'bool') response = self._send(http_method='GET', location_id='a9bd61ac-45cf-4d13-9441-43dcd01edf8d', - version='7.0', + version='7.2-preview.3', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TestCase]', self._unwrap_collection(response)) def get_test_case_list(self, project, plan_id, suite_id, test_ids=None, configuration_ids=None, wit_fields=None, continuation_token=None, return_identity_ref=None, expand=None, exclude_flags=None, is_recursive=None): """GetTestCaseList. - Get Test Case List return those test cases which have all the configuration Ids as mentioned in the optional parameter. If configuration Ids is null, it return all the test cases + [Preview API] Get Test Case List return those test cases which have all the configuration Ids as mentioned in the optional parameter. If configuration Ids is null, it return all the test cases :param str project: Project ID or project name :param int plan_id: ID of the test plan for which test cases are requested. :param int suite_id: ID of the test suite for which test cases are requested. @@ -472,7 +472,7 @@ def get_test_case_list(self, project, plan_id, suite_id, test_ids=None, configur :param bool expand: If set to false, will get a smaller payload containing only basic details about the suite test case object :param str exclude_flags: Flag to exclude various values from payload. For example to remove point assignments pass exclude = 1. To remove extra information (links, test plan , test suite) pass exclude = 2. To remove both extra information and point assignments pass exclude = 3 (1 + 2). :param bool is_recursive: - :rtype: :class:`<[TestCase]> ` + :rtype: :class:`<[TestCase]> ` """ route_values = {} if project is not None: @@ -500,14 +500,14 @@ def get_test_case_list(self, project, plan_id, suite_id, test_ids=None, configur query_parameters['isRecursive'] = self._serialize.query('is_recursive', is_recursive, 'bool') response = self._send(http_method='GET', location_id='a9bd61ac-45cf-4d13-9441-43dcd01edf8d', - version='7.0', + version='7.2-preview.3', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TestCase]', self._unwrap_collection(response)) def remove_test_cases_from_suite(self, project, plan_id, suite_id, test_case_ids): """RemoveTestCasesFromSuite. - Removes test cases from a suite based on the list of test case Ids provided. + [Preview API] Removes test cases from a suite based on the list of test case Ids provided. :param str project: Project ID or project name :param int plan_id: ID of the test plan from which test cases are to be removed. :param int suite_id: ID of the test suite from which test cases are to be removed. @@ -525,13 +525,13 @@ def remove_test_cases_from_suite(self, project, plan_id, suite_id, test_case_ids query_parameters['testCaseIds'] = self._serialize.query('test_case_ids', test_case_ids, 'str') self._send(http_method='DELETE', location_id='a9bd61ac-45cf-4d13-9441-43dcd01edf8d', - version='7.0', + version='7.2-preview.3', route_values=route_values, query_parameters=query_parameters) def remove_test_cases_list_from_suite(self, project, plan_id, suite_id, test_ids): """RemoveTestCasesListFromSuite. - Removes test cases from a suite based on the list of test case Ids provided. This API can be used to remove a larger number of test cases. + [Preview API] Removes test cases from a suite based on the list of test case Ids provided. This API can be used to remove a larger number of test cases. :param str project: Project ID or project name :param int plan_id: ID of the test plan from which test cases are to be removed. :param int suite_id: ID of the test suite from which test cases are to be removed. @@ -549,13 +549,13 @@ def remove_test_cases_list_from_suite(self, project, plan_id, suite_id, test_ids query_parameters['testIds'] = self._serialize.query('test_ids', test_ids, 'str') self._send(http_method='DELETE', location_id='a9bd61ac-45cf-4d13-9441-43dcd01edf8d', - version='7.0', + version='7.2-preview.3', route_values=route_values, query_parameters=query_parameters) def update_suite_test_cases(self, suite_test_case_create_update_parameters, project, plan_id, suite_id): """UpdateSuiteTestCases. - Update the configurations for test cases + [Preview API] Update the configurations for test cases :param [SuiteTestCaseCreateUpdateParameters] suite_test_case_create_update_parameters: A SuiteTestCaseCreateUpdateParameters object. :param str project: Project ID or project name :param int plan_id: ID of the test plan to which test cases are to be updated. @@ -572,16 +572,17 @@ def update_suite_test_cases(self, suite_test_case_create_update_parameters, proj content = self._serialize.body(suite_test_case_create_update_parameters, '[SuiteTestCaseCreateUpdateParameters]') response = self._send(http_method='PATCH', location_id='a9bd61ac-45cf-4d13-9441-43dcd01edf8d', - version='7.0', + version='7.2-preview.3', route_values=route_values, content=content) return self._deserialize('[TestCase]', self._unwrap_collection(response)) def clone_test_case(self, clone_request_body, project): """CloneTestCase. - :param :class:` ` clone_request_body: + [Preview API] + :param :class:` ` clone_request_body: :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -589,17 +590,17 @@ def clone_test_case(self, clone_request_body, project): content = self._serialize.body(clone_request_body, 'CloneTestCaseParams') response = self._send(http_method='POST', location_id='529b2b8d-82f4-4893-b1e4-1e74ea534673', - version='7.0', + version='7.2-preview.2', route_values=route_values, content=content) return self._deserialize('CloneTestCaseOperationInformation', response) def get_test_case_clone_information(self, project, clone_operation_id): """GetTestCaseCloneInformation. - Get clone information. + [Preview API] Get clone information. :param str project: Project ID or project name :param int clone_operation_id: Operation ID returned when we queue a clone operation - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -608,13 +609,13 @@ def get_test_case_clone_information(self, project, clone_operation_id): route_values['cloneOperationId'] = self._serialize.url('clone_operation_id', clone_operation_id, 'int') response = self._send(http_method='GET', location_id='529b2b8d-82f4-4893-b1e4-1e74ea534673', - version='7.0', + version='7.2-preview.2', route_values=route_values) return self._deserialize('CloneTestCaseOperationInformation', response) def delete_test_case(self, project, test_case_id): """DeleteTestCase. - Delete a test case. + [Preview API] Delete a test case. :param str project: Project ID or project name :param int test_case_id: Id of test case to be deleted. """ @@ -625,16 +626,16 @@ def delete_test_case(self, project, test_case_id): route_values['testCaseId'] = self._serialize.url('test_case_id', test_case_id, 'int') self._send(http_method='DELETE', location_id='29006fb5-816b-4ff7-a329-599943569229', - version='7.0', + version='7.2-preview.1', route_values=route_values) def clone_test_plan(self, clone_request_body, project, deep_clone=None): """CloneTestPlan. - Clone test plan - :param :class:` ` clone_request_body: Plan Clone Request Body detail TestPlanCloneRequest + [Preview API] Clone test plan + :param :class:` ` clone_request_body: Plan Clone Request Body detail TestPlanCloneRequest :param str project: Project ID or project name :param bool deep_clone: Clones all the associated test cases as well - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -645,7 +646,7 @@ def clone_test_plan(self, clone_request_body, project, deep_clone=None): content = self._serialize.body(clone_request_body, 'CloneTestPlanParams') response = self._send(http_method='POST', location_id='e65df662-d8a3-46c7-ae1c-14e2d4df57e1', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters, content=content) @@ -653,10 +654,10 @@ def clone_test_plan(self, clone_request_body, project, deep_clone=None): def get_clone_information(self, project, clone_operation_id): """GetCloneInformation. - Get clone information. + [Preview API] Get clone information. :param str project: Project ID or project name :param int clone_operation_id: Operation ID returned when we queue a clone operation - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -665,13 +666,13 @@ def get_clone_information(self, project, clone_operation_id): route_values['cloneOperationId'] = self._serialize.url('clone_operation_id', clone_operation_id, 'int') response = self._send(http_method='GET', location_id='e65df662-d8a3-46c7-ae1c-14e2d4df57e1', - version='7.0', + version='7.2-preview.2', route_values=route_values) return self._deserialize('CloneTestPlanOperationInformation', response) def get_points(self, project, plan_id, suite_id, point_id, return_identity_ref=None, include_point_details=None): """GetPoints. - Get a particular Test Point from a suite. + [Preview API] Get a particular Test Point from a suite. :param str project: Project ID or project name :param int plan_id: ID of the test plan for which test points are requested. :param int suite_id: ID of the test suite for which test points are requested. @@ -696,14 +697,14 @@ def get_points(self, project, plan_id, suite_id, point_id, return_identity_ref=N query_parameters['includePointDetails'] = self._serialize.query('include_point_details', include_point_details, 'bool') response = self._send(http_method='GET', location_id='52df686e-bae4-4334-b0ee-b6cf4e6f6b73', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TestPoint]', self._unwrap_collection(response)) def get_points_list(self, project, plan_id, suite_id, test_point_ids=None, test_case_id=None, continuation_token=None, return_identity_ref=None, include_point_details=None, is_recursive=None): """GetPointsList. - Get all the points inside a suite based on some filters + [Preview API] Get all the points inside a suite based on some filters :param str project: Project ID or project name :param int plan_id: ID of the test plan for which test points are requested. :param int suite_id: ID of the test suite for which test points are requested @@ -713,7 +714,7 @@ def get_points_list(self, project, plan_id, suite_id, test_point_ids=None, test_ :param bool return_identity_ref: If set to true, returns the AssignedTo field in TestCaseReference as IdentityRef object. :param bool include_point_details: If set to false, will get a smaller payload containing only basic details about the test point object :param bool is_recursive: If set to true, will also fetch test points belonging to child suites recursively. - :rtype: :class:`<[TestPoint]> ` + :rtype: :class:`<[TestPoint]> ` """ route_values = {} if project is not None: @@ -737,14 +738,14 @@ def get_points_list(self, project, plan_id, suite_id, test_point_ids=None, test_ query_parameters['isRecursive'] = self._serialize.query('is_recursive', is_recursive, 'bool') response = self._send(http_method='GET', location_id='52df686e-bae4-4334-b0ee-b6cf4e6f6b73', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TestPoint]', self._unwrap_collection(response)) def update_test_points(self, test_point_update_params, project, plan_id, suite_id, include_point_details=None, return_identity_ref=None): """UpdateTestPoints. - Update Test Points. This is used to Reset test point to active, update the outcome of a test point or update the tester of a test point + [Preview API] Update Test Points. This is used to Reset test point to active, update the outcome of a test point or update the tester of a test point :param [TestPointUpdateParams] test_point_update_params: A TestPointUpdateParams Object. :param str project: Project ID or project name :param int plan_id: ID of the test plan for which test points are requested. @@ -768,7 +769,7 @@ def update_test_points(self, test_point_update_params, project, plan_id, suite_i content = self._serialize.body(test_point_update_params, '[TestPointUpdateParams]') response = self._send(http_method='PATCH', location_id='52df686e-bae4-4334-b0ee-b6cf4e6f6b73', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters, content=content) @@ -776,11 +777,11 @@ def update_test_points(self, test_point_update_params, project, plan_id, suite_i def clone_test_suite(self, clone_request_body, project, deep_clone=None): """CloneTestSuite. - Clone test suite - :param :class:` ` clone_request_body: Suite Clone Request Body detail TestSuiteCloneRequest + [Preview API] Clone test suite + :param :class:` ` clone_request_body: Suite Clone Request Body detail TestSuiteCloneRequest :param str project: Project ID or project name :param bool deep_clone: Clones all the associated test cases as well - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -791,7 +792,7 @@ def clone_test_suite(self, clone_request_body, project, deep_clone=None): content = self._serialize.body(clone_request_body, 'CloneTestSuiteParams') response = self._send(http_method='POST', location_id='181d4c97-0e98-4ee2-ad6a-4cada675e555', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters, content=content) @@ -799,10 +800,10 @@ def clone_test_suite(self, clone_request_body, project, deep_clone=None): def get_suite_clone_information(self, project, clone_operation_id): """GetSuiteCloneInformation. - Get clone information. + [Preview API] Get clone information. :param str project: Project ID or project name :param int clone_operation_id: Operation ID returned when we queue a clone operation - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -811,16 +812,16 @@ def get_suite_clone_information(self, project, clone_operation_id): route_values['cloneOperationId'] = self._serialize.url('clone_operation_id', clone_operation_id, 'int') response = self._send(http_method='GET', location_id='181d4c97-0e98-4ee2-ad6a-4cada675e555', - version='7.0', + version='7.2-preview.2', route_values=route_values) return self._deserialize('CloneTestSuiteOperationInformation', response) def create_test_variable(self, test_variable_create_update_parameters, project): """CreateTestVariable. - Create a test variable. - :param :class:` ` test_variable_create_update_parameters: TestVariableCreateUpdateParameters + [Preview API] Create a test variable. + :param :class:` ` test_variable_create_update_parameters: TestVariableCreateUpdateParameters :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -828,14 +829,14 @@ def create_test_variable(self, test_variable_create_update_parameters, project): content = self._serialize.body(test_variable_create_update_parameters, 'TestVariableCreateUpdateParameters') response = self._send(http_method='POST', location_id='2c61fac6-ac4e-45a5-8c38-1c2b8fd8ea6c', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('TestVariable', response) def delete_test_variable(self, project, test_variable_id): """DeleteTestVariable. - Delete a test variable by its ID. + [Preview API] Delete a test variable by its ID. :param str project: Project ID or project name :param int test_variable_id: ID of the test variable to delete. """ @@ -846,15 +847,15 @@ def delete_test_variable(self, project, test_variable_id): route_values['testVariableId'] = self._serialize.url('test_variable_id', test_variable_id, 'int') self._send(http_method='DELETE', location_id='2c61fac6-ac4e-45a5-8c38-1c2b8fd8ea6c', - version='7.0', + version='7.2-preview.1', route_values=route_values) def get_test_variable_by_id(self, project, test_variable_id): """GetTestVariableById. - Get a test variable by its ID. + [Preview API] Get a test variable by its ID. :param str project: Project ID or project name :param int test_variable_id: ID of the test variable to get. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -863,16 +864,16 @@ def get_test_variable_by_id(self, project, test_variable_id): route_values['testVariableId'] = self._serialize.url('test_variable_id', test_variable_id, 'int') response = self._send(http_method='GET', location_id='2c61fac6-ac4e-45a5-8c38-1c2b8fd8ea6c', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('TestVariable', response) def get_test_variables(self, project, continuation_token=None): """GetTestVariables. - Get a list of test variables. + [Preview API] Get a list of test variables. :param str project: Project ID or project name :param str continuation_token: If the list of variables returned is not complete, a continuation token to query next batch of variables is included in the response header as "x-ms-continuationtoken". Omit this parameter to get the first batch of test variables. - :rtype: :class:`<[TestVariable]> ` + :rtype: :class:`<[TestVariable]> ` """ route_values = {} if project is not None: @@ -882,18 +883,18 @@ def get_test_variables(self, project, continuation_token=None): query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'str') response = self._send(http_method='GET', location_id='2c61fac6-ac4e-45a5-8c38-1c2b8fd8ea6c', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TestVariable]', self._unwrap_collection(response)) def update_test_variable(self, test_variable_create_update_parameters, project, test_variable_id): """UpdateTestVariable. - Update a test variable by its ID. - :param :class:` ` test_variable_create_update_parameters: TestVariableCreateUpdateParameters + [Preview API] Update a test variable by its ID. + :param :class:` ` test_variable_create_update_parameters: TestVariableCreateUpdateParameters :param str project: Project ID or project name :param int test_variable_id: ID of the test variable to update. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -903,7 +904,7 @@ def update_test_variable(self, test_variable_create_update_parameters, project, content = self._serialize.body(test_variable_create_update_parameters, 'TestVariableCreateUpdateParameters') response = self._send(http_method='PATCH', location_id='2c61fac6-ac4e-45a5-8c38-1c2b8fd8ea6c', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('TestVariable', response) diff --git a/azure-devops/azure/devops/v7_0/test_results/__init__.py b/azure-devops/azure/devops/v7_2/test_results/__init__.py similarity index 91% rename from azure-devops/azure/devops/v7_0/test_results/__init__.py rename to azure-devops/azure/devops/v7_2/test_results/__init__.py index d1b39657..7bab3fc0 100644 --- a/azure-devops/azure/devops/v7_0/test_results/__init__.py +++ b/azure-devops/azure/devops/v7_2/test_results/__init__.py @@ -28,14 +28,17 @@ 'DtlEnvironmentDetails', 'FailingSince', 'FieldDetailsForTestResults', + 'FileCoverageData', 'FileCoverageRequest', 'FlakyDetection', 'FlakyDetectionPipelines', 'FlakySettings', + 'FolderCoverageData', 'FunctionCoverage', 'GraphSubjectBase', 'IdentityRef', 'JobReference', + 'Link', 'ModuleCoverage', 'NewTestResultLoggingSettings', 'PhaseReference', @@ -54,9 +57,13 @@ 'RunSummary', 'RunSummaryModel', 'RunUpdateModel', + 'Session', + 'SessionSourcePipeline', 'ShallowReference', 'ShallowTestCaseResult', 'SharedStepModel', + 'Source', + 'SourceViewBuildCoverage', 'StageReference', 'TeamProjectReference', 'TestActionResultModel', @@ -74,6 +81,8 @@ 'TestIterationDetailsModel', 'TestLog', 'TestLogReference', + 'TestLogStoreAttachment', + 'TestLogStoreAttachmentReference', 'TestLogStoreEndpointDetails', 'TestMessageLogDetails', 'TestMethod', @@ -81,6 +90,8 @@ 'TestResolutionState', 'TestResultDocument', 'TestResultFailuresAnalysis', + 'TestResultFailureType', + 'TestResultFailureTypeRequestModel', 'TestResultHistory', 'TestResultHistoryDetailsForGroup', 'TestResultHistoryForGroup', @@ -107,6 +118,7 @@ 'TestTagSummary', 'TestTagsUpdateModel', 'TestToWorkItemLinks', + 'Timeline', 'WorkItemReference', 'WorkItemToTestLinks', 'TestResultsClient' diff --git a/azure-devops/azure/devops/v7_0/test_results/models.py b/azure-devops/azure/devops/v7_2/test_results/models.py similarity index 88% rename from azure-devops/azure/devops/v7_0/test_results/models.py rename to azure-devops/azure/devops/v7_2/test_results/models.py index 9ededeb5..555c53c2 100644 --- a/azure-devops/azure/devops/v7_0/test_results/models.py +++ b/azure-devops/azure/devops/v7_2/test_results/models.py @@ -18,7 +18,7 @@ class AggregatedDataForResultTrend(Model): :param run_summary_by_state: :type run_summary_by_state: dict :param test_results_context: - :type test_results_context: :class:`TestResultsContext ` + :type test_results_context: :class:`TestResultsContext ` :param total_tests: :type total_tests: int """ @@ -76,11 +76,11 @@ class AggregatedResultsAnalysis(Model): :param not_reported_results_by_outcome: :type not_reported_results_by_outcome: dict :param previous_context: - :type previous_context: :class:`TestResultsContext ` + :type previous_context: :class:`TestResultsContext ` :param results_by_outcome: :type results_by_outcome: dict :param results_difference: - :type results_difference: :class:`AggregatedResultsDifference ` + :type results_difference: :class:`AggregatedResultsDifference ` :param run_summary_by_outcome: :type run_summary_by_outcome: dict :param run_summary_by_state: @@ -245,7 +245,7 @@ class BuildConfiguration(Model): :param platform: BuildConfiguration Platform. :type platform: str :param project: Project associated with this BuildConfiguration. - :type project: :class:`ShallowReference ` + :type project: :class:`ShallowReference ` :param repository_guid: Repository Guid for the Build. :type repository_guid: str :param repository_id: Repository Id. @@ -304,11 +304,11 @@ class BuildCoverage(Model): :param code_coverage_file_url: Code Coverage File Url :type code_coverage_file_url: str :param configuration: Build Configuration - :type configuration: :class:`BuildConfiguration ` + :type configuration: :class:`BuildConfiguration ` :param last_error: Last Error :type last_error: str :param modules: List of Modules - :type modules: list of :class:`ModuleCoverage ` + :type modules: list of :class:`ModuleCoverage ` :param state: State :type state: str """ @@ -380,7 +380,7 @@ class CodeCoverageData(Model): :param build_platform: Platform of build for which data is retrieved/published :type build_platform: str :param coverage_stats: List of coverage data for the build - :type coverage_stats: list of :class:`CodeCoverageStatistics ` + :type coverage_stats: list of :class:`CodeCoverageStatistics ` """ _attribute_map = { @@ -438,11 +438,13 @@ class CodeCoverageSummary(Model): Represents the code coverage summary results Used to publish or retrieve code coverage summary against a build :param build: Uri of build for which data is retrieved/published - :type build: :class:`ShallowReference ` + :type build: :class:`ShallowReference ` :param coverage_data: List of coverage data and details for the build - :type coverage_data: list of :class:`CodeCoverageData ` + :type coverage_data: list of :class:`CodeCoverageData ` + :param coverage_detailed_summary_status: + :type coverage_detailed_summary_status: object :param delta_build: Uri of build against which difference in coverage is computed - :type delta_build: :class:`ShallowReference ` + :type delta_build: :class:`ShallowReference ` :param status: Uri of build against which difference in coverage is computed :type status: object """ @@ -450,14 +452,16 @@ class CodeCoverageSummary(Model): _attribute_map = { 'build': {'key': 'build', 'type': 'ShallowReference'}, 'coverage_data': {'key': 'coverageData', 'type': '[CodeCoverageData]'}, + 'coverage_detailed_summary_status': {'key': 'coverageDetailedSummaryStatus', 'type': 'object'}, 'delta_build': {'key': 'deltaBuild', 'type': 'ShallowReference'}, 'status': {'key': 'status', 'type': 'object'} } - def __init__(self, build=None, coverage_data=None, delta_build=None, status=None): + def __init__(self, build=None, coverage_data=None, coverage_detailed_summary_status=None, delta_build=None, status=None): super(CodeCoverageSummary, self).__init__() self.build = build self.coverage_data = coverage_data + self.coverage_detailed_summary_status = coverage_detailed_summary_status self.delta_build = delta_build self.status = status @@ -544,11 +548,11 @@ class FailingSince(Model): Failing since information of a test result. :param build: Build reference since failing. - :type build: :class:`BuildReference ` + :type build: :class:`BuildReference ` :param date: Time since failing(UTC). :type date: datetime :param release: Release reference since failing. - :type release: :class:`ReleaseReference ` + :type release: :class:`ReleaseReference ` """ _attribute_map = { @@ -583,6 +587,25 @@ def __init__(self, field_name=None, groups_for_field=None): self.groups_for_field = groups_for_field +class FileCoverageData(Model): + """ + :param coverage_statistics: + :type coverage_statistics: :class:`CoverageStatistics ` + :param name: + :type name: str + """ + + _attribute_map = { + 'coverage_statistics': {'key': 'coverageStatistics', 'type': 'CoverageStatistics'}, + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, coverage_statistics=None, name=None): + super(FileCoverageData, self).__init__() + self.coverage_statistics = coverage_statistics + self.name = name + + class FileCoverageRequest(Model): """ :param file_path: @@ -617,7 +640,7 @@ def __init__(self, file_path=None, pull_request_base_iteration_id=None, pull_req class FlakyDetection(Model): """ :param flaky_detection_pipelines: FlakyDetectionPipelines defines Pipelines for Detection. - :type flaky_detection_pipelines: :class:`FlakyDetectionPipelines ` + :type flaky_detection_pipelines: :class:`FlakyDetectionPipelines ` :param flaky_detection_type: FlakyDetectionType defines Detection type i.e. 1. System or 2. Manual. :type flaky_detection_type: object """ @@ -655,7 +678,7 @@ def __init__(self, allowed_pipelines=None, is_all_pipelines_allowed=None): class FlakySettings(Model): """ :param flaky_detection: FlakyDetection defines types of detection. - :type flaky_detection: :class:`FlakyDetection ` + :type flaky_detection: :class:`FlakyDetection ` :param flaky_in_summary_report: FlakyInSummaryReport defines flaky data should show in summary report or not. :type flaky_in_summary_report: bool :param is_flaky_bug_created: IsFlakyBugCreated defines if there is any bug that has been created with flaky testresult. @@ -679,6 +702,33 @@ def __init__(self, flaky_detection=None, flaky_in_summary_report=None, is_flaky_ self.manual_mark_unmark_flaky = manual_mark_unmark_flaky +class FolderCoverageData(Model): + """ + :param coverage_statistics: + :type coverage_statistics: :class:`CoverageStatistics ` + :param files: + :type files: list of :class:`FileCoverageData ` + :param folders: + :type folders: list of :class:`FolderCoverageData ` + :param name: + :type name: str + """ + + _attribute_map = { + 'coverage_statistics': {'key': 'coverageStatistics', 'type': 'CoverageStatistics'}, + 'files': {'key': 'files', 'type': '[FileCoverageData]'}, + 'folders': {'key': 'folders', 'type': '[FolderCoverageData]'}, + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, coverage_statistics=None, files=None, folders=None, name=None): + super(FolderCoverageData, self).__init__() + self.coverage_statistics = coverage_statistics + self.files = files + self.folders = folders + self.name = name + + class FunctionCoverage(Model): """ :param class_: @@ -690,7 +740,7 @@ class FunctionCoverage(Model): :param source_file: :type source_file: str :param statistics: - :type statistics: :class:`CoverageStatistics ` + :type statistics: :class:`CoverageStatistics ` """ _attribute_map = { @@ -713,7 +763,7 @@ def __init__(self, class_=None, name=None, namespace=None, source_file=None, sta class GraphSubjectBase(Model): """ :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param descriptor: :type descriptor: str :param display_name: @@ -740,7 +790,7 @@ def __init__(self, _links=None, descriptor=None, display_name=None, url=None): class IdentityRef(GraphSubjectBase): """ :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param descriptor: :type descriptor: str :param display_name: @@ -817,6 +867,25 @@ def __init__(self, attempt=None, job_name=None): self.job_name = job_name +class Link(Model): + """ + :param type: + :type type: object + :param url: + :type url: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'object'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, type=None, url=None): + super(Link, self).__init__() + self.type = type + self.url = url + + class ModuleCoverage(Model): """ :param block_count: @@ -826,7 +895,7 @@ class ModuleCoverage(Model): :param file_url: Code Coverage File Url :type file_url: str :param functions: - :type functions: list of :class:`FunctionCoverage ` + :type functions: list of :class:`FunctionCoverage ` :param name: :type name: str :param signature: @@ -834,7 +903,7 @@ class ModuleCoverage(Model): :param signature_age: :type signature_age: int :param statistics: - :type statistics: :class:`CoverageStatistics ` + :type statistics: :class:`CoverageStatistics ` """ _attribute_map = { @@ -901,13 +970,13 @@ class PipelineReference(Model): Pipeline reference :param job_reference: Reference of the job - :type job_reference: :class:`JobReference ` + :type job_reference: :class:`JobReference ` :param phase_reference: Reference of the phase. - :type phase_reference: :class:`PhaseReference ` + :type phase_reference: :class:`PhaseReference ` :param pipeline_id: Reference of the pipeline with which this pipeline instance is related. :type pipeline_id: int :param stage_reference: Reference of the stage. - :type stage_reference: :class:`StageReference ` + :type stage_reference: :class:`StageReference ` """ _attribute_map = { @@ -930,15 +999,15 @@ class PipelineTestMetrics(Model): Test summary of a pipeline instance. :param current_context: Reference of Pipeline instance for which test summary is calculated. - :type current_context: :class:`PipelineReference ` + :type current_context: :class:`PipelineReference ` :param results_analysis: This is the return value for metric ResultsAnalysis Results insights which include failure analysis, increase/decrease in results count analysis. - :type results_analysis: :class:`ResultsAnalysis ` + :type results_analysis: :class:`ResultsAnalysis ` :param result_summary: This is the return value for metric ResultSummary Results summary based on results outcome. - :type result_summary: :class:`ResultSummary ` + :type result_summary: :class:`ResultSummary ` :param run_summary: This is the return value for metric RunSummary Run summary. - :type run_summary: :class:`RunSummary ` + :type run_summary: :class:`RunSummary ` :param summary_at_child: Summary at child node. - :type summary_at_child: list of :class:`PipelineTestMetrics ` + :type summary_at_child: list of :class:`PipelineTestMetrics ` """ _attribute_map = { @@ -1046,11 +1115,11 @@ class ResultsAnalysis(Model): Results insights for runs with state completed and NeedInvestigation. :param previous_context: Reference of pipeline instance from which to compare the results. - :type previous_context: :class:`PipelineReference ` + :type previous_context: :class:`PipelineReference ` :param results_difference: Increase/Decrease in counts of results for a different outcome with respect to PreviousContext. - :type results_difference: :class:`AggregatedResultsDifference ` + :type results_difference: :class:`AggregatedResultsDifference ` :param test_failures_analysis: Failure analysis of results with respect to PreviousContext - :type test_failures_analysis: :class:`TestResultFailuresAnalysis ` + :type test_failures_analysis: :class:`TestResultFailuresAnalysis ` """ _attribute_map = { @@ -1089,7 +1158,7 @@ class ResultsFilter(Model): :param test_point_ids: :type test_point_ids: list of int :param test_results_context: - :type test_results_context: :class:`TestResultsContext ` + :type test_results_context: :class:`TestResultsContext ` :param trend_days: :type trend_days: int """ @@ -1178,7 +1247,7 @@ class RunCreateModel(Model): :param automated: true if test run is automated, false otherwise. By default it will be false. :type automated: bool :param build: An abstracted reference to the build that it belongs. - :type build: :class:`ShallowReference ` + :type build: :class:`ShallowReference ` :param build_drop_location: Drop location of the build used for test run. :type build_drop_location: str :param build_flavor: Flavor of the build used for test run. (E.g: Release, Debug) @@ -1186,7 +1255,7 @@ class RunCreateModel(Model): :param build_platform: Platform of the build used for test run. (E.g.: x86, amd64) :type build_platform: str :param build_reference: BuildReference of the test run. - :type build_reference: :class:`BuildConfiguration ` + :type build_reference: :class:`BuildConfiguration ` :param comment: Comments entered by those analyzing the run. :type comment: str :param complete_date: Completed date time of the run. @@ -1196,39 +1265,39 @@ class RunCreateModel(Model): :param controller: Name of the test controller used for automated run. :type controller: str :param custom_test_fields: Additional properties of test Run. - :type custom_test_fields: list of :class:`CustomTestField ` + :type custom_test_fields: list of :class:`CustomTestField ` :param dtl_aut_environment: An abstracted reference to DtlAutEnvironment. - :type dtl_aut_environment: :class:`ShallowReference ` + :type dtl_aut_environment: :class:`ShallowReference ` :param dtl_test_environment: An abstracted reference to DtlTestEnvironment. - :type dtl_test_environment: :class:`ShallowReference ` + :type dtl_test_environment: :class:`ShallowReference ` :param due_date: Due date and time for test run. :type due_date: str :param environment_details: - :type environment_details: :class:`DtlEnvironmentDetails ` + :type environment_details: :class:`DtlEnvironmentDetails ` :param error_message: Error message associated with the run. :type error_message: str :param filter: Filter used for discovering the Run. - :type filter: :class:`RunFilter ` + :type filter: :class:`RunFilter ` :param iteration: The iteration in which to create the run. Root iteration of the team project will be default :type iteration: str :param name: Name of the test run. :type name: str :param owner: Display name of the owner of the run. - :type owner: :class:`IdentityRef ` + :type owner: :class:`IdentityRef ` :param pipeline_reference: Reference of the pipeline to which this test run belongs. PipelineReference.PipelineId should be equal to RunCreateModel.Build.Id - :type pipeline_reference: :class:`PipelineReference ` + :type pipeline_reference: :class:`PipelineReference ` :param plan: An abstracted reference to the plan that it belongs. - :type plan: :class:`ShallowReference ` + :type plan: :class:`ShallowReference ` :param point_ids: IDs of the test points to use in the run. :type point_ids: list of int :param release_environment_uri: URI of release environment associated with the run. :type release_environment_uri: str :param release_reference: Reference to release associated with test run. - :type release_reference: :class:`ReleaseReference ` + :type release_reference: :class:`ReleaseReference ` :param release_uri: URI of release associated with the run. :type release_uri: str :param run_summary: Run summary for run Type = NoConfigRun. - :type run_summary: list of :class:`RunSummaryModel ` + :type run_summary: list of :class:`RunSummaryModel ` :param run_timeout: Timespan till the run times out. :type run_timeout: object :param source_workflow: SourceWorkFlow(CI/CD) of the test run. @@ -1238,13 +1307,13 @@ class RunCreateModel(Model): :param state: The state of the run. Type TestRunState Valid states - NotStarted, InProgress, Waiting :type state: str :param tags: Tags to attach with the test run, maximum of 5 tags can be added to run. - :type tags: list of :class:`TestTag ` + :type tags: list of :class:`TestTag ` :param test_configurations_mapping: TestConfigurationMapping of the test run. :type test_configurations_mapping: str :param test_environment_id: ID of the test environment associated with the run. :type test_environment_id: str :param test_settings: An abstracted reference to the test settings resource. - :type test_settings: :class:`ShallowReference ` + :type test_settings: :class:`ShallowReference ` :param type: Type of the run(RunType) Valid Values : (Unspecified, Normal, Blocking, Web, MtrRunInitiatedFromWeb, RunWithDtlEnv, NoConfigRun) :type type: str """ @@ -1358,7 +1427,7 @@ class RunStatistic(Model): :param outcome: Test result outcome :type outcome: str :param resolution_state: Test run Resolution State. - :type resolution_state: :class:`TestResolutionState ` + :type resolution_state: :class:`TestResolutionState ` :param result_metadata: ResultMetadata for the given outcome/count. :type result_metadata: object :param state: State of the test run @@ -1443,7 +1512,7 @@ def __init__(self, duration=None, result_count=None, test_outcome=None): class RunUpdateModel(Model): """ :param build: An abstracted reference to the build that it belongs. - :type build: :class:`ShallowReference ` + :type build: :class:`ShallowReference ` :param build_drop_location: Drop location of the build used for test run. :type build_drop_location: str :param build_flavor: Flavor of the build used for test run. (E.g: Release, Debug) @@ -1459,11 +1528,11 @@ class RunUpdateModel(Model): :param delete_in_progress_results: true to delete inProgess Results , false otherwise. :type delete_in_progress_results: bool :param dtl_aut_environment: An abstracted reference to DtlAutEnvironment. - :type dtl_aut_environment: :class:`ShallowReference ` + :type dtl_aut_environment: :class:`ShallowReference ` :param dtl_environment: An abstracted reference to DtlEnvironment. - :type dtl_environment: :class:`ShallowReference ` + :type dtl_environment: :class:`ShallowReference ` :param dtl_environment_details: - :type dtl_environment_details: :class:`DtlEnvironmentDetails ` + :type dtl_environment_details: :class:`DtlEnvironmentDetails ` :param due_date: Due date and time for test run. :type due_date: str :param error_message: Error message associated with the run. @@ -1471,7 +1540,7 @@ class RunUpdateModel(Model): :param iteration: The iteration in which to create the run. :type iteration: str :param log_entries: Log entries associated with the run. Use a comma-separated list of multiple log entry objects. { logEntry }, { logEntry }, ... - :type log_entries: list of :class:`TestMessageLogDetails ` + :type log_entries: list of :class:`TestMessageLogDetails ` :param name: Name of the test run. :type name: str :param release_environment_uri: URI of release environment associated with the run. @@ -1479,7 +1548,7 @@ class RunUpdateModel(Model): :param release_uri: URI of release associated with the run. :type release_uri: str :param run_summary: Run summary for run Type = NoConfigRun. - :type run_summary: list of :class:`RunSummaryModel ` + :type run_summary: list of :class:`RunSummaryModel ` :param source_workflow: SourceWorkFlow(CI/CD) of the test run. :type source_workflow: str :param started_date: Start date time of the run. @@ -1489,11 +1558,11 @@ class RunUpdateModel(Model): :param substate: The types of sub states for test run. :type substate: object :param tags: Tags to attach with the test run. - :type tags: list of :class:`TestTag ` + :type tags: list of :class:`TestTag ` :param test_environment_id: ID of the test environment associated with the run. :type test_environment_id: str :param test_settings: An abstracted reference to test setting resource. - :type test_settings: :class:`ShallowReference ` + :type test_settings: :class:`ShallowReference ` """ _attribute_map = { @@ -1555,6 +1624,88 @@ def __init__(self, build=None, build_drop_location=None, build_flavor=None, buil self.test_settings = test_settings +class Session(Model): + """ + This session object is exposed outside for 1MRX to consume and we internally convert to server.OneMRXSession in server.SessionDataContractConverter + + :param end_time_uTC: Session end time + :type end_time_uTC: datetime + :param layout: Session layout + :type layout: list of :class:`object ` + :param name: Session name + :type name: str + :param result: Session result + :type result: object + :param session_source_pipeline: Session source pipeline details + :type session_source_pipeline: :class:`SessionSourcePipeline ` + :param source: Session source + :type source: :class:`Source ` + :param start_time_uTC: Session start time + :type start_time_uTC: datetime + :param state: Session state + :type state: object + :param test_runs: List of test run ids + :type test_runs: list of int + :param timeline: Session timeline + :type timeline: list of :class:`Timeline ` + :param type: Session type + :type type: str + :param uid: Session Uid + :type uid: str + """ + + _attribute_map = { + 'end_time_uTC': {'key': 'endTimeUTC', 'type': 'iso-8601'}, + 'layout': {'key': 'layout', 'type': '[object]'}, + 'name': {'key': 'name', 'type': 'str'}, + 'result': {'key': 'result', 'type': 'object'}, + 'session_source_pipeline': {'key': 'sessionSourcePipeline', 'type': 'SessionSourcePipeline'}, + 'source': {'key': 'source', 'type': 'Source'}, + 'start_time_uTC': {'key': 'startTimeUTC', 'type': 'iso-8601'}, + 'state': {'key': 'state', 'type': 'object'}, + 'test_runs': {'key': 'testRuns', 'type': '[int]'}, + 'timeline': {'key': 'timeline', 'type': '[Timeline]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'uid': {'key': 'uid', 'type': 'str'} + } + + def __init__(self, end_time_uTC=None, layout=None, name=None, result=None, session_source_pipeline=None, source=None, start_time_uTC=None, state=None, test_runs=None, timeline=None, type=None, uid=None): + super(Session, self).__init__() + self.end_time_uTC = end_time_uTC + self.layout = layout + self.name = name + self.result = result + self.session_source_pipeline = session_source_pipeline + self.source = source + self.start_time_uTC = start_time_uTC + self.state = state + self.test_runs = test_runs + self.timeline = timeline + self.type = type + self.uid = uid + + +class SessionSourcePipeline(Model): + """ + SessionSourcePipeline + + :param build_id: Source pipeline id + :type build_id: int + :param build_url: Source pipeline url + :type build_url: str + """ + + _attribute_map = { + 'build_id': {'key': 'buildId', 'type': 'int'}, + 'build_url': {'key': 'buildUrl', 'type': 'str'} + } + + def __init__(self, build_id=None, build_url=None): + super(SessionSourcePipeline, self).__init__() + self.build_id = build_id + self.build_url = build_url + + class ShallowReference(Model): """ An abstracted reference to some other resource. This class is used to provide the build data contracts with a uniform way to reference other resources in a way that provides easy traversal through links. @@ -1660,6 +1811,58 @@ def __init__(self, id=None, revision=None): self.revision = revision +class Source(Model): + """ + Session source + + :param links: Source links + :type links: list of :class:`Link ` + :param origin_system: Source origin system + :type origin_system: str + :param session_id: Source session id + :type session_id: str + :param tenant_id: Source tenant Id + :type tenant_id: str + :param tenant_name: Source tenant name + :type tenant_name: str + """ + + _attribute_map = { + 'links': {'key': 'links', 'type': '[Link]'}, + 'origin_system': {'key': 'originSystem', 'type': 'str'}, + 'session_id': {'key': 'sessionId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'tenant_name': {'key': 'tenantName', 'type': 'str'} + } + + def __init__(self, links=None, origin_system=None, session_id=None, tenant_id=None, tenant_name=None): + super(Source, self).__init__() + self.links = links + self.origin_system = origin_system + self.session_id = session_id + self.tenant_id = tenant_id + self.tenant_name = tenant_name + + +class SourceViewBuildCoverage(Model): + """ + :param configuration: Build Configuration + :type configuration: :class:`BuildConfiguration ` + :param folder_coverage_data: Folder Level CoverageDetails + :type folder_coverage_data: :class:`FolderCoverageData ` + """ + + _attribute_map = { + 'configuration': {'key': 'configuration', 'type': 'BuildConfiguration'}, + 'folder_coverage_data': {'key': 'folderCoverageData', 'type': 'FolderCoverageData'} + } + + def __init__(self, configuration=None, folder_coverage_data=None): + super(SourceViewBuildCoverage, self).__init__() + self.configuration = configuration + self.folder_coverage_data = folder_coverage_data + + class StageReference(Model): """ Stage in pipeline @@ -1828,9 +2031,9 @@ class TestCaseResult(Model): :param afn_strip_id: Test attachment ID of action recording. :type afn_strip_id: int :param area: Reference to area path of test. - :type area: :class:`ShallowReference ` + :type area: :class:`ShallowReference ` :param associated_bugs: Reference to bugs linked to test result. - :type associated_bugs: list of :class:`ShallowReference ` + :type associated_bugs: list of :class:`ShallowReference ` :param automated_test_id: ID representing test method in a dll. :type automated_test_id: str :param automated_test_name: Fully qualified name of test executed. @@ -1842,9 +2045,9 @@ class TestCaseResult(Model): :param automated_test_type_id: TypeId of automated test. :type automated_test_type_id: str :param build: Shallow reference to build associated with test result. - :type build: :class:`ShallowReference ` + :type build: :class:`ShallowReference ` :param build_reference: Reference to build associated with test result. - :type build_reference: :class:`BuildReference ` + :type build_reference: :class:`BuildReference ` :param comment: Comment in a test result with maxSize= 1000 chars. :type comment: str :param completed_date: Time when test execution completed(UTC). Completed date should be greater than StartedDate. @@ -1852,39 +2055,39 @@ class TestCaseResult(Model): :param computer_name: Machine name where test executed. :type computer_name: str :param configuration: Reference to test configuration. Type ShallowReference. - :type configuration: :class:`ShallowReference ` + :type configuration: :class:`ShallowReference ` :param created_date: Timestamp when test result created(UTC). :type created_date: datetime :param custom_fields: Additional properties of test result. - :type custom_fields: list of :class:`CustomTestField ` + :type custom_fields: list of :class:`CustomTestField ` :param duration_in_ms: Duration of test execution in milliseconds. If not provided value will be set as CompletedDate - StartedDate :type duration_in_ms: float :param error_message: Error message in test execution. :type error_message: str :param failing_since: Information when test results started failing. - :type failing_since: :class:`FailingSince ` + :type failing_since: :class:`FailingSince ` :param failure_type: Failure type of test result. Valid Value= (Known Issue, New Issue, Regression, Unknown, None) :type failure_type: str :param id: ID of a test result. :type id: int :param iteration_details: Test result details of test iterations used only for Manual Testing. - :type iteration_details: list of :class:`TestIterationDetailsModel ` + :type iteration_details: list of :class:`TestIterationDetailsModel ` :param last_updated_by: Reference to identity last updated test result. - :type last_updated_by: :class:`IdentityRef ` + :type last_updated_by: :class:`IdentityRef ` :param last_updated_date: Last updated datetime of test result(UTC). :type last_updated_date: datetime :param outcome: Test outcome of test result. Valid values = (Unspecified, None, Passed, Failed, Inconclusive, Timeout, Aborted, Blocked, NotExecuted, Warning, Error, NotApplicable, Paused, InProgress, NotImpacted) :type outcome: str :param owner: Reference to test owner. - :type owner: :class:`IdentityRef ` + :type owner: :class:`IdentityRef ` :param priority: Priority of test executed. :type priority: int :param project: Reference to team project. - :type project: :class:`ShallowReference ` + :type project: :class:`ShallowReference ` :param release: Shallow reference to release associated with test result. - :type release: :class:`ShallowReference ` + :type release: :class:`ShallowReference ` :param release_reference: Reference to release associated with test result. - :type release_reference: :class:`ReleaseReference ` + :type release_reference: :class:`ReleaseReference ` :param reset_count: ResetCount. :type reset_count: int :param resolution_state: Resolution state of test result. @@ -1896,7 +2099,7 @@ class TestCaseResult(Model): :param revision: Revision number of test result. :type revision: int :param run_by: Reference to identity executed the test. - :type run_by: :class:`IdentityRef ` + :type run_by: :class:`IdentityRef ` :param stack_trace: Stacktrace with maxSize= 1000 chars. :type stack_trace: str :param started_date: Time when test execution started(UTC). @@ -1904,9 +2107,9 @@ class TestCaseResult(Model): :param state: State of test result. Type TestRunState. :type state: str :param sub_results: List of sub results inside a test result, if ResultGroupType is not None, it holds corresponding type sub results. - :type sub_results: list of :class:`TestSubResult ` + :type sub_results: list of :class:`TestSubResult ` :param test_case: Reference to the test executed. - :type test_case: :class:`ShallowReference ` + :type test_case: :class:`ShallowReference ` :param test_case_reference_id: Reference ID of test used by test result. Type TestResultMetaData :type test_case_reference_id: int :param test_case_revision: TestCaseRevision Number. @@ -1914,13 +2117,13 @@ class TestCaseResult(Model): :param test_case_title: Name of test. :type test_case_title: str :param test_plan: Reference to test plan test case workitem is part of. - :type test_plan: :class:`ShallowReference ` + :type test_plan: :class:`ShallowReference ` :param test_point: Reference to the test point executed. - :type test_point: :class:`ShallowReference ` + :type test_point: :class:`ShallowReference ` :param test_run: Reference to test run. - :type test_run: :class:`ShallowReference ` + :type test_run: :class:`ShallowReference ` :param test_suite: Reference to test suite test case workitem is part of. - :type test_suite: :class:`ShallowReference ` + :type test_suite: :class:`ShallowReference ` :param url: Url of test result. :type url: str """ @@ -2114,7 +2317,7 @@ class TestFailureDetails(Model): :param count: :type count: int :param test_results: - :type test_results: list of :class:`TestCaseResultIdentifier ` + :type test_results: list of :class:`TestCaseResultIdentifier ` """ _attribute_map = { @@ -2131,13 +2334,13 @@ def __init__(self, count=None, test_results=None): class TestFailuresAnalysis(Model): """ :param existing_failures: - :type existing_failures: :class:`TestFailureDetails ` + :type existing_failures: :class:`TestFailureDetails ` :param fixed_tests: - :type fixed_tests: :class:`TestFailureDetails ` + :type fixed_tests: :class:`TestFailureDetails ` :param new_failures: - :type new_failures: :class:`TestFailureDetails ` + :type new_failures: :class:`TestFailureDetails ` :param previous_context: - :type previous_context: :class:`TestResultsContext ` + :type previous_context: :class:`TestResultsContext ` """ _attribute_map = { @@ -2195,7 +2398,7 @@ class TestHistoryQuery(Model): :param release_env_definition_id: Get the results history only for this ReleaseEnvDefinitionId. This to get used in query GroupBy should be Environment. :type release_env_definition_id: int :param results_for_group: List of TestResultHistoryForGroup which are grouped by GroupBy - :type results_for_group: list of :class:`TestResultHistoryForGroup ` + :type results_for_group: list of :class:`TestResultHistoryForGroup ` :param test_case_id: Get the results history only for this testCaseId. This to get used in query to filter the result along with automatedtestname :type test_case_id: int :param trend_days: Number of days for which history to collect. Maximum supported value is 7 days. Default is 7 days. @@ -2234,9 +2437,9 @@ class TestIterationDetailsModel(Model): Represents a test iteration result. :param action_results: Test step results in an iteration. - :type action_results: list of :class:`TestActionResultModel ` + :type action_results: list of :class:`TestActionResultModel ` :param attachments: Reference to attachments in test iteration result. - :type attachments: list of :class:`TestCaseResultAttachmentModel ` + :type attachments: list of :class:`TestCaseResultAttachmentModel ` :param comment: Comment in test iteration result. :type comment: str :param completed_date: Time when execution completed(UTC). @@ -2250,7 +2453,7 @@ class TestIterationDetailsModel(Model): :param outcome: Test outcome if test iteration result. :type outcome: str :param parameters: Test parameters in an iteration. - :type parameters: list of :class:`TestResultParameterModel ` + :type parameters: list of :class:`TestResultParameterModel ` :param started_date: Time when execution started(UTC). :type started_date: datetime :param url: Url to test iteration result. @@ -2291,7 +2494,7 @@ class TestLog(Model): Represents Test Log Result object. :param log_reference: Test Log Context run, build - :type log_reference: :class:`TestLogReference ` + :type log_reference: :class:`TestLogReference ` :param meta_data: Meta data for Log file :type meta_data: dict :param modified_on: LastUpdatedDate for Log file @@ -2364,6 +2567,60 @@ def __init__(self, build_id=None, file_path=None, release_env_id=None, release_i self.type = type +class TestLogStoreAttachment(Model): + """ + Attachment metadata for test attachments from LogStore. + + :param attachment_type: Attachment type. + :type attachment_type: object + :param comment: Comment associated with attachment. + :type comment: str + :param created_date: Attachment created date. + :type created_date: datetime + :param file_name: Attachment file name. + :type file_name: str + :param size: Attachment size. + :type size: long + :param url: Attachment Url. + :type url: str + """ + + _attribute_map = { + 'attachment_type': {'key': 'attachmentType', 'type': 'object'}, + 'comment': {'key': 'comment', 'type': 'str'}, + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'file_name': {'key': 'fileName', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'long'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, attachment_type=None, comment=None, created_date=None, file_name=None, size=None, url=None): + super(TestLogStoreAttachment, self).__init__() + self.attachment_type = attachment_type + self.comment = comment + self.created_date = created_date + self.file_name = file_name + self.size = size + self.url = url + + +class TestLogStoreAttachmentReference(Model): + """ + Reference to test attachment. + + :param url: Url to download the attachment. + :type url: str + """ + + _attribute_map = { + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, url=None): + super(TestLogStoreAttachmentReference, self).__init__() + self.url = url + + class TestLogStoreEndpointDetails(Model): """ Represents Test Log store endpoint details. @@ -2467,7 +2724,7 @@ class TestResolutionState(Model): :param name: Test Resolution State Name. :type name: str :param project: - :type project: :class:`ShallowReference ` + :type project: :class:`ShallowReference ` """ _attribute_map = { @@ -2486,9 +2743,9 @@ def __init__(self, id=None, name=None, project=None): class TestResultDocument(Model): """ :param operation_reference: - :type operation_reference: :class:`TestOperationReference ` + :type operation_reference: :class:`TestOperationReference ` :param payload: - :type payload: :class:`TestResultPayload ` + :type payload: :class:`TestResultPayload ` """ _attribute_map = { @@ -2505,11 +2762,11 @@ def __init__(self, operation_reference=None, payload=None): class TestResultFailuresAnalysis(Model): """ :param existing_failures: - :type existing_failures: :class:`TestFailureDetails ` + :type existing_failures: :class:`TestFailureDetails ` :param fixed_tests: - :type fixed_tests: :class:`TestFailureDetails ` + :type fixed_tests: :class:`TestFailureDetails ` :param new_failures: - :type new_failures: :class:`TestFailureDetails ` + :type new_failures: :class:`TestFailureDetails ` """ _attribute_map = { @@ -2525,12 +2782,50 @@ def __init__(self, existing_failures=None, fixed_tests=None, new_failures=None): self.new_failures = new_failures +class TestResultFailureType(Model): + """ + The test failure type resource + + :param id: ID of the test failure type + :type id: int + :param name: Name of the test failure type + :type name: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, id=None, name=None): + super(TestResultFailureType, self).__init__() + self.id = id + self.name = name + + +class TestResultFailureTypeRequestModel(Model): + """ + The test failure type request model + + :param name: Name of the test failure type + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, name=None): + super(TestResultFailureTypeRequestModel, self).__init__() + self.name = name + + class TestResultHistory(Model): """ :param group_by_field: :type group_by_field: str :param results_for_group: - :type results_for_group: list of :class:`TestResultHistoryDetailsForGroup ` + :type results_for_group: list of :class:`TestResultHistoryDetailsForGroup ` """ _attribute_map = { @@ -2549,7 +2844,7 @@ class TestResultHistoryDetailsForGroup(Model): :param group_by_value: :type group_by_value: object :param latest_result: - :type latest_result: :class:`TestCaseResult ` + :type latest_result: :class:`TestCaseResult ` """ _attribute_map = { @@ -2572,7 +2867,7 @@ class TestResultHistoryForGroup(Model): :param group_by_value: Name or Id of the group identifier by which results are grouped together. :type group_by_value: str :param results: List of results for GroupByValue - :type results: list of :class:`TestCaseResult ` + :type results: list of :class:`TestCaseResult ` """ _attribute_map = { @@ -2597,7 +2892,7 @@ class TestResultMetaData(Model): :param automated_test_storage: AutomatedTestStorage of test result. :type automated_test_storage: str :param flaky_identifiers: List of Flaky Identifier for TestCaseReferenceId - :type flaky_identifiers: list of :class:`TestFlakyIdentifier ` + :type flaky_identifiers: list of :class:`TestFlakyIdentifier ` :param owner: Owner of test result. :type owner: str :param priority: Priority of test result. @@ -2634,7 +2929,7 @@ class TestResultMetaDataUpdateInput(Model): Represents a TestResultMetaData Input :param flaky_identifiers: List of Flaky Identifiers - :type flaky_identifiers: list of :class:`TestFlakyIdentifier ` + :type flaky_identifiers: list of :class:`TestFlakyIdentifier ` """ _attribute_map = { @@ -2744,13 +3039,13 @@ def __init__(self, comment=None, name=None, stream=None): class TestResultsContext(Model): """ :param build: - :type build: :class:`BuildReference ` + :type build: :class:`BuildReference ` :param context_type: :type context_type: object :param pipeline_reference: - :type pipeline_reference: :class:`PipelineReference ` + :type pipeline_reference: :class:`PipelineReference ` :param release: - :type release: :class:`ReleaseReference ` + :type release: :class:`ReleaseReference ` """ _attribute_map = { @@ -2773,7 +3068,7 @@ class TestResultsDetails(Model): :param group_by_field: :type group_by_field: str :param results_for_group: - :type results_for_group: list of :class:`TestResultsDetailsForGroup ` + :type results_for_group: list of :class:`TestResultsDetailsForGroup ` """ _attribute_map = { @@ -2792,7 +3087,7 @@ class TestResultsDetailsForGroup(Model): :param group_by_value: :type group_by_value: object :param results: - :type results: list of :class:`TestCaseResult ` + :type results: list of :class:`TestCaseResult ` :param results_count_by_outcome: :type results_count_by_outcome: dict :param tags: @@ -2819,9 +3114,9 @@ class TestResultsQuery(Model): :param fields: :type fields: list of str :param results: - :type results: list of :class:`TestCaseResult ` + :type results: list of :class:`TestCaseResult ` :param results_filter: - :type results_filter: :class:`ResultsFilter ` + :type results_filter: :class:`ResultsFilter ` """ _attribute_map = { @@ -2840,9 +3135,9 @@ def __init__(self, fields=None, results=None, results_filter=None): class TestResultsSettings(Model): """ :param flaky_settings: IsRequired and EmitDefaultValue are passed as false as if users doesn't pass anything, should not come for serialisation and deserialisation. - :type flaky_settings: :class:`FlakySettings ` + :type flaky_settings: :class:`FlakySettings ` :param new_test_result_logging_settings: - :type new_test_result_logging_settings: :class:`NewTestResultLoggingSettings ` + :type new_test_result_logging_settings: :class:`NewTestResultLoggingSettings ` """ _attribute_map = { @@ -2859,15 +3154,15 @@ def __init__(self, flaky_settings=None, new_test_result_logging_settings=None): class TestResultSummary(Model): """ :param aggregated_results_analysis: - :type aggregated_results_analysis: :class:`AggregatedResultsAnalysis ` + :type aggregated_results_analysis: :class:`AggregatedResultsAnalysis ` :param no_config_runs_count: :type no_config_runs_count: int :param team_project: - :type team_project: :class:`TeamProjectReference ` + :type team_project: :class:`TeamProjectReference ` :param test_failures: - :type test_failures: :class:`TestFailuresAnalysis ` + :type test_failures: :class:`TestFailuresAnalysis ` :param test_results_context: - :type test_results_context: :class:`TestResultsContext ` + :type test_results_context: :class:`TestResultsContext ` :param total_runs_count: :type total_runs_count: int """ @@ -2894,9 +3189,9 @@ def __init__(self, aggregated_results_analysis=None, no_config_runs_count=None, class TestResultsUpdateSettings(Model): """ :param flaky_settings: FlakySettings defines Flaky Settings Data. - :type flaky_settings: :class:`FlakySettings ` + :type flaky_settings: :class:`FlakySettings ` :param new_test_result_logging_settings: NewTestResultLoggingSettings defines the setting for logging new test results - :type new_test_result_logging_settings: :class:`NewTestResultLoggingSettings ` + :type new_test_result_logging_settings: :class:`NewTestResultLoggingSettings ` """ _attribute_map = { @@ -2958,9 +3253,9 @@ class TestRun(Model): Test run details. :param build: Build associated with this test run. - :type build: :class:`ShallowReference ` + :type build: :class:`ShallowReference ` :param build_configuration: Build configuration details associated with this test run. - :type build_configuration: :class:`BuildConfiguration ` + :type build_configuration: :class:`BuildConfiguration ` :param comment: Comments entered by those analyzing the run. :type comment: str :param completed_date: Completed date time of the run. @@ -2970,21 +3265,21 @@ class TestRun(Model): :param created_date: Test Run CreatedDate. :type created_date: datetime :param custom_fields: List of Custom Fields for TestRun. - :type custom_fields: list of :class:`CustomTestField ` + :type custom_fields: list of :class:`CustomTestField ` :param drop_location: Drop Location for the test Run. :type drop_location: str :param dtl_aut_environment: - :type dtl_aut_environment: :class:`ShallowReference ` + :type dtl_aut_environment: :class:`ShallowReference ` :param dtl_environment: - :type dtl_environment: :class:`ShallowReference ` + :type dtl_environment: :class:`ShallowReference ` :param dtl_environment_creation_details: - :type dtl_environment_creation_details: :class:`DtlEnvironmentDetails ` + :type dtl_environment_creation_details: :class:`DtlEnvironmentDetails ` :param due_date: Due date and time for test run. :type due_date: datetime :param error_message: Error message associated with the run. :type error_message: str :param filter: - :type filter: :class:`RunFilter ` + :type filter: :class:`RunFilter ` :param id: ID of the test run. :type id: int :param incomplete_tests: Number of Incomplete Tests. @@ -2994,7 +3289,7 @@ class TestRun(Model): :param iteration: The iteration to which the run belongs. :type iteration: str :param last_updated_by: Team foundation ID of the last updated the test run. - :type last_updated_by: :class:`IdentityRef ` + :type last_updated_by: :class:`IdentityRef ` :param last_updated_date: Last updated date and time :type last_updated_date: datetime :param name: Name of the test run. @@ -3002,21 +3297,21 @@ class TestRun(Model): :param not_applicable_tests: Number of Not Applicable Tests. :type not_applicable_tests: int :param owner: Team Foundation ID of the owner of the runs. - :type owner: :class:`IdentityRef ` + :type owner: :class:`IdentityRef ` :param passed_tests: Number of passed tests in the run :type passed_tests: int :param phase: Phase/State for the testRun. :type phase: str :param pipeline_reference: Reference of the pipeline to which this test run belongs. - :type pipeline_reference: :class:`PipelineReference ` + :type pipeline_reference: :class:`PipelineReference ` :param plan: Test plan associated with this test run. - :type plan: :class:`ShallowReference ` + :type plan: :class:`ShallowReference ` :param post_process_state: Post Process State. :type post_process_state: str :param project: Project associated with this run. - :type project: :class:`ShallowReference ` + :type project: :class:`ShallowReference ` :param release: Release Reference for the Test Run. - :type release: :class:`ReleaseReference ` + :type release: :class:`ReleaseReference ` :param release_environment_uri: Release Environment Uri for TestRun. :type release_environment_uri: str :param release_uri: Release Uri for TestRun. @@ -3024,7 +3319,7 @@ class TestRun(Model): :param revision: :type revision: int :param run_statistics: RunSummary by outcome. - :type run_statistics: list of :class:`RunStatistic ` + :type run_statistics: list of :class:`RunStatistic ` :param started_date: Start date time of the run. :type started_date: datetime :param state: The state of the run. Type TestRunState Valid states - Unspecified ,NotStarted, InProgress, Completed, Waiting, Aborted, NeedsInvestigation @@ -3032,13 +3327,13 @@ class TestRun(Model): :param substate: TestRun Substate. :type substate: object :param tags: Tags attached with this test run. - :type tags: list of :class:`TestTag ` + :type tags: list of :class:`TestTag ` :param test_environment: Test environment associated with the run. - :type test_environment: :class:`TestEnvironment ` + :type test_environment: :class:`TestEnvironment ` :param test_message_log_id: :type test_message_log_id: int :param test_settings: - :type test_settings: :class:`ShallowReference ` + :type test_settings: :class:`ShallowReference ` :param total_tests: Total tests in the run :type total_tests: int :param unanalyzed_tests: Number of failed tests in the run. @@ -3153,11 +3448,11 @@ class TestRunCoverage(Model): :param last_error: Last Error :type last_error: str :param modules: List of Modules Coverage - :type modules: list of :class:`ModuleCoverage ` + :type modules: list of :class:`ModuleCoverage ` :param state: State :type state: str :param test_run: Reference of test Run. - :type test_run: :class:`ShallowReference ` + :type test_run: :class:`ShallowReference ` """ _attribute_map = { @@ -3180,9 +3475,9 @@ class TestRunStatistic(Model): Test run statistics. :param run: - :type run: :class:`ShallowReference ` + :type run: :class:`ShallowReference ` :param run_statistics: - :type run_statistics: list of :class:`RunStatistic ` + :type run_statistics: list of :class:`RunStatistic ` """ _attribute_map = { @@ -3248,9 +3543,9 @@ class TestSubResult(Model): :param computer_name: Machine where test executed. :type computer_name: str :param configuration: Reference to test configuration. - :type configuration: :class:`ShallowReference ` + :type configuration: :class:`ShallowReference ` :param custom_fields: Additional properties of sub result. - :type custom_fields: list of :class:`CustomTestField ` + :type custom_fields: list of :class:`CustomTestField ` :param display_name: Name of sub result. :type display_name: str :param duration_in_ms: Duration of test execution. @@ -3274,9 +3569,9 @@ class TestSubResult(Model): :param started_date: Time when test execution started(UTC). :type started_date: datetime :param sub_results: List of sub results inside a sub result, if ResultGroupType is not None, it holds corresponding type sub results. - :type sub_results: list of :class:`TestSubResult ` + :type sub_results: list of :class:`TestSubResult ` :param test_result: Reference to test result. - :type test_result: :class:`TestCaseResultIdentifier ` + :type test_result: :class:`TestCaseResultIdentifier ` :param url: Url of sub result. :type url: str """ @@ -3329,9 +3624,9 @@ def __init__(self, comment=None, completed_date=None, computer_name=None, config class TestSummaryForWorkItem(Model): """ :param summary: - :type summary: :class:`AggregatedDataForResultTrend ` + :type summary: :class:`AggregatedDataForResultTrend ` :param work_item: - :type work_item: :class:`WorkItemReference ` + :type work_item: :class:`WorkItemReference ` """ _attribute_map = { @@ -3399,9 +3694,9 @@ def __init__(self, tags=None): class TestToWorkItemLinks(Model): """ :param test: - :type test: :class:`TestMethod ` + :type test: :class:`TestMethod ` :param work_items: - :type work_items: list of :class:`WorkItemReference ` + :type work_items: list of :class:`WorkItemReference ` """ _attribute_map = { @@ -3415,6 +3710,29 @@ def __init__(self, test=None, work_items=None): self.work_items = work_items +class Timeline(Model): + """ + :param display: + :type display: str + :param timestamp_uTC: + :type timestamp_uTC: datetime + :param type: + :type type: object + """ + + _attribute_map = { + 'display': {'key': 'display', 'type': 'str'}, + 'timestamp_uTC': {'key': 'timestampUTC', 'type': 'iso-8601'}, + 'type': {'key': 'type', 'type': 'object'} + } + + def __init__(self, display=None, timestamp_uTC=None, type=None): + super(Timeline, self).__init__() + self.display = display + self.timestamp_uTC = timestamp_uTC + self.type = type + + class WorkItemReference(Model): """ WorkItem reference Details. @@ -3453,9 +3771,9 @@ class WorkItemToTestLinks(Model): :param executed_in: :type executed_in: object :param tests: - :type tests: list of :class:`TestMethod ` + :type tests: list of :class:`TestMethod ` :param work_item: - :type work_item: :class:`WorkItemReference ` + :type work_item: :class:`WorkItemReference ` """ _attribute_map = { @@ -3492,7 +3810,7 @@ class TestActionResultModel(TestResultModelBase): :param iteration_id: Iteration ID of test action result. :type iteration_id: int :param shared_step_model: Reference to shared step workitem. - :type shared_step_model: :class:`SharedStepModel ` + :type shared_step_model: :class:`SharedStepModel ` :param step_identifier: This is step Id of test case. For shared step, it is step Id of shared step in test case workitem; step Id in shared step. Example: TestCase workitem has two steps: 1) Normal step with Id = 1 2) Shared Step with Id = 2. Inside shared step: a) Normal Step with Id = 1 Value for StepIdentifier for First step: "1" Second step: "2;1" :type step_identifier: str :param url: Url of test action result. Deprecated in hosted environment. @@ -3541,14 +3859,17 @@ def __init__(self, comment=None, completed_date=None, duration_in_ms=None, error 'DtlEnvironmentDetails', 'FailingSince', 'FieldDetailsForTestResults', + 'FileCoverageData', 'FileCoverageRequest', 'FlakyDetection', 'FlakyDetectionPipelines', 'FlakySettings', + 'FolderCoverageData', 'FunctionCoverage', 'GraphSubjectBase', 'IdentityRef', 'JobReference', + 'Link', 'ModuleCoverage', 'NewTestResultLoggingSettings', 'PhaseReference', @@ -3567,9 +3888,13 @@ def __init__(self, comment=None, completed_date=None, duration_in_ms=None, error 'RunSummary', 'RunSummaryModel', 'RunUpdateModel', + 'Session', + 'SessionSourcePipeline', 'ShallowReference', 'ShallowTestCaseResult', 'SharedStepModel', + 'Source', + 'SourceViewBuildCoverage', 'StageReference', 'TeamProjectReference', 'TestAttachment', @@ -3586,6 +3911,8 @@ def __init__(self, comment=None, completed_date=None, duration_in_ms=None, error 'TestIterationDetailsModel', 'TestLog', 'TestLogReference', + 'TestLogStoreAttachment', + 'TestLogStoreAttachmentReference', 'TestLogStoreEndpointDetails', 'TestMessageLogDetails', 'TestMethod', @@ -3593,6 +3920,8 @@ def __init__(self, comment=None, completed_date=None, duration_in_ms=None, error 'TestResolutionState', 'TestResultDocument', 'TestResultFailuresAnalysis', + 'TestResultFailureType', + 'TestResultFailureTypeRequestModel', 'TestResultHistory', 'TestResultHistoryDetailsForGroup', 'TestResultHistoryForGroup', @@ -3619,6 +3948,7 @@ def __init__(self, comment=None, completed_date=None, duration_in_ms=None, error 'TestTagSummary', 'TestTagsUpdateModel', 'TestToWorkItemLinks', + 'Timeline', 'WorkItemReference', 'WorkItemToTestLinks', 'TestActionResultModel', diff --git a/azure-devops/azure/devops/v7_2/test_results/test_results_client.py b/azure-devops/azure/devops/v7_2/test_results/test_results_client.py new file mode 100644 index 00000000..bd24fe6c --- /dev/null +++ b/azure-devops/azure/devops/v7_2/test_results/test_results_client.py @@ -0,0 +1,2654 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +# Generated file, DO NOT EDIT +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------------------------- + +from msrest import Serializer, Deserializer +from ...client import Client +from . import models + + +class TestResultsClient(Client): + """TestResults + :param str base_url: Service URL + :param Authentication creds: Authenticated credentials. + """ + + def __init__(self, base_url=None, creds=None): + super(TestResultsClient, self).__init__(base_url, creds) + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + resource_area_identifier = 'c83eaf52-edf3-4034-ae11-17d38f25404c' + + def create_test_iteration_result_attachment(self, attachment_request_model, project, run_id, test_case_result_id, iteration_id, action_path=None): + """CreateTestIterationResultAttachment. + [Preview API] + :param :class:` ` attachment_request_model: + :param str project: Project ID or project name + :param int run_id: + :param int test_case_result_id: + :param int iteration_id: + :param str action_path: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + if test_case_result_id is not None: + route_values['testCaseResultId'] = self._serialize.url('test_case_result_id', test_case_result_id, 'int') + query_parameters = {} + if iteration_id is not None: + query_parameters['iterationId'] = self._serialize.query('iteration_id', iteration_id, 'int') + if action_path is not None: + query_parameters['actionPath'] = self._serialize.query('action_path', action_path, 'str') + content = self._serialize.body(attachment_request_model, 'TestAttachmentRequestModel') + response = self._send(http_method='POST', + location_id='2a632e97-e014-4275-978f-8e5c4906d4b3', + version='7.2-preview.1', + route_values=route_values, + query_parameters=query_parameters, + content=content) + return self._deserialize('TestAttachmentReference', response) + + def create_test_result_attachment(self, attachment_request_model, project, run_id, test_case_result_id): + """CreateTestResultAttachment. + [Preview API] + :param :class:` ` attachment_request_model: + :param str project: Project ID or project name + :param int run_id: + :param int test_case_result_id: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + if test_case_result_id is not None: + route_values['testCaseResultId'] = self._serialize.url('test_case_result_id', test_case_result_id, 'int') + content = self._serialize.body(attachment_request_model, 'TestAttachmentRequestModel') + response = self._send(http_method='POST', + location_id='2a632e97-e014-4275-978f-8e5c4906d4b3', + version='7.2-preview.1', + route_values=route_values, + content=content) + return self._deserialize('TestAttachmentReference', response) + + def create_test_sub_result_attachment(self, attachment_request_model, project, run_id, test_case_result_id, test_sub_result_id): + """CreateTestSubResultAttachment. + [Preview API] + :param :class:` ` attachment_request_model: + :param str project: Project ID or project name + :param int run_id: + :param int test_case_result_id: + :param int test_sub_result_id: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + if test_case_result_id is not None: + route_values['testCaseResultId'] = self._serialize.url('test_case_result_id', test_case_result_id, 'int') + query_parameters = {} + if test_sub_result_id is not None: + query_parameters['testSubResultId'] = self._serialize.query('test_sub_result_id', test_sub_result_id, 'int') + content = self._serialize.body(attachment_request_model, 'TestAttachmentRequestModel') + response = self._send(http_method='POST', + location_id='2a632e97-e014-4275-978f-8e5c4906d4b3', + version='7.2-preview.1', + route_values=route_values, + query_parameters=query_parameters, + content=content) + return self._deserialize('TestAttachmentReference', response) + + def delete_test_result_attachment(self, project, run_id, test_case_result_id, attachment_id): + """DeleteTestResultAttachment. + [Preview API] + :param str project: Project ID or project name + :param int run_id: + :param int test_case_result_id: + :param int attachment_id: + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + if test_case_result_id is not None: + route_values['testCaseResultId'] = self._serialize.url('test_case_result_id', test_case_result_id, 'int') + if attachment_id is not None: + route_values['attachmentId'] = self._serialize.url('attachment_id', attachment_id, 'int') + self._send(http_method='DELETE', + location_id='2a632e97-e014-4275-978f-8e5c4906d4b3', + version='7.2-preview.1', + route_values=route_values) + + def get_test_iteration_attachment_content(self, project, run_id, test_case_result_id, attachment_id, iteration_id, **kwargs): + """GetTestIterationAttachmentContent. + [Preview API] Returns a test iteration attachment + :param str project: Project ID or project name + :param int run_id: + :param int test_case_result_id: + :param int attachment_id: + :param int iteration_id: + :rtype: object + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + if test_case_result_id is not None: + route_values['testCaseResultId'] = self._serialize.url('test_case_result_id', test_case_result_id, 'int') + if attachment_id is not None: + route_values['attachmentId'] = self._serialize.url('attachment_id', attachment_id, 'int') + query_parameters = {} + if iteration_id is not None: + query_parameters['iterationId'] = self._serialize.query('iteration_id', iteration_id, 'int') + response = self._send(http_method='GET', + location_id='2a632e97-e014-4275-978f-8e5c4906d4b3', + version='7.2-preview.1', + route_values=route_values, + query_parameters=query_parameters, + accept_media_type='application/octet-stream') + if "callback" in kwargs: + callback = kwargs["callback"] + else: + callback = None + return self._client.stream_download(response, callback=callback) + + def get_test_iteration_attachment_zip(self, project, run_id, test_case_result_id, attachment_id, iteration_id, **kwargs): + """GetTestIterationAttachmentZip. + [Preview API] Returns a test iteration attachment + :param str project: Project ID or project name + :param int run_id: + :param int test_case_result_id: + :param int attachment_id: + :param int iteration_id: + :rtype: object + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + if test_case_result_id is not None: + route_values['testCaseResultId'] = self._serialize.url('test_case_result_id', test_case_result_id, 'int') + if attachment_id is not None: + route_values['attachmentId'] = self._serialize.url('attachment_id', attachment_id, 'int') + query_parameters = {} + if iteration_id is not None: + query_parameters['iterationId'] = self._serialize.query('iteration_id', iteration_id, 'int') + response = self._send(http_method='GET', + location_id='2a632e97-e014-4275-978f-8e5c4906d4b3', + version='7.2-preview.1', + route_values=route_values, + query_parameters=query_parameters, + accept_media_type='application/zip') + if "callback" in kwargs: + callback = kwargs["callback"] + else: + callback = None + return self._client.stream_download(response, callback=callback) + + def get_test_result_attachment_content(self, project, run_id, test_case_result_id, attachment_id, **kwargs): + """GetTestResultAttachmentContent. + [Preview API] Returns a test result attachment + :param str project: Project ID or project name + :param int run_id: + :param int test_case_result_id: + :param int attachment_id: + :rtype: object + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + if test_case_result_id is not None: + route_values['testCaseResultId'] = self._serialize.url('test_case_result_id', test_case_result_id, 'int') + if attachment_id is not None: + route_values['attachmentId'] = self._serialize.url('attachment_id', attachment_id, 'int') + response = self._send(http_method='GET', + location_id='2a632e97-e014-4275-978f-8e5c4906d4b3', + version='7.2-preview.1', + route_values=route_values, + accept_media_type='application/octet-stream') + if "callback" in kwargs: + callback = kwargs["callback"] + else: + callback = None + return self._client.stream_download(response, callback=callback) + + def get_test_result_attachments(self, project, run_id, test_case_result_id): + """GetTestResultAttachments. + [Preview API] + :param str project: Project ID or project name + :param int run_id: + :param int test_case_result_id: + :rtype: [TestAttachment] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + if test_case_result_id is not None: + route_values['testCaseResultId'] = self._serialize.url('test_case_result_id', test_case_result_id, 'int') + response = self._send(http_method='GET', + location_id='2a632e97-e014-4275-978f-8e5c4906d4b3', + version='7.2-preview.1', + route_values=route_values) + return self._deserialize('[TestAttachment]', self._unwrap_collection(response)) + + def get_test_result_attachment_zip(self, project, run_id, test_case_result_id, attachment_id, **kwargs): + """GetTestResultAttachmentZip. + [Preview API] Returns a test result attachment + :param str project: Project ID or project name + :param int run_id: + :param int test_case_result_id: + :param int attachment_id: + :rtype: object + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + if test_case_result_id is not None: + route_values['testCaseResultId'] = self._serialize.url('test_case_result_id', test_case_result_id, 'int') + if attachment_id is not None: + route_values['attachmentId'] = self._serialize.url('attachment_id', attachment_id, 'int') + response = self._send(http_method='GET', + location_id='2a632e97-e014-4275-978f-8e5c4906d4b3', + version='7.2-preview.1', + route_values=route_values, + accept_media_type='application/zip') + if "callback" in kwargs: + callback = kwargs["callback"] + else: + callback = None + return self._client.stream_download(response, callback=callback) + + def get_test_sub_result_attachment_content(self, project, run_id, test_case_result_id, attachment_id, test_sub_result_id, **kwargs): + """GetTestSubResultAttachmentContent. + [Preview API] Returns a test sub result attachment + :param str project: Project ID or project name + :param int run_id: + :param int test_case_result_id: + :param int attachment_id: + :param int test_sub_result_id: + :rtype: object + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + if test_case_result_id is not None: + route_values['testCaseResultId'] = self._serialize.url('test_case_result_id', test_case_result_id, 'int') + if attachment_id is not None: + route_values['attachmentId'] = self._serialize.url('attachment_id', attachment_id, 'int') + query_parameters = {} + if test_sub_result_id is not None: + query_parameters['testSubResultId'] = self._serialize.query('test_sub_result_id', test_sub_result_id, 'int') + response = self._send(http_method='GET', + location_id='2a632e97-e014-4275-978f-8e5c4906d4b3', + version='7.2-preview.1', + route_values=route_values, + query_parameters=query_parameters, + accept_media_type='application/octet-stream') + if "callback" in kwargs: + callback = kwargs["callback"] + else: + callback = None + return self._client.stream_download(response, callback=callback) + + def get_test_sub_result_attachments(self, project, run_id, test_case_result_id, test_sub_result_id): + """GetTestSubResultAttachments. + [Preview API] Returns attachment references for test sub result. + :param str project: Project ID or project name + :param int run_id: + :param int test_case_result_id: + :param int test_sub_result_id: + :rtype: [TestAttachment] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + if test_case_result_id is not None: + route_values['testCaseResultId'] = self._serialize.url('test_case_result_id', test_case_result_id, 'int') + query_parameters = {} + if test_sub_result_id is not None: + query_parameters['testSubResultId'] = self._serialize.query('test_sub_result_id', test_sub_result_id, 'int') + response = self._send(http_method='GET', + location_id='2a632e97-e014-4275-978f-8e5c4906d4b3', + version='7.2-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('[TestAttachment]', self._unwrap_collection(response)) + + def get_test_sub_result_attachment_zip(self, project, run_id, test_case_result_id, attachment_id, test_sub_result_id, **kwargs): + """GetTestSubResultAttachmentZip. + [Preview API] Returns a test sub result attachment + :param str project: Project ID or project name + :param int run_id: + :param int test_case_result_id: + :param int attachment_id: + :param int test_sub_result_id: + :rtype: object + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + if test_case_result_id is not None: + route_values['testCaseResultId'] = self._serialize.url('test_case_result_id', test_case_result_id, 'int') + if attachment_id is not None: + route_values['attachmentId'] = self._serialize.url('attachment_id', attachment_id, 'int') + query_parameters = {} + if test_sub_result_id is not None: + query_parameters['testSubResultId'] = self._serialize.query('test_sub_result_id', test_sub_result_id, 'int') + response = self._send(http_method='GET', + location_id='2a632e97-e014-4275-978f-8e5c4906d4b3', + version='7.2-preview.1', + route_values=route_values, + query_parameters=query_parameters, + accept_media_type='application/zip') + if "callback" in kwargs: + callback = kwargs["callback"] + else: + callback = None + return self._client.stream_download(response, callback=callback) + + def create_test_run_attachment(self, attachment_request_model, project, run_id): + """CreateTestRunAttachment. + [Preview API] + :param :class:` ` attachment_request_model: + :param str project: Project ID or project name + :param int run_id: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + content = self._serialize.body(attachment_request_model, 'TestAttachmentRequestModel') + response = self._send(http_method='POST', + location_id='b5731898-8206-477a-a51d-3fdf116fc6bf', + version='7.2-preview.1', + route_values=route_values, + content=content) + return self._deserialize('TestAttachmentReference', response) + + def delete_test_run_attachment(self, project, run_id, attachment_id): + """DeleteTestRunAttachment. + [Preview API] + :param str project: Project ID or project name + :param int run_id: + :param int attachment_id: + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + if attachment_id is not None: + route_values['attachmentId'] = self._serialize.url('attachment_id', attachment_id, 'int') + self._send(http_method='DELETE', + location_id='b5731898-8206-477a-a51d-3fdf116fc6bf', + version='7.2-preview.1', + route_values=route_values) + + def get_test_run_attachment_content(self, project, run_id, attachment_id, **kwargs): + """GetTestRunAttachmentContent. + [Preview API] Returns a test run attachment + :param str project: Project ID or project name + :param int run_id: + :param int attachment_id: + :rtype: object + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + if attachment_id is not None: + route_values['attachmentId'] = self._serialize.url('attachment_id', attachment_id, 'int') + response = self._send(http_method='GET', + location_id='b5731898-8206-477a-a51d-3fdf116fc6bf', + version='7.2-preview.1', + route_values=route_values, + accept_media_type='application/octet-stream') + if "callback" in kwargs: + callback = kwargs["callback"] + else: + callback = None + return self._client.stream_download(response, callback=callback) + + def get_test_run_attachments(self, project, run_id): + """GetTestRunAttachments. + [Preview API] + :param str project: Project ID or project name + :param int run_id: + :rtype: [TestAttachment] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + response = self._send(http_method='GET', + location_id='b5731898-8206-477a-a51d-3fdf116fc6bf', + version='7.2-preview.1', + route_values=route_values) + return self._deserialize('[TestAttachment]', self._unwrap_collection(response)) + + def get_test_run_attachment_zip(self, project, run_id, attachment_id, **kwargs): + """GetTestRunAttachmentZip. + [Preview API] Returns a test run attachment + :param str project: Project ID or project name + :param int run_id: + :param int attachment_id: + :rtype: object + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + if attachment_id is not None: + route_values['attachmentId'] = self._serialize.url('attachment_id', attachment_id, 'int') + response = self._send(http_method='GET', + location_id='b5731898-8206-477a-a51d-3fdf116fc6bf', + version='7.2-preview.1', + route_values=route_values, + accept_media_type='application/zip') + if "callback" in kwargs: + callback = kwargs["callback"] + else: + callback = None + return self._client.stream_download(response, callback=callback) + + def get_bugs_linked_to_test_result(self, project, run_id, test_case_result_id): + """GetBugsLinkedToTestResult. + [Preview API] + :param str project: Project ID or project name + :param int run_id: + :param int test_case_result_id: + :rtype: [WorkItemReference] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + if test_case_result_id is not None: + route_values['testCaseResultId'] = self._serialize.url('test_case_result_id', test_case_result_id, 'int') + response = self._send(http_method='GET', + location_id='d8dbf98f-eb34-4f8d-8365-47972af34f29', + version='7.2-preview.1', + route_values=route_values) + return self._deserialize('[WorkItemReference]', self._unwrap_collection(response)) + + def fetch_source_code_coverage_report(self, project, build_id): + """FetchSourceCodeCoverageReport. + [Preview API] + :param str project: Project ID or project name + :param int build_id: + :rtype: [SourceViewBuildCoverage] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if build_id is not None: + query_parameters['buildId'] = self._serialize.query('build_id', build_id, 'int') + response = self._send(http_method='GET', + location_id='a459e10b-d703-4193-b3c1-60f2287918b3', + version='7.2-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('[SourceViewBuildCoverage]', self._unwrap_collection(response)) + + def get_build_code_coverage(self, project, build_id, flags): + """GetBuildCodeCoverage. + [Preview API] + :param str project: Project ID or project name + :param int build_id: + :param int flags: + :rtype: [BuildCoverage] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if build_id is not None: + query_parameters['buildId'] = self._serialize.query('build_id', build_id, 'int') + if flags is not None: + query_parameters['flags'] = self._serialize.query('flags', flags, 'int') + response = self._send(http_method='GET', + location_id='9b3e1ece-c6ab-4fbb-8167-8a32a0c92216', + version='7.2-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('[BuildCoverage]', self._unwrap_collection(response)) + + def get_code_coverage_summary(self, project, build_id, delta_build_id=None): + """GetCodeCoverageSummary. + [Preview API] http://(tfsserver):8080/tfs/DefaultCollection/_apis/test/CodeCoverage?buildId=10&deltaBuildId=9 Request: build id and delta build id (optional) + :param str project: Project ID or project name + :param int build_id: + :param int delta_build_id: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if build_id is not None: + query_parameters['buildId'] = self._serialize.query('build_id', build_id, 'int') + if delta_build_id is not None: + query_parameters['deltaBuildId'] = self._serialize.query('delta_build_id', delta_build_id, 'int') + response = self._send(http_method='GET', + location_id='9b3e1ece-c6ab-4fbb-8167-8a32a0c92216', + version='7.2-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('CodeCoverageSummary', response) + + def update_code_coverage_summary(self, project, build_id, coverage_data=None): + """UpdateCodeCoverageSummary. + [Preview API] http://(tfsserver):8080/tfs/DefaultCollection/_apis/test/CodeCoverage?buildId=10 Request: Json of code coverage summary + :param str project: Project ID or project name + :param int build_id: + :param :class:` ` coverage_data: + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if build_id is not None: + query_parameters['buildId'] = self._serialize.query('build_id', build_id, 'int') + content = self._serialize.body(coverage_data, 'CodeCoverageData') + self._send(http_method='POST', + location_id='9b3e1ece-c6ab-4fbb-8167-8a32a0c92216', + version='7.2-preview.1', + route_values=route_values, + query_parameters=query_parameters, + content=content) + + def get_test_run_code_coverage(self, project, run_id, flags): + """GetTestRunCodeCoverage. + [Preview API] + :param str project: Project ID or project name + :param int run_id: + :param int flags: + :rtype: [TestRunCoverage] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + query_parameters = {} + if flags is not None: + query_parameters['flags'] = self._serialize.query('flags', flags, 'int') + response = self._send(http_method='GET', + location_id='5641efbc-6f9b-401a-baeb-d3da22489e5e', + version='7.2-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('[TestRunCoverage]', self._unwrap_collection(response)) + + def get_file_level_code_coverage(self, file_coverage_request, project, **kwargs): + """GetFileLevelCodeCoverage. + [Preview API] Get file coverage for the specified file + :param :class:` ` file_coverage_request: File details with pull request iteration context + :param str project: Project ID or project name + :rtype: object + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(file_coverage_request, 'FileCoverageRequest') + response = self._send(http_method='POST', + location_id='4a6d0c46-51ca-45aa-9163-249cee3289b7', + version='7.2-preview.1', + route_values=route_values, + content=content, + accept_media_type='text/plain') + if "callback" in kwargs: + callback = kwargs["callback"] + else: + callback = None + return self._client.stream_download(response, callback=callback) + + def query_test_result_history(self, filter, project): + """QueryTestResultHistory. + [Preview API] + :param :class:` ` filter: + :param str project: Project ID or project name + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(filter, 'ResultsFilter') + response = self._send(http_method='POST', + location_id='bdf7a97b-0395-4da8-9d5d-f957619327d1', + version='7.2-preview.1', + route_values=route_values, + content=content) + return self._deserialize('TestResultHistory', response) + + def get_test_run_message_logs(self, project, run_id): + """GetTestRunMessageLogs. + [Preview API] Get test run message logs + :param str project: Project ID or project name + :param int run_id: ID of the run to get. + :rtype: [TestMessageLogDetails] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + response = self._send(http_method='GET', + location_id='e9ab0c6a-1984-418b-87c0-ee4202318ba3', + version='7.2-preview.1', + route_values=route_values) + return self._deserialize('[TestMessageLogDetails]', self._unwrap_collection(response)) + + def get_test_pipeline_metrics(self, project, pipeline_id, stage_name=None, phase_name=None, job_name=None, metric_names=None, group_by_node=None): + """GetTestPipelineMetrics. + [Preview API] Get summary of test results. + :param str project: Project ID or project name + :param int pipeline_id: Pipeline Id. This is same as build Id. + :param str stage_name: Name of the stage. Maximum supported length for name is 256 character. + :param str phase_name: Name of the phase. Maximum supported length for name is 256 character. + :param str job_name: Matrixing in YAML generates copies of a job with different inputs in matrix. JobName is the name of those input. Maximum supported length for name is 256 character. + :param [Metrics] metric_names: + :param bool group_by_node: Group summary for each node of the pipleine heirarchy + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if pipeline_id is not None: + query_parameters['pipelineId'] = self._serialize.query('pipeline_id', pipeline_id, 'int') + if stage_name is not None: + query_parameters['stageName'] = self._serialize.query('stage_name', stage_name, 'str') + if phase_name is not None: + query_parameters['phaseName'] = self._serialize.query('phase_name', phase_name, 'str') + if job_name is not None: + query_parameters['jobName'] = self._serialize.query('job_name', job_name, 'str') + if metric_names is not None: + metric_names = ",".join(map(str, metric_names)) + query_parameters['metricNames'] = self._serialize.query('metric_names', metric_names, 'str') + if group_by_node is not None: + query_parameters['groupByNode'] = self._serialize.query('group_by_node', group_by_node, 'bool') + response = self._send(http_method='GET', + location_id='65f35817-86a1-4131-b38b-3ec2d4744e53', + version='7.2-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('PipelineTestMetrics', response) + + def create_one_mRXTest_session(self, session, project): + """CreateOneMRXTestSession. + [Preview API] Creates OneMRX Session object in TCM data store + :param :class:` ` session: Received session object. + :param str project: Project ID or project name + :rtype: long + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(session, 'Session') + response = self._send(http_method='POST', + location_id='531e61ce-580d-4962-8591-0b2942b6bf78', + version='7.2-preview.1', + route_values=route_values, + content=content) + return self._deserialize('long', response) + + def get_one_mRXTest_session(self, project, build_id): + """GetOneMRXTestSession. + [Preview API] Retrieves OneMRX Session metadata object in TCM data store + :param str project: Project ID or project name + :param int build_id: + :rtype: [Session] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if build_id is not None: + query_parameters['buildId'] = self._serialize.query('build_id', build_id, 'int') + response = self._send(http_method='GET', + location_id='531e61ce-580d-4962-8591-0b2942b6bf78', + version='7.2-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('[Session]', self._unwrap_collection(response)) + + def get_one_mRXTest_session_layout(self, project, session_id): + """GetOneMRXTestSessionLayout. + [Preview API] Retrieves OneMRX Session Layout object in TCM data store + :param str project: Project ID or project name + :param str session_id: + :rtype: [object] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if session_id is not None: + query_parameters['sessionId'] = self._serialize.query('session_id', session_id, 'str') + response = self._send(http_method='GET', + location_id='531e61ce-580d-4962-8591-0b2942b6bf78', + version='7.2-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('[object]', self._unwrap_collection(response)) + + def get_test_result_details_for_build(self, project, build_id, publish_context=None, group_by=None, filter=None, orderby=None, should_include_results=None, query_run_summary_for_in_progress=None): + """GetTestResultDetailsForBuild. + [Preview API] + :param str project: Project ID or project name + :param int build_id: + :param str publish_context: + :param str group_by: + :param str filter: + :param str orderby: + :param bool should_include_results: + :param bool query_run_summary_for_in_progress: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if build_id is not None: + query_parameters['buildId'] = self._serialize.query('build_id', build_id, 'int') + if publish_context is not None: + query_parameters['publishContext'] = self._serialize.query('publish_context', publish_context, 'str') + if group_by is not None: + query_parameters['groupBy'] = self._serialize.query('group_by', group_by, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query('filter', filter, 'str') + if orderby is not None: + query_parameters['$orderby'] = self._serialize.query('orderby', orderby, 'str') + if should_include_results is not None: + query_parameters['shouldIncludeResults'] = self._serialize.query('should_include_results', should_include_results, 'bool') + if query_run_summary_for_in_progress is not None: + query_parameters['queryRunSummaryForInProgress'] = self._serialize.query('query_run_summary_for_in_progress', query_run_summary_for_in_progress, 'bool') + response = self._send(http_method='GET', + location_id='a518c749-4524-45b2-a7ef-1ac009b312cd', + version='7.2-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('TestResultsDetails', response) + + def get_test_result_details_for_release(self, project, release_id, release_env_id, publish_context=None, group_by=None, filter=None, orderby=None, should_include_results=None, query_run_summary_for_in_progress=None): + """GetTestResultDetailsForRelease. + [Preview API] + :param str project: Project ID or project name + :param int release_id: + :param int release_env_id: + :param str publish_context: + :param str group_by: + :param str filter: + :param str orderby: + :param bool should_include_results: + :param bool query_run_summary_for_in_progress: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if release_id is not None: + query_parameters['releaseId'] = self._serialize.query('release_id', release_id, 'int') + if release_env_id is not None: + query_parameters['releaseEnvId'] = self._serialize.query('release_env_id', release_env_id, 'int') + if publish_context is not None: + query_parameters['publishContext'] = self._serialize.query('publish_context', publish_context, 'str') + if group_by is not None: + query_parameters['groupBy'] = self._serialize.query('group_by', group_by, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query('filter', filter, 'str') + if orderby is not None: + query_parameters['$orderby'] = self._serialize.query('orderby', orderby, 'str') + if should_include_results is not None: + query_parameters['shouldIncludeResults'] = self._serialize.query('should_include_results', should_include_results, 'bool') + if query_run_summary_for_in_progress is not None: + query_parameters['queryRunSummaryForInProgress'] = self._serialize.query('query_run_summary_for_in_progress', query_run_summary_for_in_progress, 'bool') + response = self._send(http_method='GET', + location_id='19a8183a-69fb-47d7-bfbf-1b6b0d921294', + version='7.2-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('TestResultsDetails', response) + + def publish_test_result_document(self, document, project, run_id): + """PublishTestResultDocument. + [Preview API] + :param :class:` ` document: + :param str project: Project ID or project name + :param int run_id: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + content = self._serialize.body(document, 'TestResultDocument') + response = self._send(http_method='POST', + location_id='74838649-b038-42f1-a0e7-6deb3973bf14', + version='7.2-preview.1', + route_values=route_values, + content=content) + return self._deserialize('TestResultDocument', response) + + def get_result_groups_by_build(self, project, build_id, publish_context, fields=None, continuation_token=None): + """GetResultGroupsByBuild. + [Preview API] + :param str project: Project ID or project name + :param int build_id: + :param str publish_context: + :param [str] fields: + :param str continuation_token: + :rtype: :class:`<[FieldDetailsForTestResults]> ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if build_id is not None: + query_parameters['buildId'] = self._serialize.query('build_id', build_id, 'int') + if publish_context is not None: + query_parameters['publishContext'] = self._serialize.query('publish_context', publish_context, 'str') + if fields is not None: + fields = ",".join(fields) + query_parameters['fields'] = self._serialize.query('fields', fields, 'str') + if continuation_token is not None: + query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'str') + response = self._send(http_method='GET', + location_id='e49244d1-c49f-49ad-a717-3bbaefe6a201', + version='7.2-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('[FieldDetailsForTestResults]', self._unwrap_collection(response)) + + def get_result_groups_by_release(self, project, release_id, publish_context, release_env_id=None, fields=None, continuation_token=None): + """GetResultGroupsByRelease. + [Preview API] + :param str project: Project ID or project name + :param int release_id: + :param str publish_context: + :param int release_env_id: + :param [str] fields: + :param str continuation_token: + :rtype: :class:`<[FieldDetailsForTestResults]> ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if release_id is not None: + query_parameters['releaseId'] = self._serialize.query('release_id', release_id, 'int') + if publish_context is not None: + query_parameters['publishContext'] = self._serialize.query('publish_context', publish_context, 'str') + if release_env_id is not None: + query_parameters['releaseEnvId'] = self._serialize.query('release_env_id', release_env_id, 'int') + if fields is not None: + fields = ",".join(fields) + query_parameters['fields'] = self._serialize.query('fields', fields, 'str') + if continuation_token is not None: + query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'str') + response = self._send(http_method='GET', + location_id='3c2b6bb0-0620-434a-a5c3-26aa0fcfda15', + version='7.2-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('[FieldDetailsForTestResults]', self._unwrap_collection(response)) + + def query_test_results_meta_data(self, test_case_reference_ids, project, details_to_include=None): + """QueryTestResultsMetaData. + [Preview API] Get list of test Result meta data details for corresponding testcasereferenceId + :param [str] test_case_reference_ids: TestCaseReference Ids of the test Result to be queried, comma separated list of valid ids (limit no. of ids 200). + :param str project: Project ID or project name + :param str details_to_include: Details to include with test results metadata. Default is None. Other values are FlakyIdentifiers. + :rtype: [TestResultMetaData] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if details_to_include is not None: + query_parameters['detailsToInclude'] = self._serialize.query('details_to_include', details_to_include, 'str') + content = self._serialize.body(test_case_reference_ids, '[str]') + response = self._send(http_method='POST', + location_id='b72ff4c0-4341-4213-ba27-f517cf341c95', + version='7.2-preview.4', + route_values=route_values, + query_parameters=query_parameters, + content=content) + return self._deserialize('[TestResultMetaData]', self._unwrap_collection(response)) + + def update_test_results_meta_data(self, test_result_meta_data_update_input, project, test_case_reference_id): + """UpdateTestResultsMetaData. + [Preview API] Update properties of test result meta data + :param :class:` ` test_result_meta_data_update_input: TestResultMetaData update input TestResultMetaDataUpdateInput + :param str project: Project ID or project name + :param int test_case_reference_id: TestCaseReference Id of Test Result to be updated. + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if test_case_reference_id is not None: + route_values['testCaseReferenceId'] = self._serialize.url('test_case_reference_id', test_case_reference_id, 'int') + content = self._serialize.body(test_result_meta_data_update_input, 'TestResultMetaDataUpdateInput') + response = self._send(http_method='PATCH', + location_id='b72ff4c0-4341-4213-ba27-f517cf341c95', + version='7.2-preview.4', + route_values=route_values, + content=content) + return self._deserialize('TestResultMetaData', response) + + def get_test_results_by_query(self, query, project): + """GetTestResultsByQuery. + [Preview API] + :param :class:` ` query: + :param str project: Project ID or project name + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(query, 'TestResultsQuery') + response = self._send(http_method='POST', + location_id='14033a2c-af25-4af1-9e39-8ef6900482e3', + version='7.2-preview.2', + route_values=route_values, + content=content) + return self._deserialize('TestResultsQuery', response) + + def get_test_results_by_query_wiql(self, query_model, project, include_result_details=None, include_iteration_details=None, skip=None, top=None): + """GetTestResultsByQueryWiql. + [Preview API] + :param :class:` ` query_model: + :param str project: Project ID or project name + :param bool include_result_details: + :param bool include_iteration_details: + :param int skip: + :param int top: + :rtype: [TestCaseResult] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if include_result_details is not None: + query_parameters['includeResultDetails'] = self._serialize.query('include_result_details', include_result_details, 'bool') + if include_iteration_details is not None: + query_parameters['includeIterationDetails'] = self._serialize.query('include_iteration_details', include_iteration_details, 'bool') + if skip is not None: + query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') + if top is not None: + query_parameters['$top'] = self._serialize.query('top', top, 'int') + content = self._serialize.body(query_model, 'QueryModel') + response = self._send(http_method='POST', + location_id='5ea78be3-2f5a-4110-8034-c27f24c62db1', + version='7.2-preview.2', + route_values=route_values, + query_parameters=query_parameters, + content=content) + return self._deserialize('[TestCaseResult]', self._unwrap_collection(response)) + + def add_test_results_to_test_run(self, results, project, run_id): + """AddTestResultsToTestRun. + [Preview API] + :param [TestCaseResult] results: + :param str project: Project ID or project name + :param int run_id: + :rtype: [TestCaseResult] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + content = self._serialize.body(results, '[TestCaseResult]') + response = self._send(http_method='POST', + location_id='02afa165-e79a-4d70-8f0c-2af0f35b4e07', + version='7.2-preview.2', + route_values=route_values, + content=content) + return self._deserialize('[TestCaseResult]', self._unwrap_collection(response)) + + def get_test_result_by_id(self, project, run_id, test_result_id, details_to_include=None): + """GetTestResultById. + [Preview API] + :param str project: Project ID or project name + :param int run_id: + :param int test_result_id: + :param str details_to_include: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + if test_result_id is not None: + route_values['testResultId'] = self._serialize.url('test_result_id', test_result_id, 'int') + query_parameters = {} + if details_to_include is not None: + query_parameters['detailsToInclude'] = self._serialize.query('details_to_include', details_to_include, 'str') + response = self._send(http_method='GET', + location_id='02afa165-e79a-4d70-8f0c-2af0f35b4e07', + version='7.2-preview.2', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('TestCaseResult', response) + + def get_test_results(self, project, run_id, details_to_include=None, skip=None, top=None, outcomes=None, new_tests_only=None): + """GetTestResults. + [Preview API] + :param str project: Project ID or project name + :param int run_id: + :param str details_to_include: + :param int skip: + :param int top: + :param [TestOutcome] outcomes: + :param bool new_tests_only: + :rtype: [TestCaseResult] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + query_parameters = {} + if details_to_include is not None: + query_parameters['detailsToInclude'] = self._serialize.query('details_to_include', details_to_include, 'str') + if skip is not None: + query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') + if top is not None: + query_parameters['$top'] = self._serialize.query('top', top, 'int') + if outcomes is not None: + outcomes = ",".join(map(str, outcomes)) + query_parameters['outcomes'] = self._serialize.query('outcomes', outcomes, 'str') + if new_tests_only is not None: + query_parameters['$newTestsOnly'] = self._serialize.query('new_tests_only', new_tests_only, 'bool') + response = self._send(http_method='GET', + location_id='02afa165-e79a-4d70-8f0c-2af0f35b4e07', + version='7.2-preview.2', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('[TestCaseResult]', self._unwrap_collection(response)) + + def update_test_results(self, results, project, run_id): + """UpdateTestResults. + [Preview API] + :param [TestCaseResult] results: + :param str project: Project ID or project name + :param int run_id: + :rtype: [TestCaseResult] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + content = self._serialize.body(results, '[TestCaseResult]') + response = self._send(http_method='PATCH', + location_id='02afa165-e79a-4d70-8f0c-2af0f35b4e07', + version='7.2-preview.2', + route_values=route_values, + content=content) + return self._deserialize('[TestCaseResult]', self._unwrap_collection(response)) + + def get_test_results_by_build(self, project, build_id, publish_context=None, outcomes=None, top=None, continuation_token=None): + """GetTestResultsByBuild. + [Preview API] + :param str project: Project ID or project name + :param int build_id: + :param str publish_context: + :param [TestOutcome] outcomes: + :param int top: + :param str continuation_token: + :rtype: :class:`<[ShallowTestCaseResult]> ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if build_id is not None: + query_parameters['buildId'] = self._serialize.query('build_id', build_id, 'int') + if publish_context is not None: + query_parameters['publishContext'] = self._serialize.query('publish_context', publish_context, 'str') + if outcomes is not None: + outcomes = ",".join(map(str, outcomes)) + query_parameters['outcomes'] = self._serialize.query('outcomes', outcomes, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query('top', top, 'int') + if continuation_token is not None: + query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'str') + response = self._send(http_method='GET', + location_id='f48cc885-dbc4-4efc-ab19-ae8c19d1e02a', + version='7.2-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('[ShallowTestCaseResult]', self._unwrap_collection(response)) + + def get_test_results_by_pipeline(self, project, pipeline_id, stage_name=None, phase_name=None, job_name=None, outcomes=None, top=None, continuation_token=None): + """GetTestResultsByPipeline. + [Preview API] Get a list of results. + :param str project: Project ID or project name + :param int pipeline_id: Pipeline Id. This is same as build Id. + :param str stage_name: Name of the stage. Maximum supported length for name is 256 character. + :param str phase_name: Name of the phase. Maximum supported length for name is 256 character. + :param str job_name: Matrixing in YAML generates copies of a job with different inputs in matrix. JobName is the name of those input. Maximum supported length for name is 256 character. + :param [TestOutcome] outcomes: List of outcome of results + :param int top: Maximum number of results to return + :param String continuation_token: Header to pass the continuationToken + :rtype: :class:`<[ShallowTestCaseResult]> ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if pipeline_id is not None: + query_parameters['pipelineId'] = self._serialize.query('pipeline_id', pipeline_id, 'int') + if stage_name is not None: + query_parameters['stageName'] = self._serialize.query('stage_name', stage_name, 'str') + if phase_name is not None: + query_parameters['phaseName'] = self._serialize.query('phase_name', phase_name, 'str') + if job_name is not None: + query_parameters['jobName'] = self._serialize.query('job_name', job_name, 'str') + if outcomes is not None: + outcomes = ",".join(map(str, outcomes)) + query_parameters['outcomes'] = self._serialize.query('outcomes', outcomes, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query('top', top, 'int') + additional_headers = {} + if continuation_token is not None: + additional_headers['x-ms-continuationtoken'] = continuation_token + response = self._send(http_method='GET', + location_id='80169dc2-30c3-4c25-84b2-dd67d7ff1f52', + version='7.2-preview.1', + route_values=route_values, + query_parameters=query_parameters, + additional_headers=additional_headers) + return self._deserialize('[ShallowTestCaseResult]', self._unwrap_collection(response)) + + def get_test_results_by_release(self, project, release_id, release_envid=None, publish_context=None, outcomes=None, top=None, continuation_token=None): + """GetTestResultsByRelease. + [Preview API] + :param str project: Project ID or project name + :param int release_id: + :param int release_envid: + :param str publish_context: + :param [TestOutcome] outcomes: + :param int top: + :param str continuation_token: + :rtype: :class:`<[ShallowTestCaseResult]> ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if release_id is not None: + query_parameters['releaseId'] = self._serialize.query('release_id', release_id, 'int') + if release_envid is not None: + query_parameters['releaseEnvid'] = self._serialize.query('release_envid', release_envid, 'int') + if publish_context is not None: + query_parameters['publishContext'] = self._serialize.query('publish_context', publish_context, 'str') + if outcomes is not None: + outcomes = ",".join(map(str, outcomes)) + query_parameters['outcomes'] = self._serialize.query('outcomes', outcomes, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query('top', top, 'int') + if continuation_token is not None: + query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'str') + response = self._send(http_method='GET', + location_id='3994b949-77e5-495d-8034-edf80d95b84e', + version='7.2-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('[ShallowTestCaseResult]', self._unwrap_collection(response)) + + def test_results_group_details(self, project, pipeline_id, stage_name=None, phase_name=None, job_name=None, should_include_failed_and_aborted_results=None, query_group_summary_for_in_progress=None): + """TestResultsGroupDetails. + [Preview API] Get all the available groups details and for these groups get failed and aborted results. + :param str project: Project ID or project name + :param int pipeline_id: Pipeline Id. This is same as build Id. + :param str stage_name: Name of the stage. Maximum supported length for name is 256 character. + :param str phase_name: Name of the phase. Maximum supported length for name is 256 character. + :param str job_name: Matrixing in YAML generates copies of a job with different inputs in matrix. JobName is the name of those input. Maximum supported length for name is 256 character. + :param bool should_include_failed_and_aborted_results: If true, it will return Ids of failed and aborted results for each test group + :param bool query_group_summary_for_in_progress: If true, it will calculate summary for InProgress runs as well. + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if pipeline_id is not None: + query_parameters['pipelineId'] = self._serialize.query('pipeline_id', pipeline_id, 'int') + if stage_name is not None: + query_parameters['stageName'] = self._serialize.query('stage_name', stage_name, 'str') + if phase_name is not None: + query_parameters['phaseName'] = self._serialize.query('phase_name', phase_name, 'str') + if job_name is not None: + query_parameters['jobName'] = self._serialize.query('job_name', job_name, 'str') + if should_include_failed_and_aborted_results is not None: + query_parameters['shouldIncludeFailedAndAbortedResults'] = self._serialize.query('should_include_failed_and_aborted_results', should_include_failed_and_aborted_results, 'bool') + if query_group_summary_for_in_progress is not None: + query_parameters['queryGroupSummaryForInProgress'] = self._serialize.query('query_group_summary_for_in_progress', query_group_summary_for_in_progress, 'bool') + response = self._send(http_method='GET', + location_id='f903b850-06af-4b50-a344-d7bbfb19e93b', + version='7.2-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('TestResultsDetails', response) + + def query_test_results_report_for_build(self, project, build_id, publish_context=None, include_failure_details=None, build_to_compare=None): + """QueryTestResultsReportForBuild. + [Preview API] + :param str project: Project ID or project name + :param int build_id: + :param str publish_context: + :param bool include_failure_details: + :param :class:` ` build_to_compare: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if build_id is not None: + query_parameters['buildId'] = self._serialize.query('build_id', build_id, 'int') + if publish_context is not None: + query_parameters['publishContext'] = self._serialize.query('publish_context', publish_context, 'str') + if include_failure_details is not None: + query_parameters['includeFailureDetails'] = self._serialize.query('include_failure_details', include_failure_details, 'bool') + if build_to_compare is not None: + if build_to_compare.id is not None: + query_parameters['buildToCompare.id'] = build_to_compare.id + if build_to_compare.definition_id is not None: + query_parameters['buildToCompare.definitionId'] = build_to_compare.definition_id + if build_to_compare.number is not None: + query_parameters['buildToCompare.number'] = build_to_compare.number + if build_to_compare.uri is not None: + query_parameters['buildToCompare.uri'] = build_to_compare.uri + if build_to_compare.build_system is not None: + query_parameters['buildToCompare.buildSystem'] = build_to_compare.build_system + if build_to_compare.branch_name is not None: + query_parameters['buildToCompare.branchName'] = build_to_compare.branch_name + if build_to_compare.repository_id is not None: + query_parameters['buildToCompare.repositoryId'] = build_to_compare.repository_id + response = self._send(http_method='GET', + location_id='e009fa95-95a5-4ad4-9681-590043ce2423', + version='7.2-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('TestResultSummary', response) + + def query_test_results_report_for_pipeline(self, project, pipeline_id, stage_name=None, phase_name=None, job_name=None, include_failure_details=None): + """QueryTestResultsReportForPipeline. + [Preview API] Get summary of test results. + :param str project: Project ID or project name + :param int pipeline_id: Pipeline Id. This is same as build Id. + :param str stage_name: Name of the stage. Maximum supported length for name is 256 character. + :param str phase_name: Name of the phase. Maximum supported length for name is 256 character. + :param str job_name: Matrixing in YAML generates copies of a job with different inputs in matrix. JobName is the name of those input. Maximum supported length for name is 256 character. + :param bool include_failure_details: If true returns failure insights + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if pipeline_id is not None: + query_parameters['pipelineId'] = self._serialize.query('pipeline_id', pipeline_id, 'int') + if stage_name is not None: + query_parameters['stageName'] = self._serialize.query('stage_name', stage_name, 'str') + if phase_name is not None: + query_parameters['phaseName'] = self._serialize.query('phase_name', phase_name, 'str') + if job_name is not None: + query_parameters['jobName'] = self._serialize.query('job_name', job_name, 'str') + if include_failure_details is not None: + query_parameters['includeFailureDetails'] = self._serialize.query('include_failure_details', include_failure_details, 'bool') + response = self._send(http_method='GET', + location_id='71f746a1-7d68-40fe-b705-9d821a73dff2', + version='7.2-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('TestResultSummary', response) + + def query_test_results_report_for_release(self, project, release_id, release_env_id, publish_context=None, include_failure_details=None, release_to_compare=None): + """QueryTestResultsReportForRelease. + [Preview API] + :param str project: Project ID or project name + :param int release_id: + :param int release_env_id: + :param str publish_context: + :param bool include_failure_details: + :param :class:` ` release_to_compare: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if release_id is not None: + query_parameters['releaseId'] = self._serialize.query('release_id', release_id, 'int') + if release_env_id is not None: + query_parameters['releaseEnvId'] = self._serialize.query('release_env_id', release_env_id, 'int') + if publish_context is not None: + query_parameters['publishContext'] = self._serialize.query('publish_context', publish_context, 'str') + if include_failure_details is not None: + query_parameters['includeFailureDetails'] = self._serialize.query('include_failure_details', include_failure_details, 'bool') + if release_to_compare is not None: + if release_to_compare.id is not None: + query_parameters['releaseToCompare.id'] = release_to_compare.id + if release_to_compare.name is not None: + query_parameters['releaseToCompare.name'] = release_to_compare.name + if release_to_compare.environment_id is not None: + query_parameters['releaseToCompare.environmentId'] = release_to_compare.environment_id + if release_to_compare.environment_name is not None: + query_parameters['releaseToCompare.environmentName'] = release_to_compare.environment_name + if release_to_compare.definition_id is not None: + query_parameters['releaseToCompare.definitionId'] = release_to_compare.definition_id + if release_to_compare.environment_definition_id is not None: + query_parameters['releaseToCompare.environmentDefinitionId'] = release_to_compare.environment_definition_id + if release_to_compare.environment_definition_name is not None: + query_parameters['releaseToCompare.environmentDefinitionName'] = release_to_compare.environment_definition_name + if release_to_compare.creation_date is not None: + query_parameters['releaseToCompare.creationDate'] = release_to_compare.creation_date + if release_to_compare.environment_creation_date is not None: + query_parameters['releaseToCompare.environmentCreationDate'] = release_to_compare.environment_creation_date + if release_to_compare.attempt is not None: + query_parameters['releaseToCompare.attempt'] = release_to_compare.attempt + response = self._send(http_method='GET', + location_id='f10f9577-2c04-45ab-8c99-b26567a7cd55', + version='7.2-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('TestResultSummary', response) + + def query_test_results_summary_for_releases(self, releases, project): + """QueryTestResultsSummaryForReleases. + [Preview API] + :param [ReleaseReference] releases: + :param str project: Project ID or project name + :rtype: [TestResultSummary] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(releases, '[ReleaseReference]') + response = self._send(http_method='POST', + location_id='f10f9577-2c04-45ab-8c99-b26567a7cd55', + version='7.2-preview.1', + route_values=route_values, + content=content) + return self._deserialize('[TestResultSummary]', self._unwrap_collection(response)) + + def query_test_summary_by_requirement(self, results_context, project, work_item_ids=None): + """QueryTestSummaryByRequirement. + [Preview API] + :param :class:` ` results_context: + :param str project: Project ID or project name + :param [int] work_item_ids: + :rtype: [TestSummaryForWorkItem] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if work_item_ids is not None: + work_item_ids = ",".join(map(str, work_item_ids)) + query_parameters['workItemIds'] = self._serialize.query('work_item_ids', work_item_ids, 'str') + content = self._serialize.body(results_context, 'TestResultsContext') + response = self._send(http_method='POST', + location_id='3b7fd26f-c335-4e55-afc1-a588f5e2af3c', + version='7.2-preview.1', + route_values=route_values, + query_parameters=query_parameters, + content=content) + return self._deserialize('[TestSummaryForWorkItem]', self._unwrap_collection(response)) + + def query_result_trend_for_build(self, filter, project): + """QueryResultTrendForBuild. + [Preview API] + :param :class:` ` filter: + :param str project: Project ID or project name + :rtype: [AggregatedDataForResultTrend] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(filter, 'TestResultTrendFilter') + response = self._send(http_method='POST', + location_id='0886a7ae-315a-4dba-9122-bcce93301f3a', + version='7.2-preview.1', + route_values=route_values, + content=content) + return self._deserialize('[AggregatedDataForResultTrend]', self._unwrap_collection(response)) + + def query_result_trend_for_release(self, filter, project): + """QueryResultTrendForRelease. + [Preview API] + :param :class:` ` filter: + :param str project: Project ID or project name + :rtype: [AggregatedDataForResultTrend] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(filter, 'TestResultTrendFilter') + response = self._send(http_method='POST', + location_id='107f23c3-359a-460a-a70c-63ee739f9f9a', + version='7.2-preview.1', + route_values=route_values, + content=content) + return self._deserialize('[AggregatedDataForResultTrend]', self._unwrap_collection(response)) + + def create_test_run(self, test_run, project): + """CreateTestRun. + [Preview API] + :param :class:` ` test_run: + :param str project: Project ID or project name + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(test_run, 'RunCreateModel') + response = self._send(http_method='POST', + location_id='364538f9-8062-4ce0-b024-75a0fb463f0d', + version='7.2-preview.1', + route_values=route_values, + content=content) + return self._deserialize('TestRun', response) + + def delete_test_run(self, project, run_id): + """DeleteTestRun. + [Preview API] + :param str project: Project ID or project name + :param int run_id: + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + self._send(http_method='DELETE', + location_id='364538f9-8062-4ce0-b024-75a0fb463f0d', + version='7.2-preview.1', + route_values=route_values) + + def get_test_run_by_id(self, project, run_id, include_details=None, include_tags=None): + """GetTestRunById. + [Preview API] + :param str project: Project ID or project name + :param int run_id: + :param bool include_details: + :param bool include_tags: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + query_parameters = {} + if include_details is not None: + query_parameters['includeDetails'] = self._serialize.query('include_details', include_details, 'bool') + if include_tags is not None: + query_parameters['includeTags'] = self._serialize.query('include_tags', include_tags, 'bool') + response = self._send(http_method='GET', + location_id='364538f9-8062-4ce0-b024-75a0fb463f0d', + version='7.2-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('TestRun', response) + + def get_test_runs(self, project, build_uri=None, owner=None, tmi_run_id=None, plan_id=None, include_run_details=None, automated=None, skip=None, top=None): + """GetTestRuns. + [Preview API] + :param str project: Project ID or project name + :param str build_uri: + :param str owner: + :param str tmi_run_id: + :param int plan_id: + :param bool include_run_details: + :param bool automated: + :param int skip: + :param int top: + :rtype: [TestRun] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if build_uri is not None: + query_parameters['buildUri'] = self._serialize.query('build_uri', build_uri, 'str') + if owner is not None: + query_parameters['owner'] = self._serialize.query('owner', owner, 'str') + if tmi_run_id is not None: + query_parameters['tmiRunId'] = self._serialize.query('tmi_run_id', tmi_run_id, 'str') + if plan_id is not None: + query_parameters['planId'] = self._serialize.query('plan_id', plan_id, 'int') + if include_run_details is not None: + query_parameters['includeRunDetails'] = self._serialize.query('include_run_details', include_run_details, 'bool') + if automated is not None: + query_parameters['automated'] = self._serialize.query('automated', automated, 'bool') + if skip is not None: + query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') + if top is not None: + query_parameters['$top'] = self._serialize.query('top', top, 'int') + response = self._send(http_method='GET', + location_id='364538f9-8062-4ce0-b024-75a0fb463f0d', + version='7.2-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('[TestRun]', self._unwrap_collection(response)) + + def query_test_runs(self, project, min_last_updated_date, max_last_updated_date, state=None, plan_ids=None, is_automated=None, publish_context=None, build_ids=None, build_def_ids=None, branch_name=None, release_ids=None, release_def_ids=None, release_env_ids=None, release_env_def_ids=None, run_title=None, top=None, continuation_token=None): + """QueryTestRuns. + [Preview API] Query Test Runs based on filters. Mandatory fields are minLastUpdatedDate and maxLastUpdatedDate. + :param str project: Project ID or project name + :param datetime min_last_updated_date: Minimum Last Modified Date of run to be queried (Mandatory). + :param datetime max_last_updated_date: Maximum Last Modified Date of run to be queried (Mandatory, difference between min and max date can be atmost 7 days). + :param str state: Current state of the Runs to be queried. + :param [int] plan_ids: Plan Ids of the Runs to be queried, comma separated list of valid ids. + :param bool is_automated: Automation type of the Runs to be queried. + :param str publish_context: PublishContext of the Runs to be queried. + :param [int] build_ids: Build Ids of the Runs to be queried, comma separated list of valid ids. + :param [int] build_def_ids: Build Definition Ids of the Runs to be queried, comma separated list of valid ids. + :param str branch_name: Source Branch name of the Runs to be queried. + :param [int] release_ids: Release Ids of the Runs to be queried, comma separated list of valid ids. + :param [int] release_def_ids: Release Definition Ids of the Runs to be queried, comma separated list of valid ids. + :param [int] release_env_ids: Release Environment Ids of the Runs to be queried, comma separated list of valid ids. + :param [int] release_env_def_ids: Release Environment Definition Ids of the Runs to be queried, comma separated list of valid ids. + :param str run_title: Run Title of the Runs to be queried. + :param int top: Number of runs to be queried. Limit is 100 + :param str continuation_token: continuationToken received from previous batch or null for first batch. It is not supposed to be created (or altered, if received from last batch) by user. + :rtype: :class:`<[TestRun]> ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if min_last_updated_date is not None: + query_parameters['minLastUpdatedDate'] = self._serialize.query('min_last_updated_date', min_last_updated_date, 'iso-8601') + if max_last_updated_date is not None: + query_parameters['maxLastUpdatedDate'] = self._serialize.query('max_last_updated_date', max_last_updated_date, 'iso-8601') + if state is not None: + query_parameters['state'] = self._serialize.query('state', state, 'str') + if plan_ids is not None: + plan_ids = ",".join(map(str, plan_ids)) + query_parameters['planIds'] = self._serialize.query('plan_ids', plan_ids, 'str') + if is_automated is not None: + query_parameters['isAutomated'] = self._serialize.query('is_automated', is_automated, 'bool') + if publish_context is not None: + query_parameters['publishContext'] = self._serialize.query('publish_context', publish_context, 'str') + if build_ids is not None: + build_ids = ",".join(map(str, build_ids)) + query_parameters['buildIds'] = self._serialize.query('build_ids', build_ids, 'str') + if build_def_ids is not None: + build_def_ids = ",".join(map(str, build_def_ids)) + query_parameters['buildDefIds'] = self._serialize.query('build_def_ids', build_def_ids, 'str') + if branch_name is not None: + query_parameters['branchName'] = self._serialize.query('branch_name', branch_name, 'str') + if release_ids is not None: + release_ids = ",".join(map(str, release_ids)) + query_parameters['releaseIds'] = self._serialize.query('release_ids', release_ids, 'str') + if release_def_ids is not None: + release_def_ids = ",".join(map(str, release_def_ids)) + query_parameters['releaseDefIds'] = self._serialize.query('release_def_ids', release_def_ids, 'str') + if release_env_ids is not None: + release_env_ids = ",".join(map(str, release_env_ids)) + query_parameters['releaseEnvIds'] = self._serialize.query('release_env_ids', release_env_ids, 'str') + if release_env_def_ids is not None: + release_env_def_ids = ",".join(map(str, release_env_def_ids)) + query_parameters['releaseEnvDefIds'] = self._serialize.query('release_env_def_ids', release_env_def_ids, 'str') + if run_title is not None: + query_parameters['runTitle'] = self._serialize.query('run_title', run_title, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query('top', top, 'int') + if continuation_token is not None: + query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'str') + response = self._send(http_method='GET', + location_id='364538f9-8062-4ce0-b024-75a0fb463f0d', + version='7.2-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('[TestRun]', self._unwrap_collection(response)) + + def update_test_run(self, run_update_model, project, run_id): + """UpdateTestRun. + [Preview API] + :param :class:` ` run_update_model: + :param str project: Project ID or project name + :param int run_id: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + content = self._serialize.body(run_update_model, 'RunUpdateModel') + response = self._send(http_method='PATCH', + location_id='364538f9-8062-4ce0-b024-75a0fb463f0d', + version='7.2-preview.1', + route_values=route_values, + content=content) + return self._deserialize('TestRun', response) + + def get_test_run_summary_by_outcome(self, project, run_id): + """GetTestRunSummaryByOutcome. + [Preview API] Get test run summary, used when we want to get summary of a run by outcome. Test run should be in completed state. + :param str project: Project ID or project name + :param int run_id: ID of the run to get. + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + response = self._send(http_method='GET', + location_id='5c6a250c-53b7-4851-990c-42a7a00c8b39', + version='7.2-preview.1', + route_values=route_values) + return self._deserialize('TestRunStatistic', response) + + def get_test_results_settings(self, project, settings_type=None): + """GetTestResultsSettings. + [Preview API] Get TestResultsSettings data + :param str project: Project ID or project name + :param str settings_type: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if settings_type is not None: + query_parameters['settingsType'] = self._serialize.query('settings_type', settings_type, 'str') + response = self._send(http_method='GET', + location_id='7319952e-e5a9-4e19-a006-84f3be8b7c68', + version='7.2-preview.3', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('TestResultsSettings', response) + + def update_pipelines_test_settings(self, test_results_update_settings, project): + """UpdatePipelinesTestSettings. + [Preview API] Update project settings of test results + :param :class:` ` test_results_update_settings: + :param str project: Project ID or project name + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(test_results_update_settings, 'TestResultsUpdateSettings') + response = self._send(http_method='PATCH', + location_id='7319952e-e5a9-4e19-a006-84f3be8b7c68', + version='7.2-preview.3', + route_values=route_values, + content=content) + return self._deserialize('TestResultsSettings', response) + + def get_similar_test_results(self, project, run_id, test_result_id, test_sub_result_id, top=None, continuation_token=None): + """GetSimilarTestResults. + [Preview API] Gets the list of results whose failure matches with the provided one. + :param str project: Project ID or project name + :param int run_id: id of test run + :param int test_result_id: id of test result inside a test run + :param int test_sub_result_id: id of subresult inside a test result + :param int top: Maximum number of results to return + :param String continuation_token: Header to pass the continuationToken + :rtype: [TestCaseResult] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + if test_result_id is not None: + route_values['testResultId'] = self._serialize.url('test_result_id', test_result_id, 'int') + query_parameters = {} + if test_sub_result_id is not None: + query_parameters['testSubResultId'] = self._serialize.query('test_sub_result_id', test_sub_result_id, 'int') + if top is not None: + query_parameters['$top'] = self._serialize.query('top', top, 'int') + additional_headers = {} + if continuation_token is not None: + additional_headers['x-ms-continuationtoken'] = continuation_token + response = self._send(http_method='GET', + location_id='67d0a074-b255-4902-a639-e3e6de7a3de6', + version='7.2-preview.1', + route_values=route_values, + query_parameters=query_parameters, + additional_headers=additional_headers) + return self._deserialize('[TestCaseResult]', self._unwrap_collection(response)) + + def get_test_run_statistics(self, project, run_id): + """GetTestRunStatistics. + [Preview API] Get test run statistics , used when we want to get summary of a run by outcome. + :param str project: Project ID or project name + :param int run_id: ID of the run to get. + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + response = self._send(http_method='GET', + location_id='82b986e8-ca9e-4a89-b39e-f65c69bc104a', + version='7.2-preview.2', + route_values=route_values) + return self._deserialize('TestRunStatistic', response) + + def get_coverage_status_badge(self, project, definition, branch_name=None, label=None): + """GetCoverageStatusBadge. + [Preview API]

Gets the coverage status for the last successful build of a definition, optionally scoped to a specific branch

+ :param str project: Project ID or project name + :param str definition: The ID or name of the definition. + :param str branch_name: The branch name. + :param str label: The String to replace the default text on the left side of the badge. + :rtype: str + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if definition is not None: + route_values['definition'] = self._serialize.url('definition', definition, 'str') + query_parameters = {} + if branch_name is not None: + query_parameters['branchName'] = self._serialize.query('branch_name', branch_name, 'str') + if label is not None: + query_parameters['label'] = self._serialize.query('label', label, 'str') + response = self._send(http_method='GET', + location_id='73b7c9d8-defb-4b60-b3d6-2162d60d6b13', + version='7.2-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('str', response) + + def get_test_tags_for_build(self, project, build_id): + """GetTestTagsForBuild. + [Preview API] Get all the tags in a build. + :param str project: Project ID or project name + :param int build_id: Build ID + :rtype: [TestTag] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if build_id is not None: + query_parameters['buildId'] = self._serialize.query('build_id', build_id, 'int') + response = self._send(http_method='GET', + location_id='52ee2057-4b54-41a6-a18c-ed4375a00f8d', + version='7.2-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('[TestTag]', self._unwrap_collection(response)) + + def get_test_tags_for_release(self, project, release_id, release_env_id): + """GetTestTagsForRelease. + [Preview API] Get all the tags in a release. + :param str project: Project ID or project name + :param int release_id: Release ID + :param int release_env_id: Release environment ID + :rtype: [TestTag] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if release_id is not None: + query_parameters['releaseId'] = self._serialize.query('release_id', release_id, 'int') + if release_env_id is not None: + query_parameters['releaseEnvId'] = self._serialize.query('release_env_id', release_env_id, 'int') + response = self._send(http_method='GET', + location_id='52ee2057-4b54-41a6-a18c-ed4375a00f8d', + version='7.2-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('[TestTag]', self._unwrap_collection(response)) + + def update_test_run_tags(self, test_tags_update_model, project, run_id): + """UpdateTestRunTags. + [Preview API] Update tags of a run, Tags can be Added and Deleted + :param :class:` ` test_tags_update_model: TestTagsUpdateModel + :param str project: Project ID or project name + :param int run_id: RunId of the run + :rtype: [TestTag] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + content = self._serialize.body(test_tags_update_model, 'TestTagsUpdateModel') + response = self._send(http_method='PATCH', + location_id='a5e2f411-2b43-45f3-989c-05b71339f5b8', + version='7.2-preview.1', + route_values=route_values, + content=content) + return self._deserialize('[TestTag]', self._unwrap_collection(response)) + + def get_test_tag_summary_for_build(self, project, build_id): + """GetTestTagSummaryForBuild. + [Preview API] Get all the tags in a build. + :param str project: Project ID or project name + :param int build_id: Build ID + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if build_id is not None: + query_parameters['buildId'] = self._serialize.query('build_id', build_id, 'int') + response = self._send(http_method='GET', + location_id='655a8f6b-fec7-4b46-b672-68b44141b498', + version='7.2-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('TestTagSummary', response) + + def get_test_tag_summary_for_release(self, project, release_id, release_env_id): + """GetTestTagSummaryForRelease. + [Preview API] Get all the tags in a release. + :param str project: Project ID or project name + :param int release_id: Release ID + :param int release_env_id: Release environment ID + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if release_id is not None: + query_parameters['releaseId'] = self._serialize.query('release_id', release_id, 'int') + if release_env_id is not None: + query_parameters['releaseEnvId'] = self._serialize.query('release_env_id', release_env_id, 'int') + response = self._send(http_method='GET', + location_id='655a8f6b-fec7-4b46-b672-68b44141b498', + version='7.2-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('TestTagSummary', response) + + def create_build_attachment_in_log_store(self, attachment_request_model, project, build_id): + """CreateBuildAttachmentInLogStore. + [Preview API] Creates an attachment in the LogStore for the specified buildId. + :param :class:` ` attachment_request_model: Contains attachment info like stream, filename, comment, attachmentType + :param str project: Project ID or project name + :param int build_id: BuildId + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if build_id is not None: + route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') + content = self._serialize.body(attachment_request_model, 'TestAttachmentRequestModel') + self._send(http_method='POST', + location_id='6f747e16-18c2-435a-b4fb-fa05d6845fee', + version='7.2-preview.1', + route_values=route_values, + content=content) + + def create_test_run_log_store_attachment(self, attachment_request_model, project, run_id): + """CreateTestRunLogStoreAttachment. + [Preview API] Creates an attachment in the LogStore for the specified runId. + :param :class:` ` attachment_request_model: Contains attachment info like stream, filename, comment, attachmentType + :param str project: Project ID or project name + :param int run_id: Test RunId + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + content = self._serialize.body(attachment_request_model, 'TestAttachmentRequestModel') + response = self._send(http_method='POST', + location_id='1026d5de-4b0b-46ae-a31f-7c59b6af51ef', + version='7.2-preview.1', + route_values=route_values, + content=content) + return self._deserialize('TestLogStoreAttachmentReference', response) + + def delete_test_run_log_store_attachment(self, project, run_id, filename): + """DeleteTestRunLogStoreAttachment. + [Preview API] Deletes the attachment with the specified filename for the specified runId from the LogStore. + :param str project: Project ID or project name + :param int run_id: Test RunId + :param str filename: Attachment FileName + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + query_parameters = {} + if filename is not None: + query_parameters['filename'] = self._serialize.query('filename', filename, 'str') + self._send(http_method='DELETE', + location_id='1026d5de-4b0b-46ae-a31f-7c59b6af51ef', + version='7.2-preview.1', + route_values=route_values, + query_parameters=query_parameters) + + def get_test_run_log_store_attachment_content(self, project, run_id, filename, **kwargs): + """GetTestRunLogStoreAttachmentContent. + [Preview API] Returns the attachment with the specified filename for the specified runId from the LogStore. + :param str project: Project ID or project name + :param int run_id: Test RunId + :param str filename: Attachment FileName + :rtype: object + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + query_parameters = {} + if filename is not None: + query_parameters['filename'] = self._serialize.query('filename', filename, 'str') + response = self._send(http_method='GET', + location_id='1026d5de-4b0b-46ae-a31f-7c59b6af51ef', + version='7.2-preview.1', + route_values=route_values, + query_parameters=query_parameters, + accept_media_type='application/octet-stream') + if "callback" in kwargs: + callback = kwargs["callback"] + else: + callback = None + return self._client.stream_download(response, callback=callback) + + def get_test_run_log_store_attachments(self, project, run_id): + """GetTestRunLogStoreAttachments. + [Preview API] Returns a list of attachments for the specified runId from the LogStore. + :param str project: Project ID or project name + :param int run_id: Test RunId + :rtype: [TestLogStoreAttachment] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + response = self._send(http_method='GET', + location_id='1026d5de-4b0b-46ae-a31f-7c59b6af51ef', + version='7.2-preview.1', + route_values=route_values) + return self._deserialize('[TestLogStoreAttachment]', self._unwrap_collection(response)) + + def get_test_run_log_store_attachment_zip(self, project, run_id, filename, **kwargs): + """GetTestRunLogStoreAttachmentZip. + [Preview API] Returns the attachment with the specified filename for the specified runId from the LogStore. + :param str project: Project ID or project name + :param int run_id: Test RunId + :param str filename: Attachment FileName + :rtype: object + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + query_parameters = {} + if filename is not None: + query_parameters['filename'] = self._serialize.query('filename', filename, 'str') + response = self._send(http_method='GET', + location_id='1026d5de-4b0b-46ae-a31f-7c59b6af51ef', + version='7.2-preview.1', + route_values=route_values, + query_parameters=query_parameters, + accept_media_type='application/zip') + if "callback" in kwargs: + callback = kwargs["callback"] + else: + callback = None + return self._client.stream_download(response, callback=callback) + + def create_failure_type(self, test_result_failure_type, project): + """CreateFailureType. + [Preview API] Creates a new test failure type + :param :class:` ` test_result_failure_type: + :param str project: Project ID or project name + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(test_result_failure_type, 'TestResultFailureTypeRequestModel') + response = self._send(http_method='POST', + location_id='c4ac0486-830c-4a2a-9ef9-e8a1791a70fd', + version='7.2-preview.1', + route_values=route_values, + content=content) + return self._deserialize('TestResultFailureType', response) + + def delete_failure_type(self, project, failure_type_id): + """DeleteFailureType. + [Preview API] Deletes a test failure type with specified failureTypeId + :param str project: Project ID or project name + :param int failure_type_id: + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if failure_type_id is not None: + route_values['failureTypeId'] = self._serialize.url('failure_type_id', failure_type_id, 'int') + self._send(http_method='DELETE', + location_id='c4ac0486-830c-4a2a-9ef9-e8a1791a70fd', + version='7.2-preview.1', + route_values=route_values) + + def get_failure_types(self, project): + """GetFailureTypes. + [Preview API] Returns the list of test failure types. + :param str project: Project ID or project name + :rtype: [TestResultFailureType] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + response = self._send(http_method='GET', + location_id='c4ac0486-830c-4a2a-9ef9-e8a1791a70fd', + version='7.2-preview.1', + route_values=route_values) + return self._deserialize('[TestResultFailureType]', self._unwrap_collection(response)) + + def query_test_history(self, filter, project): + """QueryTestHistory. + [Preview API] Get history of a test method using TestHistoryQuery + :param :class:` ` filter: TestHistoryQuery to get history + :param str project: Project ID or project name + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(filter, 'TestHistoryQuery') + response = self._send(http_method='POST', + location_id='2a41bd6a-8118-4403-b74e-5ba7492aed9d', + version='7.2-preview.2', + route_values=route_values, + content=content) + return self._deserialize('TestHistoryQuery', response) + + def get_test_logs_for_build(self, project, build_id, type, directory_path=None, file_name_prefix=None, fetch_meta_data=None, top=None, continuation_token=None): + """GetTestLogsForBuild. + [Preview API] Get list of build attachments reference + :param str project: Project ID or project name + :param int build_id: Id of the build to get + :param str type: type of the attachment to get + :param str directory_path: directory path for which attachments are needed + :param str file_name_prefix: file name prefix to filter the list of attachment + :param bool fetch_meta_data: Default is false, set if metadata is needed + :param int top: Number of test attachments reference to return + :param String continuation_token: Header to pass the continuationToken + :rtype: :class:`<[TestLog]> ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if build_id is not None: + query_parameters['buildId'] = self._serialize.query('build_id', build_id, 'int') + if type is not None: + query_parameters['type'] = self._serialize.query('type', type, 'str') + if directory_path is not None: + query_parameters['directoryPath'] = self._serialize.query('directory_path', directory_path, 'str') + if file_name_prefix is not None: + query_parameters['fileNamePrefix'] = self._serialize.query('file_name_prefix', file_name_prefix, 'str') + if fetch_meta_data is not None: + query_parameters['fetchMetaData'] = self._serialize.query('fetch_meta_data', fetch_meta_data, 'bool') + if top is not None: + query_parameters['top'] = self._serialize.query('top', top, 'int') + additional_headers = {} + if continuation_token is not None: + additional_headers['x-ms-continuationtoken'] = continuation_token + response = self._send(http_method='GET', + location_id='dff8ce3a-e539-4817-a405-d968491a88f1', + version='7.2-preview.1', + route_values=route_values, + query_parameters=query_parameters, + additional_headers=additional_headers) + return self._deserialize('[TestLog]', self._unwrap_collection(response)) + + def get_test_result_logs(self, project, run_id, result_id, type, directory_path=None, file_name_prefix=None, fetch_meta_data=None, top=None, continuation_token=None): + """GetTestResultLogs. + [Preview API] Get list of test result attachments reference + :param str project: Project ID or project name + :param int run_id: Id of the test run that contains the result + :param int result_id: Id of the test result + :param str type: type of attachments to get + :param str directory_path: directory path of attachments to get + :param str file_name_prefix: file name prefix to filter the list of attachment + :param bool fetch_meta_data: Default is false, set if metadata is needed + :param int top: Numbe of attachments reference to return + :param String continuation_token: Header to pass the continuationToken + :rtype: :class:`<[TestLog]> ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + if result_id is not None: + route_values['resultId'] = self._serialize.url('result_id', result_id, 'int') + query_parameters = {} + if type is not None: + query_parameters['type'] = self._serialize.query('type', type, 'str') + if directory_path is not None: + query_parameters['directoryPath'] = self._serialize.query('directory_path', directory_path, 'str') + if file_name_prefix is not None: + query_parameters['fileNamePrefix'] = self._serialize.query('file_name_prefix', file_name_prefix, 'str') + if fetch_meta_data is not None: + query_parameters['fetchMetaData'] = self._serialize.query('fetch_meta_data', fetch_meta_data, 'bool') + if top is not None: + query_parameters['top'] = self._serialize.query('top', top, 'int') + additional_headers = {} + if continuation_token is not None: + additional_headers['x-ms-continuationtoken'] = continuation_token + response = self._send(http_method='GET', + location_id='714caaac-ae1e-4869-8323-9bc0f5120dbf', + version='7.2-preview.1', + route_values=route_values, + query_parameters=query_parameters, + additional_headers=additional_headers) + return self._deserialize('[TestLog]', self._unwrap_collection(response)) + + def get_test_sub_result_logs(self, project, run_id, result_id, sub_result_id, type, directory_path=None, file_name_prefix=None, fetch_meta_data=None, top=None, continuation_token=None): + """GetTestSubResultLogs. + [Preview API] Get list of test subresult attachments reference + :param str project: Project ID or project name + :param int run_id: Id of the test run that contains the results + :param int result_id: Id of the test result that contains subresult + :param int sub_result_id: Id of the test subresult + :param str type: type of the attachments to get + :param str directory_path: directory path of the attachment to get + :param str file_name_prefix: file name prefix to filter the list of attachments + :param bool fetch_meta_data: Default is false, set if metadata is needed + :param int top: Number of attachments reference to return + :param String continuation_token: Header to pass the continuationToken + :rtype: :class:`<[TestLog]> ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + if result_id is not None: + route_values['resultId'] = self._serialize.url('result_id', result_id, 'int') + query_parameters = {} + if sub_result_id is not None: + query_parameters['subResultId'] = self._serialize.query('sub_result_id', sub_result_id, 'int') + if type is not None: + query_parameters['type'] = self._serialize.query('type', type, 'str') + if directory_path is not None: + query_parameters['directoryPath'] = self._serialize.query('directory_path', directory_path, 'str') + if file_name_prefix is not None: + query_parameters['fileNamePrefix'] = self._serialize.query('file_name_prefix', file_name_prefix, 'str') + if fetch_meta_data is not None: + query_parameters['fetchMetaData'] = self._serialize.query('fetch_meta_data', fetch_meta_data, 'bool') + if top is not None: + query_parameters['top'] = self._serialize.query('top', top, 'int') + additional_headers = {} + if continuation_token is not None: + additional_headers['x-ms-continuationtoken'] = continuation_token + response = self._send(http_method='GET', + location_id='714caaac-ae1e-4869-8323-9bc0f5120dbf', + version='7.2-preview.1', + route_values=route_values, + query_parameters=query_parameters, + additional_headers=additional_headers) + return self._deserialize('[TestLog]', self._unwrap_collection(response)) + + def get_test_run_logs(self, project, run_id, type, directory_path=None, file_name_prefix=None, fetch_meta_data=None, top=None, continuation_token=None): + """GetTestRunLogs. + [Preview API] Get list of test run attachments reference + :param str project: Project ID or project name + :param int run_id: Id of the test run + :param str type: type of the attachments to get + :param str directory_path: directory path for which attachments are needed + :param str file_name_prefix: file name prefix to filter the list of attachment + :param bool fetch_meta_data: Default is false, set if metadata is needed + :param int top: Number of attachments reference to return + :param String continuation_token: Header to pass the continuationToken + :rtype: :class:`<[TestLog]> ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + query_parameters = {} + if type is not None: + query_parameters['type'] = self._serialize.query('type', type, 'str') + if directory_path is not None: + query_parameters['directoryPath'] = self._serialize.query('directory_path', directory_path, 'str') + if file_name_prefix is not None: + query_parameters['fileNamePrefix'] = self._serialize.query('file_name_prefix', file_name_prefix, 'str') + if fetch_meta_data is not None: + query_parameters['fetchMetaData'] = self._serialize.query('fetch_meta_data', fetch_meta_data, 'bool') + if top is not None: + query_parameters['top'] = self._serialize.query('top', top, 'int') + additional_headers = {} + if continuation_token is not None: + additional_headers['x-ms-continuationtoken'] = continuation_token + response = self._send(http_method='GET', + location_id='5b47b946-e875-4c9a-acdc-2a20996caebe', + version='7.2-preview.1', + route_values=route_values, + query_parameters=query_parameters, + additional_headers=additional_headers) + return self._deserialize('[TestLog]', self._unwrap_collection(response)) + + def get_test_log_store_endpoint_details_for_build_log(self, project, build, type, file_path): + """GetTestLogStoreEndpointDetailsForBuildLog. + [Preview API] Get SAS Uri of a build attachment + :param str project: Project ID or project name + :param int build: Id of the build to get + :param str type: type of the file + :param str file_path: filePath for which sas uri is needed + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if build is not None: + query_parameters['build'] = self._serialize.query('build', build, 'int') + if type is not None: + query_parameters['type'] = self._serialize.query('type', type, 'str') + if file_path is not None: + query_parameters['filePath'] = self._serialize.query('file_path', file_path, 'str') + response = self._send(http_method='GET', + location_id='39b09be7-f0c9-4a83-a513-9ae31b45c56f', + version='7.2-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('TestLogStoreEndpointDetails', response) + + def test_log_store_endpoint_details_for_build(self, project, build_id, test_log_store_operation_type): + """TestLogStoreEndpointDetailsForBuild. + [Preview API] Create and Get sas uri of the build container + :param str project: Project ID or project name + :param int build_id: Id of the build to get + :param str test_log_store_operation_type: Type of operation to perform using sas uri + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if build_id is not None: + query_parameters['buildId'] = self._serialize.query('build_id', build_id, 'int') + if test_log_store_operation_type is not None: + query_parameters['testLogStoreOperationType'] = self._serialize.query('test_log_store_operation_type', test_log_store_operation_type, 'str') + response = self._send(http_method='POST', + location_id='39b09be7-f0c9-4a83-a513-9ae31b45c56f', + version='7.2-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('TestLogStoreEndpointDetails', response) + + def get_test_log_store_endpoint_details_for_result_log(self, project, run_id, result_id, type, file_path): + """GetTestLogStoreEndpointDetailsForResultLog. + [Preview API] Get SAS Uri of a test results attachment + :param str project: Project ID or project name + :param int run_id: Id of the test run that contains result + :param int result_id: Id of the test result whose files need to be downloaded + :param str type: type of the file + :param str file_path: filePath for which sas uri is needed + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + if result_id is not None: + route_values['resultId'] = self._serialize.url('result_id', result_id, 'int') + query_parameters = {} + if type is not None: + query_parameters['type'] = self._serialize.query('type', type, 'str') + if file_path is not None: + query_parameters['filePath'] = self._serialize.query('file_path', file_path, 'str') + response = self._send(http_method='GET', + location_id='da630b37-1236-45b5-945e-1d7bdb673850', + version='7.2-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('TestLogStoreEndpointDetails', response) + + def get_test_log_store_endpoint_details_for_sub_result_log(self, project, run_id, result_id, sub_result_id, type, file_path): + """GetTestLogStoreEndpointDetailsForSubResultLog. + [Preview API] Get SAS Uri of a test subresults attachment + :param str project: Project ID or project name + :param int run_id: Id of the test run that contains result + :param int result_id: Id of the test result that contains subresult + :param int sub_result_id: Id of the test subresult whose file sas uri is needed + :param str type: type of the file + :param str file_path: filePath for which sas uri is needed + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + if result_id is not None: + route_values['resultId'] = self._serialize.url('result_id', result_id, 'int') + query_parameters = {} + if sub_result_id is not None: + query_parameters['subResultId'] = self._serialize.query('sub_result_id', sub_result_id, 'int') + if type is not None: + query_parameters['type'] = self._serialize.query('type', type, 'str') + if file_path is not None: + query_parameters['filePath'] = self._serialize.query('file_path', file_path, 'str') + response = self._send(http_method='GET', + location_id='da630b37-1236-45b5-945e-1d7bdb673850', + version='7.2-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('TestLogStoreEndpointDetails', response) + + def test_log_store_endpoint_details_for_result(self, project, run_id, result_id, sub_result_id, file_path, type): + """TestLogStoreEndpointDetailsForResult. + [Preview API] Create empty file for a result and Get Sas uri for the file + :param str project: Project ID or project name + :param int run_id: Id of the test run that contains the result + :param int result_id: Id of the test results that contains sub result + :param int sub_result_id: Id of the test sub result whose file sas uri is needed + :param str file_path: file path inside the sub result for which sas uri is needed + :param str type: Type of the file for download + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + if result_id is not None: + route_values['resultId'] = self._serialize.url('result_id', result_id, 'int') + query_parameters = {} + if sub_result_id is not None: + query_parameters['subResultId'] = self._serialize.query('sub_result_id', sub_result_id, 'int') + if file_path is not None: + query_parameters['filePath'] = self._serialize.query('file_path', file_path, 'str') + if type is not None: + query_parameters['type'] = self._serialize.query('type', type, 'str') + response = self._send(http_method='POST', + location_id='da630b37-1236-45b5-945e-1d7bdb673850', + version='7.2-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('TestLogStoreEndpointDetails', response) + + def get_test_log_store_endpoint_details_for_run_log(self, project, run_id, type, file_path): + """GetTestLogStoreEndpointDetailsForRunLog. + [Preview API] Get SAS Uri of a test run attachment + :param str project: Project ID or project name + :param int run_id: Id of the test run whose file has to be downloaded + :param str type: type of the file + :param str file_path: filePath for which sas uri is needed + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + query_parameters = {} + if type is not None: + query_parameters['type'] = self._serialize.query('type', type, 'str') + if file_path is not None: + query_parameters['filePath'] = self._serialize.query('file_path', file_path, 'str') + response = self._send(http_method='GET', + location_id='67eb3f92-6c97-4fd9-8b63-6cbdc7e526ea', + version='7.2-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('TestLogStoreEndpointDetails', response) + + def test_log_store_endpoint_details_for_run(self, project, run_id, test_log_store_operation_type, file_path=None, type=None): + """TestLogStoreEndpointDetailsForRun. + [Preview API] Create empty file for a run and Get Sas uri for the file + :param str project: Project ID or project name + :param int run_id: Id of the run to get endpoint details + :param str test_log_store_operation_type: Type of operation to perform using sas uri + :param str file_path: file path to create an empty file + :param str type: Default is GeneralAttachment, type of empty file to be created + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + query_parameters = {} + if test_log_store_operation_type is not None: + query_parameters['testLogStoreOperationType'] = self._serialize.query('test_log_store_operation_type', test_log_store_operation_type, 'str') + if file_path is not None: + query_parameters['filePath'] = self._serialize.query('file_path', file_path, 'str') + if type is not None: + query_parameters['type'] = self._serialize.query('type', type, 'str') + response = self._send(http_method='POST', + location_id='67eb3f92-6c97-4fd9-8b63-6cbdc7e526ea', + version='7.2-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('TestLogStoreEndpointDetails', response) + + def create_test_settings(self, test_settings, project): + """CreateTestSettings. + [Preview API] + :param :class:` ` test_settings: + :param str project: Project ID or project name + :rtype: int + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(test_settings, 'TestSettings') + response = self._send(http_method='POST', + location_id='930bad47-f826-4099-9597-f44d0a9c735c', + version='7.2-preview.1', + route_values=route_values, + content=content) + return self._deserialize('int', response) + + def delete_test_settings(self, project, test_settings_id): + """DeleteTestSettings. + [Preview API] + :param str project: Project ID or project name + :param int test_settings_id: + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if test_settings_id is not None: + query_parameters['testSettingsId'] = self._serialize.query('test_settings_id', test_settings_id, 'int') + self._send(http_method='DELETE', + location_id='930bad47-f826-4099-9597-f44d0a9c735c', + version='7.2-preview.1', + route_values=route_values, + query_parameters=query_parameters) + + def get_test_settings_by_id(self, project, test_settings_id): + """GetTestSettingsById. + [Preview API] + :param str project: Project ID or project name + :param int test_settings_id: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if test_settings_id is not None: + query_parameters['testSettingsId'] = self._serialize.query('test_settings_id', test_settings_id, 'int') + response = self._send(http_method='GET', + location_id='930bad47-f826-4099-9597-f44d0a9c735c', + version='7.2-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('TestSettings', response) + + def add_work_item_to_test_links(self, work_item_to_test_links, project): + """AddWorkItemToTestLinks. + [Preview API] + :param :class:` ` work_item_to_test_links: + :param str project: Project ID or project name + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(work_item_to_test_links, 'WorkItemToTestLinks') + response = self._send(http_method='POST', + location_id='4e3abe63-ca46-4fe0-98b2-363f7ec7aa5f', + version='7.2-preview.2', + route_values=route_values, + content=content) + return self._deserialize('WorkItemToTestLinks', response) + + def delete_test_method_to_work_item_link(self, project, test_name, work_item_id): + """DeleteTestMethodToWorkItemLink. + [Preview API] + :param str project: Project ID or project name + :param str test_name: + :param int work_item_id: + :rtype: bool + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if test_name is not None: + query_parameters['testName'] = self._serialize.query('test_name', test_name, 'str') + if work_item_id is not None: + query_parameters['workItemId'] = self._serialize.query('work_item_id', work_item_id, 'int') + response = self._send(http_method='DELETE', + location_id='cbd50bd7-f7ed-4e35-b127-4408ae6bfa2c', + version='7.2-preview.2', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('bool', response) + + def query_test_method_linked_work_items(self, project, test_name): + """QueryTestMethodLinkedWorkItems. + [Preview API] + :param str project: Project ID or project name + :param str test_name: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if test_name is not None: + query_parameters['testName'] = self._serialize.query('test_name', test_name, 'str') + response = self._send(http_method='POST', + location_id='cbd50bd7-f7ed-4e35-b127-4408ae6bfa2c', + version='7.2-preview.2', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('TestToWorkItemLinks', response) + + def get_test_result_work_items_by_id(self, project, run_id, test_case_result_id): + """GetTestResultWorkItemsById. + [Preview API] + :param str project: Project ID or project name + :param int run_id: + :param int test_case_result_id: + :rtype: [WorkItemReference] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + if test_case_result_id is not None: + route_values['testCaseResultId'] = self._serialize.url('test_case_result_id', test_case_result_id, 'int') + response = self._send(http_method='GET', + location_id='3d032fd6-e7a0-468b-b105-75d206f99aad', + version='7.2-preview.2', + route_values=route_values) + return self._deserialize('[WorkItemReference]', self._unwrap_collection(response)) + + def query_test_result_work_items(self, project, work_item_category, automated_test_name=None, test_case_id=None, max_complete_date=None, days=None, work_item_count=None): + """QueryTestResultWorkItems. + [Preview API] Query Test Result WorkItems based on filter + :param str project: Project ID or project name + :param str work_item_category: can take values Microsoft.BugCategory or all(for getting all workitems) + :param str automated_test_name: + :param int test_case_id: + :param datetime max_complete_date: + :param int days: + :param int work_item_count: + :rtype: [WorkItemReference] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if work_item_category is not None: + query_parameters['workItemCategory'] = self._serialize.query('work_item_category', work_item_category, 'str') + if automated_test_name is not None: + query_parameters['automatedTestName'] = self._serialize.query('automated_test_name', automated_test_name, 'str') + if test_case_id is not None: + query_parameters['testCaseId'] = self._serialize.query('test_case_id', test_case_id, 'int') + if max_complete_date is not None: + query_parameters['maxCompleteDate'] = self._serialize.query('max_complete_date', max_complete_date, 'iso-8601') + if days is not None: + query_parameters['days'] = self._serialize.query('days', days, 'int') + if work_item_count is not None: + query_parameters['$workItemCount'] = self._serialize.query('work_item_count', work_item_count, 'int') + response = self._send(http_method='GET', + location_id='f7401a26-331b-44fe-a470-f7ed35138e4a', + version='7.2-preview.2', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('[WorkItemReference]', self._unwrap_collection(response)) + diff --git a/azure-devops/azure/devops/v7_0/tfvc/__init__.py b/azure-devops/azure/devops/v7_2/tfvc/__init__.py similarity index 100% rename from azure-devops/azure/devops/v7_0/tfvc/__init__.py rename to azure-devops/azure/devops/v7_2/tfvc/__init__.py index 84b77dc9..7f980828 100644 --- a/azure-devops/azure/devops/v7_0/tfvc/__init__.py +++ b/azure-devops/azure/devops/v7_2/tfvc/__init__.py @@ -11,12 +11,12 @@ __all__ = [ 'AssociatedWorkItem', + 'Change', + 'CheckinNote', 'FileContentMetadata', 'GitRepository', 'GitRepositoryRef', 'GraphSubjectBase', - 'Change', - 'CheckinNote', 'IdentityRef', 'ItemContent', 'ItemModel', diff --git a/azure-devops/azure/devops/v7_0/tfvc/models.py b/azure-devops/azure/devops/v7_2/tfvc/models.py similarity index 92% rename from azure-devops/azure/devops/v7_0/tfvc/models.py rename to azure-devops/azure/devops/v7_2/tfvc/models.py index 2e3cb955..9b9c4880 100644 --- a/azure-devops/azure/devops/v7_0/tfvc/models.py +++ b/azure-devops/azure/devops/v7_2/tfvc/models.py @@ -48,6 +48,56 @@ def __init__(self, assigned_to=None, id=None, state=None, title=None, url=None, self.work_item_type = work_item_type +class Change(Model): + """ + :param change_type: The type of change that was made to the item. + :type change_type: object + :param item: Current version. + :type item: object + :param new_content: Content of the item after the change. + :type new_content: :class:`ItemContent ` + :param source_server_item: Path of the item on the server. + :type source_server_item: str + :param url: URL to retrieve the item. + :type url: str + """ + + _attribute_map = { + 'change_type': {'key': 'changeType', 'type': 'object'}, + 'item': {'key': 'item', 'type': 'object'}, + 'new_content': {'key': 'newContent', 'type': 'ItemContent'}, + 'source_server_item': {'key': 'sourceServerItem', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, change_type=None, item=None, new_content=None, source_server_item=None, url=None): + super(Change, self).__init__() + self.change_type = change_type + self.item = item + self.new_content = new_content + self.source_server_item = source_server_item + self.url = url + + +class CheckinNote(Model): + """ + :param name: + :type name: str + :param value: + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'} + } + + def __init__(self, name=None, value=None): + super(CheckinNote, self).__init__() + self.name = name + self.value = value + + class FileContentMetadata(Model): """ :param content_type: @@ -90,7 +140,7 @@ def __init__(self, content_type=None, encoding=None, extension=None, file_name=N class GitRepository(Model): """ :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param default_branch: :type default_branch: str :param id: @@ -99,12 +149,14 @@ class GitRepository(Model): :type is_disabled: bool :param is_fork: True if the repository was created as a fork. :type is_fork: bool + :param is_in_maintenance: True if the repository is in maintenance. False otherwise. + :type is_in_maintenance: bool :param name: :type name: str :param parent_repository: - :type parent_repository: :class:`GitRepositoryRef ` + :type parent_repository: :class:`GitRepositoryRef ` :param project: - :type project: :class:`TeamProjectReference ` + :type project: :class:`TeamProjectReference ` :param remote_url: :type remote_url: str :param size: Compressed size (bytes) of the repository. @@ -125,6 +177,7 @@ class GitRepository(Model): 'id': {'key': 'id', 'type': 'str'}, 'is_disabled': {'key': 'isDisabled', 'type': 'bool'}, 'is_fork': {'key': 'isFork', 'type': 'bool'}, + 'is_in_maintenance': {'key': 'isInMaintenance', 'type': 'bool'}, 'name': {'key': 'name', 'type': 'str'}, 'parent_repository': {'key': 'parentRepository', 'type': 'GitRepositoryRef'}, 'project': {'key': 'project', 'type': 'TeamProjectReference'}, @@ -136,13 +189,14 @@ class GitRepository(Model): 'web_url': {'key': 'webUrl', 'type': 'str'} } - def __init__(self, _links=None, default_branch=None, id=None, is_disabled=None, is_fork=None, name=None, parent_repository=None, project=None, remote_url=None, size=None, ssh_url=None, url=None, valid_remote_urls=None, web_url=None): + def __init__(self, _links=None, default_branch=None, id=None, is_disabled=None, is_fork=None, is_in_maintenance=None, name=None, parent_repository=None, project=None, remote_url=None, size=None, ssh_url=None, url=None, valid_remote_urls=None, web_url=None): super(GitRepository, self).__init__() self._links = _links self.default_branch = default_branch self.id = id self.is_disabled = is_disabled self.is_fork = is_fork + self.is_in_maintenance = is_in_maintenance self.name = name self.parent_repository = parent_repository self.project = project @@ -157,7 +211,7 @@ def __init__(self, _links=None, default_branch=None, id=None, is_disabled=None, class GitRepositoryRef(Model): """ :param collection: Team Project Collection where this Fork resides - :type collection: :class:`TeamProjectCollectionReference ` + :type collection: :class:`TeamProjectCollectionReference ` :param id: :type id: str :param is_fork: True if the repository was created as a fork @@ -165,7 +219,7 @@ class GitRepositoryRef(Model): :param name: :type name: str :param project: - :type project: :class:`TeamProjectReference ` + :type project: :class:`TeamProjectReference ` :param remote_url: :type remote_url: str :param ssh_url: @@ -200,7 +254,7 @@ def __init__(self, collection=None, id=None, is_fork=None, name=None, project=No class GraphSubjectBase(Model): """ :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. :type descriptor: str :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. @@ -224,60 +278,10 @@ def __init__(self, _links=None, descriptor=None, display_name=None, url=None): self.url = url -class Change(Model): - """ - :param change_type: The type of change that was made to the item. - :type change_type: object - :param item: Current version. - :type item: object - :param new_content: Content of the item after the change. - :type new_content: :class:`ItemContent ` - :param source_server_item: Path of the item on the server. - :type source_server_item: str - :param url: URL to retrieve the item. - :type url: str - """ - - _attribute_map = { - 'change_type': {'key': 'changeType', 'type': 'object'}, - 'item': {'key': 'item', 'type': 'object'}, - 'new_content': {'key': 'newContent', 'type': 'ItemContent'}, - 'source_server_item': {'key': 'sourceServerItem', 'type': 'str'}, - 'url': {'key': 'url', 'type': 'str'} - } - - def __init__(self, change_type=None, item=None, new_content=None, source_server_item=None, url=None): - super(Change, self).__init__() - self.change_type = change_type - self.item = item - self.new_content = new_content - self.source_server_item = source_server_item - self.url = url - - -class CheckinNote(Model): - """ - :param name: - :type name: str - :param value: - :type value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'} - } - - def __init__(self, name=None, value=None): - super(CheckinNote, self).__init__() - self.name = name - self.value = value - - class IdentityRef(GraphSubjectBase): """ :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. :type descriptor: str :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. @@ -355,11 +359,11 @@ def __init__(self, content=None, content_type=None): class ItemModel(Model): """ :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param content: :type content: str :param content_metadata: - :type content_metadata: :class:`FileContentMetadata ` + :type content_metadata: :class:`FileContentMetadata ` :param is_folder: :type is_folder: bool :param is_sym_link: @@ -412,6 +416,8 @@ class TeamProjectCollectionReference(Model): """ Reference object for a TeamProjectCollection. + :param avatar_url: Collection avatar Url. + :type avatar_url: str :param id: Collection Id. :type id: str :param name: Collection Name. @@ -421,13 +427,15 @@ class TeamProjectCollectionReference(Model): """ _attribute_map = { + 'avatar_url': {'key': 'avatarUrl', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'url': {'key': 'url', 'type': 'str'} } - def __init__(self, id=None, name=None, url=None): + def __init__(self, avatar_url=None, id=None, name=None, url=None): super(TeamProjectCollectionReference, self).__init__() + self.avatar_url = avatar_url self.id = id self.name = name self.url = url @@ -516,7 +524,7 @@ class TfvcChange(Change): A change. :param merge_sources: List of merge sources in case of rename or branch creation. - :type merge_sources: list of :class:`TfvcMergeSource ` + :type merge_sources: list of :class:`TfvcMergeSource ` :param pending_version: Version at which a (shelved) change was pended against :type pending_version: int """ @@ -537,19 +545,19 @@ class TfvcChangesetRef(Model): Metadata for a changeset. :param _links: A collection of REST reference links. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param author: Alias or display name of user. - :type author: :class:`IdentityRef ` + :type author: :class:`IdentityRef ` + :param changeset_id: Changeset Id. + :type changeset_id: int + :param checked_in_by: Alias or display name of user. + :type checked_in_by: :class:`IdentityRef ` :param comment: Comment for the changeset. :type comment: str :param comment_truncated: Was the Comment result truncated? :type comment_truncated: bool :param created_date: Creation date of the changeset. :type created_date: datetime - :param changeset_id: Changeset Id. - :type changeset_id: int - :param checked_in_by: Alias or display name of user. - :type checked_in_by: :class:`IdentityRef ` :param url: URL to retrieve the item. :type url: str """ @@ -557,23 +565,23 @@ class TfvcChangesetRef(Model): _attribute_map = { '_links': {'key': '_links', 'type': 'ReferenceLinks'}, 'author': {'key': 'author', 'type': 'IdentityRef'}, + 'changeset_id': {'key': 'changesetId', 'type': 'int'}, + 'checked_in_by': {'key': 'checkedInBy', 'type': 'IdentityRef'}, 'comment': {'key': 'comment', 'type': 'str'}, 'comment_truncated': {'key': 'commentTruncated', 'type': 'bool'}, 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, - 'changeset_id': {'key': 'changesetId', 'type': 'int'}, - 'checked_in_by': {'key': 'checkedInBy', 'type': 'IdentityRef'}, 'url': {'key': 'url', 'type': 'str'} } - def __init__(self, _links=None, author=None, comment=None, comment_truncated=None, created_date=None, changeset_id=None, checked_in_by=None, url=None): + def __init__(self, _links=None, author=None, changeset_id=None, checked_in_by=None, comment=None, comment_truncated=None, created_date=None, url=None): super(TfvcChangesetRef, self).__init__() self._links = _links self.author = author + self.changeset_id = changeset_id + self.checked_in_by = checked_in_by self.comment = comment self.comment_truncated = comment_truncated self.created_date = created_date - self.changeset_id = changeset_id - self.checked_in_by = checked_in_by self.url = url @@ -594,7 +602,7 @@ class TfvcChangesetSearchCriteria(Model): :param item_path: Path of item to search under. :type item_path: str :param mappings: - :type mappings: list of :class:`TfvcMappingFilter ` + :type mappings: list of :class:`TfvcMappingFilter ` :param to_date: If provided, only include changesets created before this date (string). :type to_date: str :param to_id: If provided, a version descriptor for the latest change list to include. @@ -630,24 +638,24 @@ class TfvcChangesetsRequestData(Model): """ Request body for Get batched changesets. - :param comment_length: Max length of the comment. - :type comment_length: int :param changeset_ids: List of changeset Ids. :type changeset_ids: list of int + :param comment_length: Max length of the comment. + :type comment_length: int :param include_links: Whether to include the _links field on the shallow references :type include_links: bool """ _attribute_map = { - 'comment_length': {'key': 'commentLength', 'type': 'int'}, 'changeset_ids': {'key': 'changesetIds', 'type': '[int]'}, + 'comment_length': {'key': 'commentLength', 'type': 'int'}, 'include_links': {'key': 'includeLinks', 'type': 'bool'} } - def __init__(self, comment_length=None, changeset_ids=None, include_links=None): + def __init__(self, changeset_ids=None, comment_length=None, include_links=None): super(TfvcChangesetsRequestData, self).__init__() - self.comment_length = comment_length self.changeset_ids = changeset_ids + self.comment_length = comment_length self.include_links = include_links @@ -656,11 +664,11 @@ class TfvcItem(ItemModel): Metadata for an item. :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param content: :type content: str :param content_metadata: - :type content_metadata: :class:`FileContentMetadata ` + :type content_metadata: :class:`FileContentMetadata ` :param is_folder: :type is_folder: bool :param is_sym_link: @@ -669,14 +677,14 @@ class TfvcItem(ItemModel): :type path: str :param url: :type url: str + :param change_date: Item changed datetime. + :type change_date: datetime :param deletion_id: Greater than 0 if item is deleted. :type deletion_id: int :param encoding: File encoding from database, -1 represents binary. :type encoding: int :param hash_value: MD5 hash as a base 64 string, applies to files only. :type hash_value: str - :param change_date: Item changed datetime. - :type change_date: datetime :param is_branch: True if item is a branch. :type is_branch: bool :param is_pending_change: True if there is a change pending. @@ -695,22 +703,22 @@ class TfvcItem(ItemModel): 'is_sym_link': {'key': 'isSymLink', 'type': 'bool'}, 'path': {'key': 'path', 'type': 'str'}, 'url': {'key': 'url', 'type': 'str'}, + 'change_date': {'key': 'changeDate', 'type': 'iso-8601'}, 'deletion_id': {'key': 'deletionId', 'type': 'int'}, 'encoding': {'key': 'encoding', 'type': 'int'}, 'hash_value': {'key': 'hashValue', 'type': 'str'}, - 'change_date': {'key': 'changeDate', 'type': 'iso-8601'}, 'is_branch': {'key': 'isBranch', 'type': 'bool'}, 'is_pending_change': {'key': 'isPendingChange', 'type': 'bool'}, 'size': {'key': 'size', 'type': 'long'}, 'version': {'key': 'version', 'type': 'int'} } - def __init__(self, _links=None, content=None, content_metadata=None, is_folder=None, is_sym_link=None, path=None, url=None, deletion_id=None, encoding=None, hash_value=None, change_date=None, is_branch=None, is_pending_change=None, size=None, version=None): + def __init__(self, _links=None, content=None, content_metadata=None, is_folder=None, is_sym_link=None, path=None, url=None, change_date=None, deletion_id=None, encoding=None, hash_value=None, is_branch=None, is_pending_change=None, size=None, version=None): super(TfvcItem, self).__init__(_links=_links, content=content, content_metadata=content_metadata, is_folder=is_folder, is_sym_link=is_sym_link, path=path, url=url) + self.change_date = change_date self.deletion_id = deletion_id self.encoding = encoding self.hash_value = hash_value - self.change_date = change_date self.is_branch = is_branch self.is_pending_change = is_pending_change self.size = size @@ -759,7 +767,7 @@ class TfvcItemRequestData(Model): :param include_links: Whether to include the _links field on the shallow references :type include_links: bool :param item_descriptors: - :type item_descriptors: list of :class:`TfvcItemDescriptor ` + :type item_descriptors: list of :class:`TfvcItemDescriptor ` """ _attribute_map = { @@ -780,7 +788,7 @@ class TfvcLabelRef(Model): Metadata for a Label. :param _links: Collection of reference links. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param description: Label description. :type description: str :param id: Label Id. @@ -792,7 +800,7 @@ class TfvcLabelRef(Model): :param name: Label name. :type name: str :param owner: Label owner. - :type owner: :class:`IdentityRef ` + :type owner: :class:`IdentityRef ` :param url: Label Url. :type url: str """ @@ -931,7 +939,7 @@ class TfvcPolicyOverrideInfo(Model): :param comment: Overidden policy comment. :type comment: str :param policy_failures: Information on the failed policy that was overridden. - :type policy_failures: list of :class:`TfvcPolicyFailureInfo ` + :type policy_failures: list of :class:`TfvcPolicyFailureInfo ` """ _attribute_map = { @@ -967,7 +975,7 @@ class TfvcShelvesetRef(Model): Metadata for a shallow shelveset. :param _links: List of reference links for the shelveset. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param comment: Shelveset comment. :type comment: str :param comment_truncated: Shelveset comment truncated as applicable. @@ -979,7 +987,7 @@ class TfvcShelvesetRef(Model): :param name: Shelveset name. :type name: str :param owner: Shelveset Owner. - :type owner: :class:`IdentityRef ` + :type owner: :class:`IdentityRef ` :param url: Shelveset Url. :type url: str """ @@ -1015,10 +1023,10 @@ class TfvcShelvesetRequestData(Model): :type include_links: bool :param include_work_items: Whether to include workItems :type include_work_items: bool - :param max_comment_length: Max length of comment - :type max_comment_length: int :param max_change_count: Max number of changes to include :type max_change_count: int + :param max_comment_length: Max length of comment + :type max_comment_length: int :param name: Shelveset name :type name: str :param owner: Owner's ID. Could be a name or a guid. @@ -1029,40 +1037,40 @@ class TfvcShelvesetRequestData(Model): 'include_details': {'key': 'includeDetails', 'type': 'bool'}, 'include_links': {'key': 'includeLinks', 'type': 'bool'}, 'include_work_items': {'key': 'includeWorkItems', 'type': 'bool'}, - 'max_comment_length': {'key': 'maxCommentLength', 'type': 'int'}, 'max_change_count': {'key': 'maxChangeCount', 'type': 'int'}, + 'max_comment_length': {'key': 'maxCommentLength', 'type': 'int'}, 'name': {'key': 'name', 'type': 'str'}, 'owner': {'key': 'owner', 'type': 'str'} } - def __init__(self, include_details=None, include_links=None, include_work_items=None, max_comment_length=None, max_change_count=None, name=None, owner=None): + def __init__(self, include_details=None, include_links=None, include_work_items=None, max_change_count=None, max_comment_length=None, name=None, owner=None): super(TfvcShelvesetRequestData, self).__init__() self.include_details = include_details self.include_links = include_links self.include_work_items = include_work_items - self.max_comment_length = max_comment_length self.max_change_count = max_change_count + self.max_comment_length = max_comment_length self.name = name self.owner = owner class TfvcStatistics(Model): """ - :param file_count_total: Count of files at the requested scope. - :type file_count_total: long :param changeset_id: Id of the last changeset the stats are based on. :type changeset_id: int + :param file_count_total: Count of files at the requested scope. + :type file_count_total: long """ _attribute_map = { - 'file_count_total': {'key': 'fileCountTotal', 'type': 'long'}, - 'changeset_id': {'key': 'changesetId', 'type': 'int'} + 'changeset_id': {'key': 'changesetId', 'type': 'int'}, + 'file_count_total': {'key': 'fileCountTotal', 'type': 'long'} } - def __init__(self, file_count_total=None, changeset_id=None): + def __init__(self, changeset_id=None, file_count_total=None): super(TfvcStatistics, self).__init__() - self.file_count_total = file_count_total self.changeset_id = changeset_id + self.file_count_total = file_count_total class TfvcVersionDescriptor(Model): @@ -1095,7 +1103,7 @@ class VersionControlProjectInfo(Model): :param default_source_control_type: :type default_source_control_type: object :param project: - :type project: :class:`TeamProjectReference ` + :type project: :class:`TeamProjectReference ` :param supports_git: :type supports_git: bool :param supports_tFVC: @@ -1120,9 +1128,9 @@ def __init__(self, default_source_control_type=None, project=None, supports_git= class VstsInfo(Model): """ :param collection: - :type collection: :class:`TeamProjectCollectionReference ` + :type collection: :class:`TeamProjectCollectionReference ` :param repository: - :type repository: :class:`GitRepository ` + :type repository: :class:`GitRepository ` :param server_url: :type server_url: str """ @@ -1147,7 +1155,7 @@ class TfvcBranchRef(TfvcShallowBranchRef): :param path: Path for the branch. :type path: str :param _links: A collection of REST reference links. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param created_date: Creation date of the branch. :type created_date: datetime :param description: Branch description. @@ -1155,7 +1163,7 @@ class TfvcBranchRef(TfvcShallowBranchRef): :param is_deleted: Is the branch deleted? :type is_deleted: bool :param owner: Alias or display name of user - :type owner: :class:`IdentityRef ` + :type owner: :class:`IdentityRef ` :param url: URL to retrieve the item. :type url: str """ @@ -1185,65 +1193,65 @@ class TfvcChangeset(TfvcChangesetRef): A collection of changes. :param _links: A collection of REST reference links. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param author: Alias or display name of user. - :type author: :class:`IdentityRef ` + :type author: :class:`IdentityRef ` + :param changeset_id: Changeset Id. + :type changeset_id: int + :param checked_in_by: Alias or display name of user. + :type checked_in_by: :class:`IdentityRef ` :param comment: Comment for the changeset. :type comment: str :param comment_truncated: Was the Comment result truncated? :type comment_truncated: bool :param created_date: Creation date of the changeset. :type created_date: datetime - :param changeset_id: Changeset Id. - :type changeset_id: int - :param checked_in_by: Alias or display name of user. - :type checked_in_by: :class:`IdentityRef ` :param url: URL to retrieve the item. :type url: str :param account_id: Changeset Account Id also known as Organization Id. :type account_id: str + :param changes: List of associated changes. + :type changes: list of :class:`TfvcChange ` + :param checkin_notes: List of Checkin Notes for the changeset. + :type checkin_notes: list of :class:`CheckinNote ` :param collection_id: Changeset collection Id. :type collection_id: str :param has_more_changes: True if more changes are available. :type has_more_changes: bool - :param changes: List of associated changes. - :type changes: list of :class:`TfvcChange ` - :param checkin_notes: List of Checkin Notes for the changeset. - :type checkin_notes: list of :class:`CheckinNote ` :param policy_override: Policy Override for the changeset. - :type policy_override: :class:`TfvcPolicyOverrideInfo ` + :type policy_override: :class:`TfvcPolicyOverrideInfo ` :param team_project_ids: Team Project Ids for the changeset. :type team_project_ids: list of str :param work_items: List of work items associated with the changeset. - :type work_items: list of :class:`AssociatedWorkItem ` + :type work_items: list of :class:`AssociatedWorkItem ` """ _attribute_map = { '_links': {'key': '_links', 'type': 'ReferenceLinks'}, 'author': {'key': 'author', 'type': 'IdentityRef'}, + 'changeset_id': {'key': 'changesetId', 'type': 'int'}, + 'checked_in_by': {'key': 'checkedInBy', 'type': 'IdentityRef'}, 'comment': {'key': 'comment', 'type': 'str'}, 'comment_truncated': {'key': 'commentTruncated', 'type': 'bool'}, 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, - 'changeset_id': {'key': 'changesetId', 'type': 'int'}, - 'checked_in_by': {'key': 'checkedInBy', 'type': 'IdentityRef'}, 'url': {'key': 'url', 'type': 'str'}, 'account_id': {'key': 'accountId', 'type': 'str'}, - 'collection_id': {'key': 'collectionId', 'type': 'str'}, - 'has_more_changes': {'key': 'hasMoreChanges', 'type': 'bool'}, 'changes': {'key': 'changes', 'type': '[TfvcChange]'}, 'checkin_notes': {'key': 'checkinNotes', 'type': '[CheckinNote]'}, + 'collection_id': {'key': 'collectionId', 'type': 'str'}, + 'has_more_changes': {'key': 'hasMoreChanges', 'type': 'bool'}, 'policy_override': {'key': 'policyOverride', 'type': 'TfvcPolicyOverrideInfo'}, 'team_project_ids': {'key': 'teamProjectIds', 'type': '[str]'}, 'work_items': {'key': 'workItems', 'type': '[AssociatedWorkItem]'} } - def __init__(self, _links=None, author=None, comment=None, comment_truncated=None, created_date=None, changeset_id=None, checked_in_by=None, url=None, account_id=None, collection_id=None, has_more_changes=None, changes=None, checkin_notes=None, policy_override=None, team_project_ids=None, work_items=None): - super(TfvcChangeset, self).__init__(_links=_links, author=author, comment=comment, comment_truncated=comment_truncated, created_date=created_date, changeset_id=changeset_id, checked_in_by=checked_in_by, url=url) + def __init__(self, _links=None, author=None, changeset_id=None, checked_in_by=None, comment=None, comment_truncated=None, created_date=None, url=None, account_id=None, changes=None, checkin_notes=None, collection_id=None, has_more_changes=None, policy_override=None, team_project_ids=None, work_items=None): + super(TfvcChangeset, self).__init__(_links=_links, author=author, changeset_id=changeset_id, checked_in_by=checked_in_by, comment=comment, comment_truncated=comment_truncated, created_date=created_date, url=url) self.account_id = account_id - self.collection_id = collection_id - self.has_more_changes = has_more_changes self.changes = changes self.checkin_notes = checkin_notes + self.collection_id = collection_id + self.has_more_changes = has_more_changes self.policy_override = policy_override self.team_project_ids = team_project_ids self.work_items = work_items @@ -1254,7 +1262,7 @@ class TfvcLabel(TfvcLabelRef): Metadata for a label. :param _links: Collection of reference links. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param description: Label description. :type description: str :param id: Label Id. @@ -1266,11 +1274,11 @@ class TfvcLabel(TfvcLabelRef): :param name: Label name. :type name: str :param owner: Label owner. - :type owner: :class:`IdentityRef ` + :type owner: :class:`IdentityRef ` :param url: Label Url. :type url: str :param items: List of items. - :type items: list of :class:`TfvcItem ` + :type items: list of :class:`TfvcItem ` """ _attribute_map = { @@ -1295,7 +1303,7 @@ class TfvcShelveset(TfvcShelvesetRef): Metadata for a shelveset. :param _links: List of reference links for the shelveset. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param comment: Shelveset comment. :type comment: str :param comment_truncated: Shelveset comment truncated as applicable. @@ -1307,17 +1315,17 @@ class TfvcShelveset(TfvcShelvesetRef): :param name: Shelveset name. :type name: str :param owner: Shelveset Owner. - :type owner: :class:`IdentityRef ` + :type owner: :class:`IdentityRef ` :param url: Shelveset Url. :type url: str :param changes: List of changes. - :type changes: list of :class:`TfvcChange ` + :type changes: list of :class:`TfvcChange ` :param notes: List of checkin notes. - :type notes: list of :class:`CheckinNote ` + :type notes: list of :class:`CheckinNote ` :param policy_override: Policy override information if applicable. - :type policy_override: :class:`TfvcPolicyOverrideInfo ` + :type policy_override: :class:`TfvcPolicyOverrideInfo ` :param work_items: List of associated workitems. - :type work_items: list of :class:`AssociatedWorkItem ` + :type work_items: list of :class:`AssociatedWorkItem ` """ _attribute_map = { @@ -1350,7 +1358,7 @@ class TfvcBranch(TfvcBranchRef): :param path: Path for the branch. :type path: str :param _links: A collection of REST reference links. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param created_date: Creation date of the branch. :type created_date: datetime :param description: Branch description. @@ -1358,17 +1366,17 @@ class TfvcBranch(TfvcBranchRef): :param is_deleted: Is the branch deleted? :type is_deleted: bool :param owner: Alias or display name of user - :type owner: :class:`IdentityRef ` + :type owner: :class:`IdentityRef ` :param url: URL to retrieve the item. :type url: str :param children: List of children for the branch. - :type children: list of :class:`TfvcBranch ` + :type children: list of :class:`TfvcBranch ` :param mappings: List of branch mappings. - :type mappings: list of :class:`TfvcBranchMapping ` + :type mappings: list of :class:`TfvcBranchMapping ` :param parent: Path of the branch's parent. - :type parent: :class:`TfvcShallowBranchRef ` + :type parent: :class:`TfvcShallowBranchRef ` :param related_branches: List of paths of the related branches. - :type related_branches: list of :class:`TfvcShallowBranchRef ` + :type related_branches: list of :class:`TfvcShallowBranchRef ` """ _attribute_map = { @@ -1395,12 +1403,12 @@ def __init__(self, path=None, _links=None, created_date=None, description=None, __all__ = [ 'AssociatedWorkItem', + 'Change', + 'CheckinNote', 'FileContentMetadata', 'GitRepository', 'GitRepositoryRef', 'GraphSubjectBase', - 'Change', - 'CheckinNote', 'IdentityRef', 'ItemContent', 'ItemModel', diff --git a/azure-devops/azure/devops/v7_0/tfvc/tfvc_client.py b/azure-devops/azure/devops/v7_2/tfvc/tfvc_client.py similarity index 88% rename from azure-devops/azure/devops/v7_0/tfvc/tfvc_client.py rename to azure-devops/azure/devops/v7_2/tfvc/tfvc_client.py index e5b5447a..f8030d4a 100644 --- a/azure-devops/azure/devops/v7_0/tfvc/tfvc_client.py +++ b/azure-devops/azure/devops/v7_2/tfvc/tfvc_client.py @@ -27,12 +27,12 @@ def __init__(self, base_url=None, creds=None): def get_branch(self, path, project=None, include_parent=None, include_children=None): """GetBranch. - Get a single branch hierarchy at the given path with parents or children as specified. + [Preview API] Get a single branch hierarchy at the given path with parents or children as specified. :param str path: Full path to the branch. Default: $/ Examples: $/, $/MyProject, $/MyProject/SomeFolder. :param str project: Project ID or project name :param bool include_parent: Return the parent branch, if there is one. Default: False :param bool include_children: Return child branches, if there are any. Default: False - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -46,14 +46,14 @@ def get_branch(self, path, project=None, include_parent=None, include_children=N query_parameters['includeChildren'] = self._serialize.query('include_children', include_children, 'bool') response = self._send(http_method='GET', location_id='bc1f417e-239d-42e7-85e1-76e80cb2d6eb', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('TfvcBranch', response) def get_branches(self, project=None, include_parent=None, include_children=None, include_deleted=None, include_links=None): """GetBranches. - Get a collection of branch roots -- first-level children, branches with no parents. + [Preview API] Get a collection of branch roots -- first-level children, branches with no parents. :param str project: Project ID or project name :param bool include_parent: Return the parent branch, if there is one. Default: False :param bool include_children: Return the child branches for each root branch. Default: False @@ -75,14 +75,14 @@ def get_branches(self, project=None, include_parent=None, include_children=None, query_parameters['includeLinks'] = self._serialize.query('include_links', include_links, 'bool') response = self._send(http_method='GET', location_id='bc1f417e-239d-42e7-85e1-76e80cb2d6eb', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TfvcBranch]', self._unwrap_collection(response)) def get_branch_refs(self, scope_path, project=None, include_deleted=None, include_links=None): """GetBranchRefs. - Get branch hierarchies below the specified scopePath + [Preview API] Get branch hierarchies below the specified scopePath :param str scope_path: Full path to the branch. Default: $/ Examples: $/, $/MyProject, $/MyProject/SomeFolder. :param str project: Project ID or project name :param bool include_deleted: Return deleted branches. Default: False @@ -101,19 +101,19 @@ def get_branch_refs(self, scope_path, project=None, include_deleted=None, includ query_parameters['includeLinks'] = self._serialize.query('include_links', include_links, 'bool') response = self._send(http_method='GET', location_id='bc1f417e-239d-42e7-85e1-76e80cb2d6eb', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TfvcBranchRef]', self._unwrap_collection(response)) def get_changeset_changes(self, id=None, skip=None, top=None, continuation_token=None): """GetChangesetChanges. - Retrieve Tfvc changes for a given changeset. + [Preview API] Retrieve Tfvc changes for a given changeset. :param int id: ID of the changeset. Default: null :param int skip: Number of results to skip. Default: null :param int top: The maximum number of results to return. Default: null :param str continuation_token: Return the next page of results. Default: null - :rtype: :class:`<[TfvcChange]> ` + :rtype: :class:`<[TfvcChange]> ` """ route_values = {} if id is not None: @@ -127,17 +127,17 @@ def get_changeset_changes(self, id=None, skip=None, top=None, continuation_token query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'str') response = self._send(http_method='GET', location_id='f32b86f2-15b9-4fe6-81b1-6f8938617ee5', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TfvcChange]', self._unwrap_collection(response)) def create_changeset(self, changeset, project=None): """CreateChangeset. - Create a new changeset. - :param :class:` ` changeset: + [Preview API] Create a new changeset. + :param :class:` ` changeset: :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -145,14 +145,14 @@ def create_changeset(self, changeset, project=None): content = self._serialize.body(changeset, 'TfvcChangeset') response = self._send(http_method='POST', location_id='0bc8f0a4-6bfb-42a9-ba84-139da7b99c49', - version='7.0', + version='7.2-preview.3', route_values=route_values, content=content) return self._deserialize('TfvcChangesetRef', response) def get_changeset(self, id, project=None, max_change_count=None, include_details=None, include_work_items=None, max_comment_length=None, include_source_rename=None, skip=None, top=None, orderby=None, search_criteria=None): """GetChangeset. - Retrieve a Tfvc Changeset + [Preview API] Retrieve a Tfvc Changeset :param int id: Changeset Id to retrieve. :param str project: Project ID or project name :param int max_change_count: Number of changes to return (maximum 100 changes) Default: 0 @@ -163,8 +163,8 @@ def get_changeset(self, id, project=None, max_change_count=None, include_details :param int skip: Number of results to skip. Default: null :param int top: The maximum number of results to return. Default: null :param str orderby: Results are sorted by ID in descending order by default. Use id asc to sort by ID in ascending order. - :param :class:` ` search_criteria: Following criteria available (.itemPath, .version, .versionType, .versionOption, .author, .fromId, .toId, .fromDate, .toDate) Default: null - :rtype: :class:` ` + :param :class:` ` search_criteria: Following criteria available (.itemPath, .version, .versionType, .versionOption, .author, .fromId, .toId, .fromDate, .toDate) Default: null + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -209,20 +209,20 @@ def get_changeset(self, id, project=None, max_change_count=None, include_details query_parameters['searchCriteria.mappings'] = search_criteria.mappings response = self._send(http_method='GET', location_id='0bc8f0a4-6bfb-42a9-ba84-139da7b99c49', - version='7.0', + version='7.2-preview.3', route_values=route_values, query_parameters=query_parameters) return self._deserialize('TfvcChangeset', response) def get_changesets(self, project=None, max_comment_length=None, skip=None, top=None, orderby=None, search_criteria=None): """GetChangesets. - Retrieve Tfvc Changesets + [Preview API] Retrieve Tfvc Changesets :param str project: Project ID or project name :param int max_comment_length: Include details about associated work items in the response. Default: null :param int skip: Number of results to skip. Default: null :param int top: The maximum number of results to return. Default: null :param str orderby: Results are sorted by ID in descending order by default. Use id asc to sort by ID in ascending order. - :param :class:` ` search_criteria: Following criteria available (.itemPath, .version, .versionType, .versionOption, .author, .fromId, .toId, .fromDate, .toDate) Default: null + :param :class:` ` search_criteria: Following criteria available (.itemPath, .version, .versionType, .versionOption, .author, .fromId, .toId, .fromDate, .toDate) Default: null :rtype: [TfvcChangesetRef] """ route_values = {} @@ -258,27 +258,27 @@ def get_changesets(self, project=None, max_comment_length=None, skip=None, top=N query_parameters['searchCriteria.mappings'] = search_criteria.mappings response = self._send(http_method='GET', location_id='0bc8f0a4-6bfb-42a9-ba84-139da7b99c49', - version='7.0', + version='7.2-preview.3', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TfvcChangesetRef]', self._unwrap_collection(response)) def get_batched_changesets(self, changesets_request_data): """GetBatchedChangesets. - Returns changesets for a given list of changeset Ids. - :param :class:` ` changesets_request_data: List of changeset IDs. + [Preview API] Returns changesets for a given list of changeset Ids. + :param :class:` ` changesets_request_data: List of changeset IDs. :rtype: [TfvcChangesetRef] """ content = self._serialize.body(changesets_request_data, 'TfvcChangesetsRequestData') response = self._send(http_method='POST', location_id='b7e7c173-803c-4fea-9ec8-31ee35c5502a', - version='7.0', + version='7.2-preview.1', content=content) return self._deserialize('[TfvcChangesetRef]', self._unwrap_collection(response)) def get_changeset_work_items(self, id=None): """GetChangesetWorkItems. - Retrieves the work items associated with a particular changeset. + [Preview API] Retrieves the work items associated with a particular changeset. :param int id: ID of the changeset. :rtype: [AssociatedWorkItem] """ @@ -287,14 +287,14 @@ def get_changeset_work_items(self, id=None): route_values['id'] = self._serialize.url('id', id, 'int') response = self._send(http_method='GET', location_id='64ae0bea-1d71-47c9-a9e5-fe73f5ea0ff4', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('[AssociatedWorkItem]', self._unwrap_collection(response)) def get_items_batch(self, item_request_data, project=None): """GetItemsBatch. - Post for retrieving a set of items given a list of paths or a long path. Allows for specifying the recursionLevel and version descriptors for each path. - :param :class:` ` item_request_data: + [Preview API] Post for retrieving a set of items given a list of paths or a long path. Allows for specifying the recursionLevel and version descriptors for each path. + :param :class:` ` item_request_data: :param str project: Project ID or project name :rtype: [[TfvcItem]] """ @@ -304,15 +304,15 @@ def get_items_batch(self, item_request_data, project=None): content = self._serialize.body(item_request_data, 'TfvcItemRequestData') response = self._send(http_method='POST', location_id='fe6f827b-5f64-480f-b8af-1eca3b80e833', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('[[TfvcItem]]', self._unwrap_collection(response)) def get_items_batch_zip(self, item_request_data, project=None, **kwargs): """GetItemsBatchZip. - Post for retrieving a set of items given a list of paths or a long path. Allows for specifying the recursionLevel and version descriptors for each path. - :param :class:` ` item_request_data: + [Preview API] Post for retrieving a set of items given a list of paths or a long path. Allows for specifying the recursionLevel and version descriptors for each path. + :param :class:` ` item_request_data: :param str project: Project ID or project name :rtype: object """ @@ -322,7 +322,7 @@ def get_items_batch_zip(self, item_request_data, project=None, **kwargs): content = self._serialize.body(item_request_data, 'TfvcItemRequestData') response = self._send(http_method='POST', location_id='fe6f827b-5f64-480f-b8af-1eca3b80e833', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content, accept_media_type='application/zip') @@ -334,16 +334,16 @@ def get_items_batch_zip(self, item_request_data, project=None, **kwargs): def get_item(self, path, project=None, file_name=None, download=None, scope_path=None, recursion_level=None, version_descriptor=None, include_content=None): """GetItem. - Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. + [Preview API] Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. :param str path: Version control path of an individual item to return. :param str project: Project ID or project name :param str file_name: file name of item returned. :param bool download: If true, create a downloadable attachment. :param str scope_path: Version control path of a folder to return multiple items. :param str recursion_level: None (just the item), or OneLevel (contents of a folder). - :param :class:` ` version_descriptor: Version descriptor. Default is null. + :param :class:` ` version_descriptor: Version descriptor. Default is null. :param bool include_content: Set to true to include item content when requesting json. Default is false. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -370,21 +370,21 @@ def get_item(self, path, project=None, file_name=None, download=None, scope_path query_parameters['includeContent'] = self._serialize.query('include_content', include_content, 'bool') response = self._send(http_method='GET', location_id='ba9fc436-9a38-4578-89d6-e4f3241f5040', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('TfvcItem', response) def get_item_content(self, path, project=None, file_name=None, download=None, scope_path=None, recursion_level=None, version_descriptor=None, include_content=None, **kwargs): """GetItemContent. - Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. + [Preview API] Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. :param str path: Version control path of an individual item to return. :param str project: Project ID or project name :param str file_name: file name of item returned. :param bool download: If true, create a downloadable attachment. :param str scope_path: Version control path of a folder to return multiple items. :param str recursion_level: None (just the item), or OneLevel (contents of a folder). - :param :class:` ` version_descriptor: Version descriptor. Default is null. + :param :class:` ` version_descriptor: Version descriptor. Default is null. :param bool include_content: Set to true to include item content when requesting json. Default is false. :rtype: object """ @@ -413,7 +413,7 @@ def get_item_content(self, path, project=None, file_name=None, download=None, sc query_parameters['includeContent'] = self._serialize.query('include_content', include_content, 'bool') response = self._send(http_method='GET', location_id='ba9fc436-9a38-4578-89d6-e4f3241f5040', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters, accept_media_type='application/octet-stream') @@ -425,12 +425,12 @@ def get_item_content(self, path, project=None, file_name=None, download=None, sc def get_items(self, project=None, scope_path=None, recursion_level=None, include_links=None, version_descriptor=None): """GetItems. - Get a list of Tfvc items + [Preview API] Get a list of Tfvc items :param str project: Project ID or project name :param str scope_path: Version control path of a folder to return multiple items. :param str recursion_level: None (just the item), or OneLevel (contents of a folder). :param bool include_links: True to include links. - :param :class:` ` version_descriptor: + :param :class:` ` version_descriptor: :rtype: [TfvcItem] """ route_values = {} @@ -452,21 +452,21 @@ def get_items(self, project=None, scope_path=None, recursion_level=None, include query_parameters['versionDescriptor.version'] = version_descriptor.version response = self._send(http_method='GET', location_id='ba9fc436-9a38-4578-89d6-e4f3241f5040', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TfvcItem]', self._unwrap_collection(response)) def get_item_text(self, path, project=None, file_name=None, download=None, scope_path=None, recursion_level=None, version_descriptor=None, include_content=None, **kwargs): """GetItemText. - Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. + [Preview API] Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. :param str path: Version control path of an individual item to return. :param str project: Project ID or project name :param str file_name: file name of item returned. :param bool download: If true, create a downloadable attachment. :param str scope_path: Version control path of a folder to return multiple items. :param str recursion_level: None (just the item), or OneLevel (contents of a folder). - :param :class:` ` version_descriptor: Version descriptor. Default is null. + :param :class:` ` version_descriptor: Version descriptor. Default is null. :param bool include_content: Set to true to include item content when requesting json. Default is false. :rtype: object """ @@ -495,7 +495,7 @@ def get_item_text(self, path, project=None, file_name=None, download=None, scope query_parameters['includeContent'] = self._serialize.query('include_content', include_content, 'bool') response = self._send(http_method='GET', location_id='ba9fc436-9a38-4578-89d6-e4f3241f5040', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters, accept_media_type='text/plain') @@ -507,14 +507,14 @@ def get_item_text(self, path, project=None, file_name=None, download=None, scope def get_item_zip(self, path, project=None, file_name=None, download=None, scope_path=None, recursion_level=None, version_descriptor=None, include_content=None, **kwargs): """GetItemZip. - Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. + [Preview API] Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. :param str path: Version control path of an individual item to return. :param str project: Project ID or project name :param str file_name: file name of item returned. :param bool download: If true, create a downloadable attachment. :param str scope_path: Version control path of a folder to return multiple items. :param str recursion_level: None (just the item), or OneLevel (contents of a folder). - :param :class:` ` version_descriptor: Version descriptor. Default is null. + :param :class:` ` version_descriptor: Version descriptor. Default is null. :param bool include_content: Set to true to include item content when requesting json. Default is false. :rtype: object """ @@ -543,7 +543,7 @@ def get_item_zip(self, path, project=None, file_name=None, download=None, scope_ query_parameters['includeContent'] = self._serialize.query('include_content', include_content, 'bool') response = self._send(http_method='GET', location_id='ba9fc436-9a38-4578-89d6-e4f3241f5040', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters, accept_media_type='application/zip') @@ -555,7 +555,7 @@ def get_item_zip(self, path, project=None, file_name=None, download=None, scope_ def get_label_items(self, label_id, top=None, skip=None): """GetLabelItems. - Get items under a label. + [Preview API] Get items under a label. :param str label_id: Unique identifier of label :param int top: Max number of items to return :param int skip: Number of items to skip @@ -571,18 +571,18 @@ def get_label_items(self, label_id, top=None, skip=None): query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') response = self._send(http_method='GET', location_id='06166e34-de17-4b60-8cd1-23182a346fda', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TfvcItem]', self._unwrap_collection(response)) def get_label(self, label_id, request_data, project=None): """GetLabel. - Get a single deep label. + [Preview API] Get a single deep label. :param str label_id: Unique identifier of label - :param :class:` ` request_data: maxItemCount + :param :class:` ` request_data: maxItemCount :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -605,15 +605,15 @@ def get_label(self, label_id, request_data, project=None): query_parameters['requestData.includeLinks'] = request_data.include_links response = self._send(http_method='GET', location_id='a5d9bd7f-b661-4d0e-b9be-d9c16affae54', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('TfvcLabel', response) def get_labels(self, request_data, project=None, top=None, skip=None): """GetLabels. - Get a collection of shallow label references. - :param :class:` ` request_data: labelScope, name, owner, and itemLabelFilter + [Preview API] Get a collection of shallow label references. + :param :class:` ` request_data: labelScope, name, owner, and itemLabelFilter :param str project: Project ID or project name :param int top: Max number of labels to return, defaults to 100 when undefined :param int skip: Number of labels to skip @@ -642,14 +642,14 @@ def get_labels(self, request_data, project=None, top=None, skip=None): query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') response = self._send(http_method='GET', location_id='a5d9bd7f-b661-4d0e-b9be-d9c16affae54', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TfvcLabelRef]', self._unwrap_collection(response)) def get_shelveset_changes(self, shelveset_id, top=None, skip=None): """GetShelvesetChanges. - Get changes included in a shelveset. + [Preview API] Get changes included in a shelveset. :param str shelveset_id: Shelveset's unique ID :param int top: Max number of changes to return :param int skip: Number of changes to skip @@ -664,16 +664,16 @@ def get_shelveset_changes(self, shelveset_id, top=None, skip=None): query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') response = self._send(http_method='GET', location_id='dbaf075b-0445-4c34-9e5b-82292f856522', - version='7.0', + version='7.2-preview.1', query_parameters=query_parameters) return self._deserialize('[TfvcChange]', self._unwrap_collection(response)) def get_shelveset(self, shelveset_id, request_data=None): """GetShelveset. - Get a single deep shelveset. + [Preview API] Get a single deep shelveset. :param str shelveset_id: Shelveset's unique ID - :param :class:` ` request_data: includeDetails, includeWorkItems, maxChangeCount, and maxCommentLength - :rtype: :class:` ` + :param :class:` ` request_data: includeDetails, includeWorkItems, maxChangeCount, and maxCommentLength + :rtype: :class:` ` """ query_parameters = {} if shelveset_id is not None: @@ -695,14 +695,14 @@ def get_shelveset(self, shelveset_id, request_data=None): query_parameters['requestData.includeLinks'] = request_data.include_links response = self._send(http_method='GET', location_id='e36d44fb-e907-4b0a-b194-f83f1ed32ad3', - version='7.0', + version='7.2-preview.1', query_parameters=query_parameters) return self._deserialize('TfvcShelveset', response) def get_shelvesets(self, request_data=None, top=None, skip=None): """GetShelvesets. - Return a collection of shallow shelveset references. - :param :class:` ` request_data: name, owner, and maxCommentLength + [Preview API] Return a collection of shallow shelveset references. + :param :class:` ` request_data: name, owner, and maxCommentLength :param int top: Max number of shelvesets to return :param int skip: Number of shelvesets to skip :rtype: [TfvcShelvesetRef] @@ -729,13 +729,13 @@ def get_shelvesets(self, request_data=None, top=None, skip=None): query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') response = self._send(http_method='GET', location_id='e36d44fb-e907-4b0a-b194-f83f1ed32ad3', - version='7.0', + version='7.2-preview.1', query_parameters=query_parameters) return self._deserialize('[TfvcShelvesetRef]', self._unwrap_collection(response)) def get_shelveset_work_items(self, shelveset_id): """GetShelvesetWorkItems. - Get work items associated with a shelveset. + [Preview API] Get work items associated with a shelveset. :param str shelveset_id: Shelveset's unique ID :rtype: [AssociatedWorkItem] """ @@ -744,7 +744,7 @@ def get_shelveset_work_items(self, shelveset_id): query_parameters['shelvesetId'] = self._serialize.query('shelveset_id', shelveset_id, 'str') response = self._send(http_method='GET', location_id='a7a0c1c1-373e-425a-b031-a519474d743d', - version='7.0', + version='7.2-preview.1', query_parameters=query_parameters) return self._deserialize('[AssociatedWorkItem]', self._unwrap_collection(response)) diff --git a/azure-devops/azure/devops/v7_0/token_admin/__init__.py b/azure-devops/azure/devops/v7_2/token_admin/__init__.py similarity index 100% rename from azure-devops/azure/devops/v7_0/token_admin/__init__.py rename to azure-devops/azure/devops/v7_2/token_admin/__init__.py diff --git a/azure-devops/azure/devops/v7_0/token_admin/models.py b/azure-devops/azure/devops/v7_2/token_admin/models.py similarity index 98% rename from azure-devops/azure/devops/v7_0/token_admin/models.py rename to azure-devops/azure/devops/v7_2/token_admin/models.py index 0b081584..ee7eeea5 100644 --- a/azure-devops/azure/devops/v7_0/token_admin/models.py +++ b/azure-devops/azure/devops/v7_2/token_admin/models.py @@ -95,7 +95,7 @@ class SessionTokenResult(Model): :param has_error: :type has_error: bool :param session_token: - :type session_token: :class:`SessionToken ` + :type session_token: :class:`SessionToken ` :param session_token_error: :type session_token_error: object """ @@ -120,7 +120,7 @@ class TokenAdminPagedSessionTokens(Model): :param continuation_token: The continuation token that can be used to retrieve the next page of session tokens, or null if there is no next page. :type continuation_token: str :param value: The list of all session tokens in the current page. - :type value: list of :class:`SessionToken ` + :type value: list of :class:`SessionToken ` """ _attribute_map = { diff --git a/azure-devops/azure/devops/v7_0/token_admin/token_admin_client.py b/azure-devops/azure/devops/v7_2/token_admin/token_admin_client.py similarity index 86% rename from azure-devops/azure/devops/v7_0/token_admin/token_admin_client.py rename to azure-devops/azure/devops/v7_2/token_admin/token_admin_client.py index 40ec43b5..949dee1b 100644 --- a/azure-devops/azure/devops/v7_0/token_admin/token_admin_client.py +++ b/azure-devops/azure/devops/v7_2/token_admin/token_admin_client.py @@ -27,12 +27,12 @@ def __init__(self, base_url=None, creds=None): def list_personal_access_tokens(self, subject_descriptor, page_size=None, continuation_token=None, is_public=None): """ListPersonalAccessTokens. - Lists of all the session token details of the personal access tokens (PATs) for a particular user. - :param :class:` ` subject_descriptor: The descriptor of the target user. + [Preview API] Lists of all the session token details of the personal access tokens (PATs) for a particular user. + :param :class:` ` subject_descriptor: The descriptor of the target user. :param int page_size: The maximum number of results to return on each page. :param str continuation_token: An opaque data blob that allows the next page of data to resume immediately after where the previous page ended. The only reliable way to know if there is more data left is the presence of a continuation token. :param bool is_public: Set to false for PAT tokens and true for SSH tokens. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if subject_descriptor is not None: @@ -46,25 +46,25 @@ def list_personal_access_tokens(self, subject_descriptor, page_size=None, contin query_parameters['isPublic'] = self._serialize.query('is_public', is_public, 'bool') response = self._send(http_method='GET', location_id='af68438b-ed04-4407-9eb6-f1dbae3f922e', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('TokenAdminPagedSessionTokens', response) def create_revocation_rule(self, revocation_rule): """CreateRevocationRule. - Creates a revocation rule to prevent the further usage of any OAuth authorizations that were created before the current point in time and which match the conditions in the rule. - :param :class:` ` revocation_rule: The revocation rule to create. The rule must specify a space-separated list of scopes, after which preexisting OAuth authorizations that match that any of the scopes will be rejected. For a list of all OAuth scopes supported by VSTS, see: https://docs.microsoft.com/en-us/vsts/integrate/get-started/authentication/oauth?view=vsts#scopes The rule may also specify the time before which to revoke tokens. + [Preview API] Creates a revocation rule to prevent the further usage of any OAuth authorizations that were created before the current point in time and which match the conditions in the rule. + :param :class:` ` revocation_rule: The revocation rule to create. The rule must specify a space-separated list of scopes, after which preexisting OAuth authorizations that match that any of the scopes will be rejected. For a list of all OAuth scopes supported by VSTS, see: https://docs.microsoft.com/en-us/vsts/integrate/get-started/authentication/oauth?view=vsts#scopes The rule may also specify the time before which to revoke tokens. """ content = self._serialize.body(revocation_rule, 'TokenAdminRevocationRule') self._send(http_method='POST', location_id='ee4afb16-e7ab-4ed8-9d4b-4ef3e78f97e4', - version='7.0', + version='7.2-preview.1', content=content) def revoke_authorizations(self, revocations, is_public=None): """RevokeAuthorizations. - Revokes the listed OAuth authorizations. + [Preview API] Revokes the listed OAuth authorizations. :param [TokenAdminRevocation] revocations: The list of objects containing the authorization IDs of the OAuth authorizations, such as session tokens retrieved by listed a users PATs, that should be revoked. :param bool is_public: Set to false for PAT tokens and true for SSH tokens. """ @@ -74,7 +74,7 @@ def revoke_authorizations(self, revocations, is_public=None): content = self._serialize.body(revocations, '[TokenAdminRevocation]') self._send(http_method='POST', location_id='a9c08b2c-5466-4e22-8626-1ff304ffdf0f', - version='7.0', + version='7.2-preview.1', query_parameters=query_parameters, content=content) diff --git a/azure-devops/azure/devops/v7_0/upack_api/__init__.py b/azure-devops/azure/devops/v7_2/upack_api/__init__.py similarity index 100% rename from azure-devops/azure/devops/v7_0/upack_api/__init__.py rename to azure-devops/azure/devops/v7_2/upack_api/__init__.py diff --git a/azure-devops/azure/devops/v7_0/upack_api/models.py b/azure-devops/azure/devops/v7_2/upack_api/models.py similarity index 96% rename from azure-devops/azure/devops/v7_0/upack_api/models.py rename to azure-devops/azure/devops/v7_2/upack_api/models.py index 4fa9c504..2e7af6e8 100644 --- a/azure-devops/azure/devops/v7_0/upack_api/models.py +++ b/azure-devops/azure/devops/v7_2/upack_api/models.py @@ -77,7 +77,7 @@ class Package(Model): Package version metadata for a Universal package :param _links: Related REST links. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param deleted_date: If and when the package was deleted. :type deleted_date: datetime :param id: Package Id. @@ -112,7 +112,7 @@ def __init__(self, _links=None, deleted_date=None, id=None, name=None, permanent class PackageVersionDetails(Model): """ :param views: The view to which the package version will be added - :type views: :class:`JsonPatchOperation ` + :type views: :class:`JsonPatchOperation ` """ _attribute_map = { @@ -146,11 +146,11 @@ class UPackPackagesBatchRequest(Model): A batch of operations to apply to package versions. :param data: Data required to perform the operation. This is optional based on the type of the operation. Use BatchPromoteData if performing a promote operation. - :type data: :class:`BatchOperationData ` + :type data: :class:`BatchOperationData ` :param operation: Type of operation that needs to be performed on packages. :type operation: object :param packages: The packages onto which the operation will be performed. - :type packages: list of :class:`MinimalPackageDetails ` + :type packages: list of :class:`MinimalPackageDetails ` """ _attribute_map = { diff --git a/azure-devops/azure/devops/v7_0/upack_api/upack_api_client.py b/azure-devops/azure/devops/v7_2/upack_api/upack_api_client.py similarity index 93% rename from azure-devops/azure/devops/v7_0/upack_api/upack_api_client.py rename to azure-devops/azure/devops/v7_2/upack_api/upack_api_client.py index 43bd0f4a..55cfc11e 100644 --- a/azure-devops/azure/devops/v7_0/upack_api/upack_api_client.py +++ b/azure-devops/azure/devops/v7_2/upack_api/upack_api_client.py @@ -28,7 +28,7 @@ def __init__(self, base_url=None, creds=None): def update_package_versions(self, batch_request, feed_id, project=None): """UpdatePackageVersions. [Preview API] Update several packages from a single feed in a single request. The updates to the packages do not happen atomically. - :param :class:` ` batch_request: Information about the packages to update, the operation to perform, and its associated data. + :param :class:` ` batch_request: Information about the packages to update, the operation to perform, and its associated data. :param str feed_id: Name or ID of the feed. :param str project: Project ID or project name """ @@ -40,14 +40,14 @@ def update_package_versions(self, batch_request, feed_id, project=None): content = self._serialize.body(batch_request, 'UPackPackagesBatchRequest') self._send(http_method='POST', location_id='c17e81ae-4caa-4d8b-a431-6b329e890281', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, content=content) def update_recycle_bin_package_versions(self, batch_request, feed_id, project=None): """UpdateRecycleBinPackageVersions. [Preview API] Delete or restore several package versions from the recycle bin. - :param :class:` ` batch_request: Information about the packages to update, the operation to perform, and its associated data. Operation must be PermanentDelete or RestoreToFeed + :param :class:` ` batch_request: Information about the packages to update, the operation to perform, and its associated data. Operation must be PermanentDelete or RestoreToFeed :param str feed_id: Feed which contains the packages to update. :param str project: Project ID or project name """ @@ -59,7 +59,7 @@ def update_recycle_bin_package_versions(self, batch_request, feed_id, project=No content = self._serialize.body(batch_request, 'UPackPackagesBatchRequest') self._send(http_method='POST', location_id='12f73313-0937-4114-bb9f-4e9e720fdc78', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, content=content) @@ -82,7 +82,7 @@ def delete_package_version_from_recycle_bin(self, feed_id, package_name, package route_values['packageVersion'] = self._serialize.url('package_version', package_version, 'str') self._send(http_method='DELETE', location_id='3ba455ae-31e6-409e-849f-56c66888d004', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) def get_package_version_metadata_from_recycle_bin(self, feed_id, package_name, package_version, project=None): @@ -92,7 +92,7 @@ def get_package_version_metadata_from_recycle_bin(self, feed_id, package_name, p :param str package_name: Name of the package. :param str package_version: Version of the package. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -105,14 +105,14 @@ def get_package_version_metadata_from_recycle_bin(self, feed_id, package_name, p route_values['packageVersion'] = self._serialize.url('package_version', package_version, 'str') response = self._send(http_method='GET', location_id='3ba455ae-31e6-409e-849f-56c66888d004', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) return self._deserialize('UPackPackageVersionDeletionState', response) def restore_package_version_from_recycle_bin(self, package_version_details, feed_id, package_name, package_version, project=None): """RestorePackageVersionFromRecycleBin. [Preview API] Restore a package version from the recycle bin to its associated feed. - :param :class:` ` package_version_details: Set the 'Deleted' property to 'false' to restore the package. + :param :class:` ` package_version_details: Set the 'Deleted' property to 'false' to restore the package. :param str feed_id: Name or ID of the feed. :param str package_name: Name of the package. :param str package_version: Version of the package. @@ -130,7 +130,7 @@ def restore_package_version_from_recycle_bin(self, package_version_details, feed content = self._serialize.body(package_version_details, 'UPackRecycleBinPackageVersionDetails') self._send(http_method='PATCH', location_id='3ba455ae-31e6-409e-849f-56c66888d004', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, content=content) @@ -141,7 +141,7 @@ def delete_package_version(self, feed_id, package_name, package_version, project :param str package_name: Name of the package. :param str package_version: Version of the package. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -154,7 +154,7 @@ def delete_package_version(self, feed_id, package_name, package_version, project route_values['packageVersion'] = self._serialize.url('package_version', package_version, 'str') response = self._send(http_method='DELETE', location_id='72f61ca4-e07c-4eca-be75-6c0b2f3f4051', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) return self._deserialize('Package', response) @@ -166,7 +166,7 @@ def get_package_version(self, feed_id, package_name, package_version, project=No :param str package_version: Version of the package. :param str project: Project ID or project name :param bool show_deleted: True to show information for deleted versions - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -182,7 +182,7 @@ def get_package_version(self, feed_id, package_name, package_version, project=No query_parameters['showDeleted'] = self._serialize.query('show_deleted', show_deleted, 'bool') response = self._send(http_method='GET', location_id='72f61ca4-e07c-4eca-be75-6c0b2f3f4051', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('Package', response) @@ -190,7 +190,7 @@ def get_package_version(self, feed_id, package_name, package_version, project=No def update_package_version(self, package_version_details, feed_id, package_name, package_version, project=None): """UpdatePackageVersion. [Preview API] Update information for a package version. - :param :class:` ` package_version_details: + :param :class:` ` package_version_details: :param str feed_id: Name or ID of the feed. :param str package_name: Name of the package. :param str package_version: Version of the package. @@ -208,7 +208,7 @@ def update_package_version(self, package_version_details, feed_id, package_name, content = self._serialize.body(package_version_details, 'PackageVersionDetails') self._send(http_method='PATCH', location_id='72f61ca4-e07c-4eca-be75-6c0b2f3f4051', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, content=content) diff --git a/azure-devops/azure/devops/v7_0/upack_packaging/__init__.py b/azure-devops/azure/devops/v7_2/upack_packaging/__init__.py similarity index 100% rename from azure-devops/azure/devops/v7_0/upack_packaging/__init__.py rename to azure-devops/azure/devops/v7_2/upack_packaging/__init__.py diff --git a/azure-devops/azure/devops/v7_0/upack_packaging/models.py b/azure-devops/azure/devops/v7_2/upack_packaging/models.py similarity index 98% rename from azure-devops/azure/devops/v7_0/upack_packaging/models.py rename to azure-devops/azure/devops/v7_2/upack_packaging/models.py index fd448fd6..383bfb3b 100644 --- a/azure-devops/azure/devops/v7_0/upack_packaging/models.py +++ b/azure-devops/azure/devops/v7_2/upack_packaging/models.py @@ -33,7 +33,7 @@ class UPackLimitedPackageMetadataListResponse(Model): :param count: :type count: int :param value: - :type value: list of :class:`UPackLimitedPackageMetadata ` + :type value: list of :class:`UPackLimitedPackageMetadata ` """ _attribute_map = { diff --git a/azure-devops/azure/devops/v7_0/upack_packaging/upack_packaging_client.py b/azure-devops/azure/devops/v7_2/upack_packaging/upack_packaging_client.py similarity index 93% rename from azure-devops/azure/devops/v7_0/upack_packaging/upack_packaging_client.py rename to azure-devops/azure/devops/v7_2/upack_packaging/upack_packaging_client.py index 6c8fa426..5c2c0b57 100644 --- a/azure-devops/azure/devops/v7_0/upack_packaging/upack_packaging_client.py +++ b/azure-devops/azure/devops/v7_2/upack_packaging/upack_packaging_client.py @@ -28,7 +28,7 @@ def __init__(self, base_url=None, creds=None): def add_package(self, metadata, feed_id, package_name, package_version, project=None): """AddPackage. [Preview API] - :param :class:` ` metadata: + :param :class:` ` metadata: :param str feed_id: :param str package_name: :param str package_version: @@ -46,7 +46,7 @@ def add_package(self, metadata, feed_id, package_name, package_version, project= content = self._serialize.body(metadata, 'UPackPackagePushMetadata') self._send(http_method='PUT', location_id='4cdb2ced-0758-4651-8032-010f070dd7e5', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, content=content) @@ -58,7 +58,7 @@ def get_package_metadata(self, feed_id, package_name, package_version, project=N :param str package_version: :param str project: Project ID or project name :param str intent: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -74,7 +74,7 @@ def get_package_metadata(self, feed_id, package_name, package_version, project=N query_parameters['intent'] = self._serialize.query('intent', intent, 'str') response = self._send(http_method='GET', location_id='4cdb2ced-0758-4651-8032-010f070dd7e5', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('UPackPackageMetadata', response) @@ -85,7 +85,7 @@ def get_package_versions_metadata(self, feed_id, package_name, project=None): :param str feed_id: :param str package_name: :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -96,7 +96,7 @@ def get_package_versions_metadata(self, feed_id, package_name, project=None): route_values['packageName'] = self._serialize.url('package_name', package_name, 'str') response = self._send(http_method='GET', location_id='4cdb2ced-0758-4651-8032-010f070dd7e5', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) return self._deserialize('UPackLimitedPackageMetadataListResponse', response) diff --git a/azure-devops/azure/devops/v7_0/wiki/__init__.py b/azure-devops/azure/devops/v7_2/wiki/__init__.py similarity index 100% rename from azure-devops/azure/devops/v7_0/wiki/__init__.py rename to azure-devops/azure/devops/v7_2/wiki/__init__.py diff --git a/azure-devops/azure/devops/v7_0/wiki/models.py b/azure-devops/azure/devops/v7_2/wiki/models.py similarity index 94% rename from azure-devops/azure/devops/v7_0/wiki/models.py rename to azure-devops/azure/devops/v7_2/wiki/models.py index 02dc62ca..a618f044 100644 --- a/azure-devops/azure/devops/v7_0/wiki/models.py +++ b/azure-devops/azure/devops/v7_2/wiki/models.py @@ -15,7 +15,7 @@ class CommentCreateParameters(Model): :param parent_id: Optional CommentId of the parent in order to add a reply for an existing comment :type parent_id: int - :param text: + :param text: Text of the comment :type text: str """ @@ -34,7 +34,7 @@ class CommentResourceReference(Model): """ Base class for comment resource references - :param url: + :param url: REST URL for the resource. :type url: str """ @@ -71,7 +71,7 @@ def __init__(self, state=None, text=None): class GitRepository(Model): """ :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param default_branch: :type default_branch: str :param id: @@ -80,12 +80,14 @@ class GitRepository(Model): :type is_disabled: bool :param is_fork: True if the repository was created as a fork. :type is_fork: bool + :param is_in_maintenance: True if the repository is in maintenance. False otherwise. + :type is_in_maintenance: bool :param name: :type name: str :param parent_repository: - :type parent_repository: :class:`GitRepositoryRef ` + :type parent_repository: :class:`GitRepositoryRef ` :param project: - :type project: :class:`TeamProjectReference ` + :type project: :class:`TeamProjectReference ` :param remote_url: :type remote_url: str :param size: Compressed size (bytes) of the repository. @@ -106,6 +108,7 @@ class GitRepository(Model): 'id': {'key': 'id', 'type': 'str'}, 'is_disabled': {'key': 'isDisabled', 'type': 'bool'}, 'is_fork': {'key': 'isFork', 'type': 'bool'}, + 'is_in_maintenance': {'key': 'isInMaintenance', 'type': 'bool'}, 'name': {'key': 'name', 'type': 'str'}, 'parent_repository': {'key': 'parentRepository', 'type': 'GitRepositoryRef'}, 'project': {'key': 'project', 'type': 'TeamProjectReference'}, @@ -117,13 +120,14 @@ class GitRepository(Model): 'web_url': {'key': 'webUrl', 'type': 'str'} } - def __init__(self, _links=None, default_branch=None, id=None, is_disabled=None, is_fork=None, name=None, parent_repository=None, project=None, remote_url=None, size=None, ssh_url=None, url=None, valid_remote_urls=None, web_url=None): + def __init__(self, _links=None, default_branch=None, id=None, is_disabled=None, is_fork=None, is_in_maintenance=None, name=None, parent_repository=None, project=None, remote_url=None, size=None, ssh_url=None, url=None, valid_remote_urls=None, web_url=None): super(GitRepository, self).__init__() self._links = _links self.default_branch = default_branch self.id = id self.is_disabled = is_disabled self.is_fork = is_fork + self.is_in_maintenance = is_in_maintenance self.name = name self.parent_repository = parent_repository self.project = project @@ -138,7 +142,7 @@ def __init__(self, _links=None, default_branch=None, id=None, is_disabled=None, class GitRepositoryRef(Model): """ :param collection: Team Project Collection where this Fork resides - :type collection: :class:`TeamProjectCollectionReference ` + :type collection: :class:`TeamProjectCollectionReference ` :param id: :type id: str :param is_fork: True if the repository was created as a fork @@ -146,7 +150,7 @@ class GitRepositoryRef(Model): :param name: :type name: str :param project: - :type project: :class:`TeamProjectReference ` + :type project: :class:`TeamProjectReference ` :param remote_url: :type remote_url: str :param ssh_url: @@ -204,7 +208,7 @@ def __init__(self, version=None, version_options=None, version_type=None): class GraphSubjectBase(Model): """ :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. :type descriptor: str :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. @@ -231,7 +235,7 @@ def __init__(self, _links=None, descriptor=None, display_name=None, url=None): class IdentityRef(GraphSubjectBase): """ :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. :type descriptor: str :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. @@ -306,6 +310,8 @@ def __init__(self, links=None): class TeamProjectCollectionReference(Model): """ + :param avatar_url: + :type avatar_url: str :param id: :type id: str :param name: @@ -315,13 +321,15 @@ class TeamProjectCollectionReference(Model): """ _attribute_map = { + 'avatar_url': {'key': 'avatarUrl', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'url': {'key': 'url', 'type': 'str'} } - def __init__(self, id=None, name=None, url=None): + def __init__(self, avatar_url=None, id=None, name=None, url=None): super(TeamProjectCollectionReference, self).__init__() + self.avatar_url = avatar_url self.id = id self.name = name self.url = url @@ -404,7 +412,7 @@ class WikiAttachmentResponse(Model): Response contract for the Wiki Attachments API :param attachment: Defines properties for wiki attachment file. - :type attachment: :class:`WikiAttachment ` + :type attachment: :class:`WikiAttachment ` :param eTag: Contains the list of ETag values from the response header of the attachments API call. The first item in the list contains the version of the wiki attachment. :type eTag: list of str """ @@ -468,7 +476,7 @@ class WikiCreateParametersV2(WikiCreateBaseParameters): :param type: Type of the wiki. :type type: object :param version: Version of the wiki. Not required for ProjectWiki type. - :type version: :class:`GitVersionDescriptor ` + :type version: :class:`GitVersionDescriptor ` """ _attribute_map = { @@ -511,7 +519,7 @@ class WikiPageDetail(Model): :param path: Path of the wiki page. :type path: str :param view_stats: Path of the wiki page. - :type view_stats: list of :class:`WikiPageStat ` + :type view_stats: list of :class:`WikiPageStat ` """ _attribute_map = { @@ -559,7 +567,7 @@ class WikiPageMoveResponse(Model): :param eTag: Contains the list of ETag values from the response header of the page move API call. The first item in the list contains the version of the wiki page subject to page move. :type eTag: list of str :param page_move: Defines properties for wiki page move. - :type page_move: :class:`WikiPageMove ` + :type page_move: :class:`WikiPageMove ` """ _attribute_map = { @@ -580,7 +588,7 @@ class WikiPageResponse(Model): :param eTag: Contains the list of ETag values from the response header of the pages API call. The first item in the list contains the version of the wiki page. :type eTag: list of str :param page: Defines properties for wiki page. - :type page: :class:`WikiPage ` + :type page: :class:`WikiPage ` """ _attribute_map = { @@ -672,7 +680,7 @@ class WikiUpdateParameters(Model): :param name: Name for wiki. :type name: str :param versions: Versions of the wiki. - :type versions: list of :class:`GitVersionDescriptor ` + :type versions: list of :class:`GitVersionDescriptor ` """ _attribute_map = { @@ -711,7 +719,7 @@ class WikiV2(WikiCreateBaseParameters): :param url: REST url for this wiki. :type url: str :param versions: Versions of the wiki. - :type versions: list of :class:`GitVersionDescriptor ` + :type versions: list of :class:`GitVersionDescriptor ` """ _attribute_map = { @@ -742,12 +750,12 @@ class Comment(CommentResourceReference): """ Comment on an artifact like Work Item or Wiki, etc. - :param url: + :param url: REST URL for the resource. :type url: str :param artifact_id: The id of the artifact this comment belongs to :type artifact_id: str :param created_by: IdentityRef of the creator of the comment. - :type created_by: :class:`IdentityRef ` + :type created_by: :class:`IdentityRef ` :param created_date: The creation date of the comment. :type created_date: datetime :param id: The id assigned to the comment. @@ -755,19 +763,19 @@ class Comment(CommentResourceReference): :param is_deleted: Indicates if the comment has been deleted. :type is_deleted: bool :param mentions: The mentions of the comment. - :type mentions: list of :class:`CommentMention ` + :type mentions: list of :class:`CommentMention ` :param modified_by: IdentityRef of the user who last modified the comment. - :type modified_by: :class:`IdentityRef ` + :type modified_by: :class:`IdentityRef ` :param modified_date: The last modification date of the comment. :type modified_date: datetime :param parent_id: The comment id of the parent comment, if any :type parent_id: int :param reactions: The reactions on the comment. - :type reactions: list of :class:`CommentReaction ` + :type reactions: list of :class:`CommentReaction ` :param rendered_text: The rendered text of the comment :type rendered_text: str :param replies: Replies for this comment - :type replies: :class:`CommentList ` + :type replies: :class:`CommentList ` :param state: Indicates the current state of the comment :type state: object :param text: The plaintext/markdown version of the comment @@ -818,10 +826,10 @@ class CommentAttachment(CommentResourceReference): """ Represents an attachment to a comment. - :param url: + :param url: REST URL for the resource. :type url: str :param created_by: IdentityRef of the creator of the attachment. - :type created_by: :class:`IdentityRef ` + :type created_by: :class:`IdentityRef ` :param created_date: The creation date of the attachment. :type created_date: datetime :param id: Unique Id of the attachment. @@ -846,10 +854,10 @@ class CommentList(CommentResourceReference): """ Represents a list of comments. - :param url: + :param url: REST URL for the resource. :type url: str :param comments: List of comments in the current batch. - :type comments: list of :class:`Comment ` + :type comments: list of :class:`Comment ` :param continuation_token: A string token that can be used to retrieving next page of comments if available. Otherwise null. :type continuation_token: str :param count: The count of comments in the current batch. @@ -882,7 +890,7 @@ class CommentMention(CommentResourceReference): """ Contains information about various artifacts mentioned in the comment - :param url: + :param url: REST URL for the resource. :type url: str :param artifact_id: Id of the artifact this mention belongs to :type artifact_id: str @@ -914,7 +922,7 @@ class CommentReaction(CommentResourceReference): """ Contains information about comment reaction for a particular reaction type. - :param url: + :param url: REST URL for the resource. :type url: str :param comment_id: The id of the comment this reaction belongs to. :type comment_id: int @@ -963,7 +971,7 @@ class WikiPage(WikiPageCreateOrUpdateParameters): :param remote_url: Remote web url to the wiki page. :type remote_url: str :param sub_pages: List of subpages of the current page. - :type sub_pages: list of :class:`WikiPage ` + :type sub_pages: list of :class:`WikiPage ` :param url: REST url for this wiki page. :type url: str """ @@ -1005,7 +1013,7 @@ class WikiPageMove(WikiPageMoveParameters): :param path: Current path of the wiki page. :type path: str :param page: Resultant page of this page move operation. - :type page: :class:`WikiPage ` + :type page: :class:`WikiPage ` """ _attribute_map = { diff --git a/azure-devops/azure/devops/v7_0/wiki/wiki_client.py b/azure-devops/azure/devops/v7_2/wiki/wiki_client.py similarity index 87% rename from azure-devops/azure/devops/v7_0/wiki/wiki_client.py rename to azure-devops/azure/devops/v7_2/wiki/wiki_client.py index 5899095c..a4c3aabd 100644 --- a/azure-devops/azure/devops/v7_0/wiki/wiki_client.py +++ b/azure-devops/azure/devops/v7_2/wiki/wiki_client.py @@ -27,13 +27,13 @@ def __init__(self, base_url=None, creds=None): def create_attachment(self, upload_stream, project, wiki_identifier, name, version_descriptor=None, **kwargs): """CreateAttachment. - Creates an attachment in the wiki. + [Preview API] Creates an attachment in the wiki. :param object upload_stream: Stream to upload :param str project: Project ID or project name :param str wiki_identifier: Wiki ID or wiki name. :param str name: Wiki attachment name. - :param :class:` ` version_descriptor: GitVersionDescriptor for the page. (Optional in case of ProjectWiki). - :rtype: :class:` ` + :param :class:` ` version_descriptor: GitVersionDescriptor for the page. (Optional in case of ProjectWiki). + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -57,7 +57,7 @@ def create_attachment(self, upload_stream, project, wiki_identifier, name, versi content = self._client.stream_upload(upload_stream, callback=callback) response = self._send(http_method='PUT', location_id='c4382d8d-fefc-40e0-92c5-49852e9e17c0', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters, content=content, @@ -69,13 +69,13 @@ def create_attachment(self, upload_stream, project, wiki_identifier, name, versi def create_page_move(self, page_move_parameters, project, wiki_identifier, comment=None, version_descriptor=None): """CreatePageMove. - Creates a page move operation that updates the path and order of the page as provided in the parameters. - :param :class:` ` page_move_parameters: Page more operation parameters. + [Preview API] Creates a page move operation that updates the path and order of the page as provided in the parameters. + :param :class:` ` page_move_parameters: Page more operation parameters. :param str project: Project ID or project name :param str wiki_identifier: Wiki ID or wiki name. :param str comment: Comment that is to be associated with this page move. - :param :class:` ` version_descriptor: GitVersionDescriptor for the page. (Optional in case of ProjectWiki). - :rtype: :class:` ` + :param :class:` ` version_descriptor: GitVersionDescriptor for the page. (Optional in case of ProjectWiki). + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -95,7 +95,7 @@ def create_page_move(self, page_move_parameters, project, wiki_identifier, comme content = self._serialize.body(page_move_parameters, 'WikiPageMoveParameters') response = self._send(http_method='POST', location_id='e37bbe71-cbae-49e5-9a4e-949143b9d910', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters, content=content) @@ -106,15 +106,15 @@ def create_page_move(self, page_move_parameters, project, wiki_identifier, comme def create_or_update_page(self, parameters, project, wiki_identifier, path, version, comment=None, version_descriptor=None): """CreateOrUpdatePage. - Creates or edits a wiki page. - :param :class:` ` parameters: Wiki create or update operation parameters. + [Preview API] Creates or edits a wiki page. + :param :class:` ` parameters: Wiki create or update operation parameters. :param str project: Project ID or project name :param str wiki_identifier: Wiki ID or wiki name. :param str path: Wiki page path. :param String version: Version of the page on which the change is to be made. Mandatory for `Edit` scenario. To be populated in the If-Match header of the request. :param str comment: Comment to be associated with the page operation. - :param :class:` ` version_descriptor: GitVersionDescriptor for the page. (Optional in case of ProjectWiki). - :rtype: :class:` ` + :param :class:` ` version_descriptor: GitVersionDescriptor for the page. (Optional in case of ProjectWiki). + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -139,7 +139,7 @@ def create_or_update_page(self, parameters, project, wiki_identifier, path, vers content = self._serialize.body(parameters, 'WikiPageCreateOrUpdateParameters') response = self._send(http_method='PUT', location_id='25d3fbc7-fe3d-46cb-b5a5-0b6f79caf27b', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters, additional_headers=additional_headers, @@ -151,13 +151,13 @@ def create_or_update_page(self, parameters, project, wiki_identifier, path, vers def delete_page(self, project, wiki_identifier, path, comment=None, version_descriptor=None): """DeletePage. - Deletes a wiki page. + [Preview API] Deletes a wiki page. :param str project: Project ID or project name :param str wiki_identifier: Wiki ID or wiki name. :param str path: Wiki page path. :param str comment: Comment to be associated with this page delete. - :param :class:` ` version_descriptor: GitVersionDescriptor for the page. (Optional in case of ProjectWiki). - :rtype: :class:` ` + :param :class:` ` version_descriptor: GitVersionDescriptor for the page. (Optional in case of ProjectWiki). + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -178,7 +178,7 @@ def delete_page(self, project, wiki_identifier, path, comment=None, version_desc query_parameters['versionDescriptor.versionOptions'] = version_descriptor.version_options response = self._send(http_method='DELETE', location_id='25d3fbc7-fe3d-46cb-b5a5-0b6f79caf27b', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) response_object = models.WikiPageResponse() @@ -188,14 +188,14 @@ def delete_page(self, project, wiki_identifier, path, comment=None, version_desc def get_page(self, project, wiki_identifier, path=None, recursion_level=None, version_descriptor=None, include_content=None): """GetPage. - Gets metadata or content of the wiki page for the provided path. Content negotiation is done based on the `Accept` header sent in the request. + [Preview API] Gets metadata or content of the wiki page for the provided path. Content negotiation is done based on the `Accept` header sent in the request. :param str project: Project ID or project name :param str wiki_identifier: Wiki ID or wiki name. :param str path: Wiki page path. :param str recursion_level: Recursion level for subpages retrieval. Defaults to `None` (Optional). - :param :class:` ` version_descriptor: GitVersionDescriptor for the page. Defaults to the default branch (Optional). + :param :class:` ` version_descriptor: GitVersionDescriptor for the page. Defaults to the default branch (Optional). :param bool include_content: True to include the content of the page in the response for Json content type. Defaults to false (Optional) - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -218,7 +218,7 @@ def get_page(self, project, wiki_identifier, path=None, recursion_level=None, ve query_parameters['includeContent'] = self._serialize.query('include_content', include_content, 'bool') response = self._send(http_method='GET', location_id='25d3fbc7-fe3d-46cb-b5a5-0b6f79caf27b', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) response_object = models.WikiPageResponse() @@ -228,12 +228,12 @@ def get_page(self, project, wiki_identifier, path=None, recursion_level=None, ve def get_page_text(self, project, wiki_identifier, path=None, recursion_level=None, version_descriptor=None, include_content=None, **kwargs): """GetPageText. - Gets metadata or content of the wiki page for the provided path. Content negotiation is done based on the `Accept` header sent in the request. + [Preview API] Gets metadata or content of the wiki page for the provided path. Content negotiation is done based on the `Accept` header sent in the request. :param str project: Project ID or project name :param str wiki_identifier: Wiki ID or wiki name. :param str path: Wiki page path. :param str recursion_level: Recursion level for subpages retrieval. Defaults to `None` (Optional). - :param :class:` ` version_descriptor: GitVersionDescriptor for the page. Defaults to the default branch (Optional). + :param :class:` ` version_descriptor: GitVersionDescriptor for the page. Defaults to the default branch (Optional). :param bool include_content: True to include the content of the page in the response for Json content type. Defaults to false (Optional) :rtype: object """ @@ -258,7 +258,7 @@ def get_page_text(self, project, wiki_identifier, path=None, recursion_level=Non query_parameters['includeContent'] = self._serialize.query('include_content', include_content, 'bool') response = self._send(http_method='GET', location_id='25d3fbc7-fe3d-46cb-b5a5-0b6f79caf27b', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters, accept_media_type='text/plain') @@ -270,12 +270,12 @@ def get_page_text(self, project, wiki_identifier, path=None, recursion_level=Non def get_page_zip(self, project, wiki_identifier, path=None, recursion_level=None, version_descriptor=None, include_content=None, **kwargs): """GetPageZip. - Gets metadata or content of the wiki page for the provided path. Content negotiation is done based on the `Accept` header sent in the request. + [Preview API] Gets metadata or content of the wiki page for the provided path. Content negotiation is done based on the `Accept` header sent in the request. :param str project: Project ID or project name :param str wiki_identifier: Wiki ID or wiki name. :param str path: Wiki page path. :param str recursion_level: Recursion level for subpages retrieval. Defaults to `None` (Optional). - :param :class:` ` version_descriptor: GitVersionDescriptor for the page. Defaults to the default branch (Optional). + :param :class:` ` version_descriptor: GitVersionDescriptor for the page. Defaults to the default branch (Optional). :param bool include_content: True to include the content of the page in the response for Json content type. Defaults to false (Optional) :rtype: object """ @@ -300,7 +300,7 @@ def get_page_zip(self, project, wiki_identifier, path=None, recursion_level=None query_parameters['includeContent'] = self._serialize.query('include_content', include_content, 'bool') response = self._send(http_method='GET', location_id='25d3fbc7-fe3d-46cb-b5a5-0b6f79caf27b', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters, accept_media_type='application/zip') @@ -312,12 +312,12 @@ def get_page_zip(self, project, wiki_identifier, path=None, recursion_level=None def delete_page_by_id(self, project, wiki_identifier, id, comment=None): """DeletePageById. - Deletes a wiki page. + [Preview API] Deletes a wiki page. :param str project: Project ID or project name :param str wiki_identifier: Wiki ID or wiki name. :param int id: Wiki page ID. :param str comment: Comment to be associated with this page delete. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -331,7 +331,7 @@ def delete_page_by_id(self, project, wiki_identifier, id, comment=None): query_parameters['comment'] = self._serialize.query('comment', comment, 'str') response = self._send(http_method='DELETE', location_id='ceddcf75-1068-452d-8b13-2d4d76e1f970', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) response_object = models.WikiPageResponse() @@ -341,13 +341,13 @@ def delete_page_by_id(self, project, wiki_identifier, id, comment=None): def get_page_by_id(self, project, wiki_identifier, id, recursion_level=None, include_content=None): """GetPageById. - Gets metadata or content of the wiki page for the provided page id. Content negotiation is done based on the `Accept` header sent in the request. + [Preview API] Gets metadata or content of the wiki page for the provided page id. Content negotiation is done based on the `Accept` header sent in the request. :param str project: Project ID or project name :param str wiki_identifier: Wiki ID or wiki name.. :param int id: Wiki page ID. :param str recursion_level: Recursion level for subpages retrieval. Defaults to `None` (Optional). :param bool include_content: True to include the content of the page in the response for Json content type. Defaults to false (Optional) - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -363,7 +363,7 @@ def get_page_by_id(self, project, wiki_identifier, id, recursion_level=None, inc query_parameters['includeContent'] = self._serialize.query('include_content', include_content, 'bool') response = self._send(http_method='GET', location_id='ceddcf75-1068-452d-8b13-2d4d76e1f970', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) response_object = models.WikiPageResponse() @@ -373,7 +373,7 @@ def get_page_by_id(self, project, wiki_identifier, id, recursion_level=None, inc def get_page_by_id_text(self, project, wiki_identifier, id, recursion_level=None, include_content=None, **kwargs): """GetPageByIdText. - Gets metadata or content of the wiki page for the provided page id. Content negotiation is done based on the `Accept` header sent in the request. + [Preview API] Gets metadata or content of the wiki page for the provided page id. Content negotiation is done based on the `Accept` header sent in the request. :param str project: Project ID or project name :param str wiki_identifier: Wiki ID or wiki name.. :param int id: Wiki page ID. @@ -395,7 +395,7 @@ def get_page_by_id_text(self, project, wiki_identifier, id, recursion_level=None query_parameters['includeContent'] = self._serialize.query('include_content', include_content, 'bool') response = self._send(http_method='GET', location_id='ceddcf75-1068-452d-8b13-2d4d76e1f970', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters, accept_media_type='text/plain') @@ -407,7 +407,7 @@ def get_page_by_id_text(self, project, wiki_identifier, id, recursion_level=None def get_page_by_id_zip(self, project, wiki_identifier, id, recursion_level=None, include_content=None, **kwargs): """GetPageByIdZip. - Gets metadata or content of the wiki page for the provided page id. Content negotiation is done based on the `Accept` header sent in the request. + [Preview API] Gets metadata or content of the wiki page for the provided page id. Content negotiation is done based on the `Accept` header sent in the request. :param str project: Project ID or project name :param str wiki_identifier: Wiki ID or wiki name.. :param int id: Wiki page ID. @@ -429,7 +429,7 @@ def get_page_by_id_zip(self, project, wiki_identifier, id, recursion_level=None, query_parameters['includeContent'] = self._serialize.query('include_content', include_content, 'bool') response = self._send(http_method='GET', location_id='ceddcf75-1068-452d-8b13-2d4d76e1f970', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters, accept_media_type='application/zip') @@ -441,14 +441,14 @@ def get_page_by_id_zip(self, project, wiki_identifier, id, recursion_level=None, def update_page_by_id(self, parameters, project, wiki_identifier, id, version, comment=None): """UpdatePageById. - Edits a wiki page. - :param :class:` ` parameters: Wiki update operation parameters. + [Preview API] Edits a wiki page. + :param :class:` ` parameters: Wiki update operation parameters. :param str project: Project ID or project name :param str wiki_identifier: Wiki ID or wiki name. :param int id: Wiki page ID. :param String version: Version of the page on which the change is to be made. Mandatory for `Edit` scenario. To be populated in the If-Match header of the request. :param str comment: Comment to be associated with the page operation. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -466,7 +466,7 @@ def update_page_by_id(self, parameters, project, wiki_identifier, id, version, c content = self._serialize.body(parameters, 'WikiPageCreateOrUpdateParameters') response = self._send(http_method='PATCH', location_id='ceddcf75-1068-452d-8b13-2d4d76e1f970', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters, additional_headers=additional_headers, @@ -478,12 +478,12 @@ def update_page_by_id(self, parameters, project, wiki_identifier, id, version, c def get_pages_batch(self, pages_batch_request, project, wiki_identifier, version_descriptor=None): """GetPagesBatch. - Returns pageable list of Wiki Pages - :param :class:` ` pages_batch_request: Wiki batch page request. + [Preview API] Returns pageable list of Wiki Pages + :param :class:` ` pages_batch_request: Wiki batch page request. :param str project: Project ID or project name :param str wiki_identifier: Wiki ID or wiki name. - :param :class:` ` version_descriptor: GitVersionDescriptor for the page. (Optional in case of ProjectWiki). - :rtype: :class:`<[WikiPageDetail]> ` + :param :class:` ` version_descriptor: GitVersionDescriptor for the page. (Optional in case of ProjectWiki). + :rtype: :class:`<[WikiPageDetail]> ` """ route_values = {} if project is not None: @@ -501,7 +501,7 @@ def get_pages_batch(self, pages_batch_request, project, wiki_identifier, version content = self._serialize.body(pages_batch_request, 'WikiPagesBatchRequest') response = self._send(http_method='POST', location_id='71323c46-2592-4398-8771-ced73dd87207', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters, content=content) @@ -509,12 +509,12 @@ def get_pages_batch(self, pages_batch_request, project, wiki_identifier, version def get_page_data(self, project, wiki_identifier, page_id, page_views_for_days=None): """GetPageData. - Returns page detail corresponding to Page ID. + [Preview API] Returns page detail corresponding to Page ID. :param str project: Project ID or project name :param str wiki_identifier: Wiki ID or wiki name. :param int page_id: Wiki page ID. :param int page_views_for_days: last N days from the current day for which page views is to be returned. It's inclusive of current day. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -528,17 +528,17 @@ def get_page_data(self, project, wiki_identifier, page_id, page_views_for_days=N query_parameters['pageViewsForDays'] = self._serialize.query('page_views_for_days', page_views_for_days, 'int') response = self._send(http_method='GET', location_id='81c4e0fe-7663-4d62-ad46-6ab78459f274', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('WikiPageDetail', response) def create_wiki(self, wiki_create_params, project=None): """CreateWiki. - Creates the wiki resource. - :param :class:` ` wiki_create_params: Parameters for the wiki creation. + [Preview API] Creates the wiki resource. + :param :class:` ` wiki_create_params: Parameters for the wiki creation. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -546,17 +546,17 @@ def create_wiki(self, wiki_create_params, project=None): content = self._serialize.body(wiki_create_params, 'WikiCreateParametersV2') response = self._send(http_method='POST', location_id='288d122c-dbd4-451d-aa5f-7dbbba070728', - version='7.0', + version='7.2-preview.2', route_values=route_values, content=content) return self._deserialize('WikiV2', response) def delete_wiki(self, wiki_identifier, project=None): """DeleteWiki. - Deletes the wiki corresponding to the wiki ID or wiki name provided. + [Preview API] Deletes the wiki corresponding to the wiki ID or wiki name provided. :param str wiki_identifier: Wiki ID or wiki name. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -565,13 +565,13 @@ def delete_wiki(self, wiki_identifier, project=None): route_values['wikiIdentifier'] = self._serialize.url('wiki_identifier', wiki_identifier, 'str') response = self._send(http_method='DELETE', location_id='288d122c-dbd4-451d-aa5f-7dbbba070728', - version='7.0', + version='7.2-preview.2', route_values=route_values) return self._deserialize('WikiV2', response) def get_all_wikis(self, project=None): """GetAllWikis. - Gets all wikis in a project or collection. + [Preview API] Gets all wikis in a project or collection. :param str project: Project ID or project name :rtype: [WikiV2] """ @@ -580,16 +580,16 @@ def get_all_wikis(self, project=None): route_values['project'] = self._serialize.url('project', project, 'str') response = self._send(http_method='GET', location_id='288d122c-dbd4-451d-aa5f-7dbbba070728', - version='7.0', + version='7.2-preview.2', route_values=route_values) return self._deserialize('[WikiV2]', self._unwrap_collection(response)) def get_wiki(self, wiki_identifier, project=None): """GetWiki. - Gets the wiki corresponding to the wiki ID or wiki name provided. + [Preview API] Gets the wiki corresponding to the wiki ID or wiki name provided. :param str wiki_identifier: Wiki ID or wiki name. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -598,17 +598,17 @@ def get_wiki(self, wiki_identifier, project=None): route_values['wikiIdentifier'] = self._serialize.url('wiki_identifier', wiki_identifier, 'str') response = self._send(http_method='GET', location_id='288d122c-dbd4-451d-aa5f-7dbbba070728', - version='7.0', + version='7.2-preview.2', route_values=route_values) return self._deserialize('WikiV2', response) def update_wiki(self, update_parameters, wiki_identifier, project=None): """UpdateWiki. - Updates the wiki corresponding to the wiki ID or wiki name provided using the update parameters. - :param :class:` ` update_parameters: Update parameters. + [Preview API] Updates the wiki corresponding to the wiki ID or wiki name provided using the update parameters. + :param :class:` ` update_parameters: Update parameters. :param str wiki_identifier: Wiki ID or wiki name. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -618,7 +618,7 @@ def update_wiki(self, update_parameters, wiki_identifier, project=None): content = self._serialize.body(update_parameters, 'WikiUpdateParameters') response = self._send(http_method='PATCH', location_id='288d122c-dbd4-451d-aa5f-7dbbba070728', - version='7.0', + version='7.2-preview.2', route_values=route_values, content=content) return self._deserialize('WikiV2', response) diff --git a/azure-devops/azure/devops/v7_0/work/__init__.py b/azure-devops/azure/devops/v7_2/work/__init__.py similarity index 98% rename from azure-devops/azure/devops/v7_0/work/__init__.py rename to azure-devops/azure/devops/v7_2/work/__init__.py index 38efd362..cb1ba5dc 100644 --- a/azure-devops/azure/devops/v7_0/work/__init__.py +++ b/azure-devops/azure/devops/v7_2/work/__init__.py @@ -21,10 +21,10 @@ 'BoardBadge', 'BoardCardRuleSettings', 'BoardCardSettings', - 'BoardColumn', - 'BoardFields', 'BoardChart', 'BoardChartReference', + 'BoardColumn', + 'BoardFields', 'BoardReference', 'BoardRow', 'BoardSuggestedValue', @@ -57,6 +57,7 @@ 'TaskboardColumnMapping', 'TaskboardColumns', 'TaskboardWorkItemColumn', + 'TeamAutomationRulesSettingsRequestModel', 'TeamCapacity', 'TeamCapacityTotals', 'TeamContext', diff --git a/azure-devops/azure/devops/v7_0/work/models.py b/azure-devops/azure/devops/v7_2/work/models.py similarity index 93% rename from azure-devops/azure/devops/v7_0/work/models.py rename to azure-devops/azure/devops/v7_2/work/models.py index 9e8c8f20..36d091e0 100644 --- a/azure-devops/azure/devops/v7_0/work/models.py +++ b/azure-devops/azure/devops/v7_2/work/models.py @@ -31,7 +31,7 @@ def __init__(self, capacity_per_day=None, name=None): class BacklogColumn(Model): """ :param column_field_reference: - :type column_field_reference: :class:`WorkItemFieldReference ` + :type column_field_reference: :class:`WorkItemFieldReference ` :param width: :type width: int """ @@ -50,7 +50,7 @@ def __init__(self, column_field_reference=None, width=None): class BacklogConfiguration(Model): """ :param backlog_fields: Behavior/type field mapping - :type backlog_fields: :class:`BacklogFields ` + :type backlog_fields: :class:`BacklogFields ` :param bugs_behavior: Bugs behavior :type bugs_behavior: object :param hidden_backlogs: Hidden Backlog @@ -58,15 +58,15 @@ class BacklogConfiguration(Model): :param is_bugs_behavior_configured: Is BugsBehavior Configured in the process :type is_bugs_behavior_configured: bool :param portfolio_backlogs: Portfolio backlog descriptors - :type portfolio_backlogs: list of :class:`BacklogLevelConfiguration ` + :type portfolio_backlogs: list of :class:`BacklogLevelConfiguration ` :param requirement_backlog: Requirement backlog - :type requirement_backlog: :class:`BacklogLevelConfiguration ` + :type requirement_backlog: :class:`BacklogLevelConfiguration ` :param task_backlog: Task backlog - :type task_backlog: :class:`BacklogLevelConfiguration ` + :type task_backlog: :class:`BacklogLevelConfiguration ` :param url: :type url: str :param work_item_type_mapped_states: Mapped states for work item types - :type work_item_type_mapped_states: list of :class:`WorkItemTypeStateInfo ` + :type work_item_type_mapped_states: list of :class:`WorkItemTypeStateInfo ` """ _attribute_map = { @@ -141,13 +141,13 @@ def __init__(self, category_reference_name=None, plural_name=None, work_item_sta class BacklogLevelConfiguration(Model): """ :param add_panel_fields: List of fields to include in Add Panel - :type add_panel_fields: list of :class:`WorkItemFieldReference ` + :type add_panel_fields: list of :class:`WorkItemFieldReference ` :param color: Color for the backlog level :type color: str :param column_fields: Default list of columns for the backlog - :type column_fields: list of :class:`BacklogColumn ` + :type column_fields: list of :class:`BacklogColumn ` :param default_work_item_type: Default Work Item Type for the backlog - :type default_work_item_type: :class:`WorkItemTypeReference ` + :type default_work_item_type: :class:`WorkItemTypeReference ` :param id: Backlog Id (for Legacy Backlog Level from process config it can be categoryref name) :type id: str :param is_hidden: Indicates whether the backlog level is hidden @@ -161,7 +161,7 @@ class BacklogLevelConfiguration(Model): :param work_item_count_limit: Max number of work items to show in the given backlog :type work_item_count_limit: int :param work_item_types: Work Item types participating in this backlog as known by the project/Process, can be overridden by team settings for bugs - :type work_item_types: list of :class:`WorkItemTypeReference ` + :type work_item_types: list of :class:`WorkItemTypeReference ` """ _attribute_map = { @@ -198,7 +198,7 @@ class BacklogLevelWorkItems(Model): Represents work items in a backlog level :param work_items: A list of work items within a backlog level - :type work_items: list of :class:`WorkItemLink ` + :type work_items: list of :class:`WorkItemLink ` """ _attribute_map = { @@ -234,7 +234,7 @@ def __init__(self, board_id=None, image_url=None): class BoardCardRuleSettings(Model): """ :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param rules: :type rules: dict :param url: @@ -269,6 +269,25 @@ def __init__(self, cards=None): self.cards = cards +class BoardChartReference(Model): + """ + :param name: Name of the resource + :type name: str + :param url: Full http link to the resource + :type url: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, name=None, url=None): + super(BoardChartReference, self).__init__() + self.name = name + self.url = url + + class BoardColumn(Model): """ :param column_type: @@ -311,11 +330,11 @@ def __init__(self, column_type=None, description=None, id=None, is_split=None, i class BoardFields(Model): """ :param column_field: - :type column_field: :class:`FieldReference ` + :type column_field: :class:`FieldReference ` :param done_field: - :type done_field: :class:`FieldReference ` + :type done_field: :class:`FieldReference ` :param row_field: - :type row_field: :class:`FieldReference ` + :type row_field: :class:`FieldReference ` """ _attribute_map = { @@ -331,25 +350,6 @@ def __init__(self, column_field=None, done_field=None, row_field=None): self.row_field = row_field -class BoardChartReference(Model): - """ - :param name: Name of the resource - :type name: str - :param url: Full http link to the resource - :type url: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'url': {'key': 'url', 'type': 'str'} - } - - def __init__(self, name=None, url=None): - super(BoardChartReference, self).__init__() - self.name = name - self.url = url - - class BoardReference(Model): """ :param id: Id of the resource @@ -375,6 +375,8 @@ def __init__(self, id=None, name=None, url=None): class BoardRow(Model): """ + :param color: + :type color: str :param id: :type id: str :param name: @@ -382,12 +384,14 @@ class BoardRow(Model): """ _attribute_map = { + 'color': {'key': 'color', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'} } - def __init__(self, id=None, name=None): + def __init__(self, color=None, id=None, name=None): super(BoardRow, self).__init__() + self.color = color self.id = id self.name = name @@ -427,9 +431,9 @@ class CapacityPatch(Model): Expected data from PATCH :param activities: - :type activities: list of :class:`Activity ` + :type activities: list of :class:`Activity ` :param days_off: - :type days_off: list of :class:`DateRange ` + :type days_off: list of :class:`DateRange ` """ _attribute_map = { @@ -452,7 +456,7 @@ class CategoryConfiguration(Model): :param reference_name: Category Reference Name :type reference_name: str :param work_item_types: Work item types for the backlog category - :type work_item_types: list of :class:`WorkItemTypeReference ` + :type work_item_types: list of :class:`WorkItemTypeReference ` """ _attribute_map = { @@ -569,7 +573,7 @@ def __init__(self, field_name=None, index=None, logical_operator=None, operator= class GraphSubjectBase(Model): """ :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. :type descriptor: str :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. @@ -596,7 +600,7 @@ def __init__(self, _links=None, descriptor=None, display_name=None, url=None): class IdentityRef(GraphSubjectBase): """ :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. :type descriptor: str :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. @@ -676,7 +680,7 @@ class IterationCapacity(Model): Capacity and teams for all teams in an iteration :param teams: - :type teams: list of :class:`TeamCapacityTotals ` + :type teams: list of :class:`TeamCapacityTotals ` :param total_iteration_capacity_per_day: :type total_iteration_capacity_per_day: float :param total_iteration_days_off: @@ -784,15 +788,17 @@ class Plan(Model): Data contract for the plan definition :param created_by_identity: Identity that created this plan. Defaults to null for records before upgrading to ScaledAgileViewComponent4. - :type created_by_identity: :class:`IdentityRef ` + :type created_by_identity: :class:`IdentityRef ` :param created_date: Date when the plan was created :type created_date: datetime :param description: Description of the plan :type description: str :param id: Id of the plan :type id: str + :param last_accessed: Date when the plan was last accessed. Default is null. + :type last_accessed: datetime :param modified_by_identity: Identity that last modified this plan. Defaults to null for records before upgrading to ScaledAgileViewComponent4. - :type modified_by_identity: :class:`IdentityRef ` + :type modified_by_identity: :class:`IdentityRef ` :param modified_date: Date when the plan was last modified. Default to CreatedDate when the plan is first created. :type modified_date: datetime :param name: Name of the plan @@ -814,6 +820,7 @@ class Plan(Model): 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, 'description': {'key': 'description', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, + 'last_accessed': {'key': 'lastAccessed', 'type': 'iso-8601'}, 'modified_by_identity': {'key': 'modifiedByIdentity', 'type': 'IdentityRef'}, 'modified_date': {'key': 'modifiedDate', 'type': 'iso-8601'}, 'name': {'key': 'name', 'type': 'str'}, @@ -824,12 +831,13 @@ class Plan(Model): 'user_permissions': {'key': 'userPermissions', 'type': 'object'} } - def __init__(self, created_by_identity=None, created_date=None, description=None, id=None, modified_by_identity=None, modified_date=None, name=None, properties=None, revision=None, type=None, url=None, user_permissions=None): + def __init__(self, created_by_identity=None, created_date=None, description=None, id=None, last_accessed=None, modified_by_identity=None, modified_date=None, name=None, properties=None, revision=None, type=None, url=None, user_permissions=None): super(Plan, self).__init__() self.created_by_identity = created_by_identity self.created_date = created_date self.description = description self.id = id + self.last_accessed = last_accessed self.modified_by_identity = modified_by_identity self.modified_date = modified_date self.name = name @@ -872,7 +880,7 @@ class PredefinedQuery(Model): :param name: Localized name of the query :type name: str :param results: The results of the query. This will be a set of WorkItem objects with only the 'id' set. The client is responsible for paging in the data as needed. - :type results: list of :class:`WorkItem ` + :type results: list of :class:`WorkItem ` :param url: REST API Url to use to retrieve results for this query :type url: str :param web_url: Url to use to display a page in the browser with the results of this query @@ -903,13 +911,13 @@ class ProcessConfiguration(Model): Process Configurations for the project :param bug_work_items: Details about bug work items - :type bug_work_items: :class:`CategoryConfiguration ` + :type bug_work_items: :class:`CategoryConfiguration ` :param portfolio_backlogs: Details about portfolio backlogs - :type portfolio_backlogs: list of :class:`CategoryConfiguration ` + :type portfolio_backlogs: list of :class:`CategoryConfiguration ` :param requirement_backlog: Details of requirement backlog - :type requirement_backlog: :class:`CategoryConfiguration ` + :type requirement_backlog: :class:`CategoryConfiguration ` :param task_backlog: Details of task backlog - :type task_backlog: :class:`CategoryConfiguration ` + :type task_backlog: :class:`CategoryConfiguration ` :param type_fields: Type fields for the process configuration :type type_fields: dict :param url: @@ -1009,7 +1017,7 @@ def __init__(self, id=None, order=None): class Rule(Model): """ :param clauses: - :type clauses: list of :class:`FilterClause ` + :type clauses: list of :class:`FilterClause ` :param filter: :type filter: str :param is_enabled: @@ -1044,7 +1052,7 @@ class TaskboardColumn(Model): :param id: Column ID :type id: str :param mappings: Work item type states mapped to this column to support auto state update when column is updated. - :type mappings: list of :class:`ITaskboardColumnMapping ` + :type mappings: list of :class:`ITaskboardColumnMapping ` :param name: Column name :type name: str :param order: Column position relative to other columns in the same board @@ -1090,7 +1098,7 @@ def __init__(self, state=None, work_item_type=None): class TaskboardColumns(Model): """ :param columns: - :type columns: list of :class:`TaskboardColumn ` + :type columns: list of :class:`TaskboardColumn ` :param is_customized: Are the columns cutomized for this team :type is_customized: bool :param is_valid: Specifies if the referenced WIT and State is valid @@ -1143,12 +1151,31 @@ def __init__(self, column=None, column_id=None, state=None, work_item_id=None): self.work_item_id = work_item_id +class TeamAutomationRulesSettingsRequestModel(Model): + """ + :param backlog_level_name: + :type backlog_level_name: str + :param rules_states: + :type rules_states: dict + """ + + _attribute_map = { + 'backlog_level_name': {'key': 'backlogLevelName', 'type': 'str'}, + 'rules_states': {'key': 'rulesStates', 'type': '{bool}'} + } + + def __init__(self, backlog_level_name=None, rules_states=None): + super(TeamAutomationRulesSettingsRequestModel, self).__init__() + self.backlog_level_name = backlog_level_name + self.rules_states = rules_states + + class TeamCapacity(Model): """ Represents team member capacity with totals aggregated :param team_members: - :type team_members: list of :class:`TeamMemberCapacityIdentityRef ` + :type team_members: list of :class:`TeamMemberCapacityIdentityRef ` :param total_capacity_per_day: :type total_capacity_per_day: float :param total_days_off: @@ -1250,7 +1277,7 @@ class TeamFieldValuesPatch(Model): :param default_value: :type default_value: str :param values: - :type values: list of :class:`TeamFieldValue ` + :type values: list of :class:`TeamFieldValue ` """ _attribute_map = { @@ -1292,7 +1319,7 @@ class TeamSettingsDataContractBase(Model): Base class for TeamSettings data contracts. Anything common goes here. :param _links: Collection of links relevant to resource - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param url: Full http link to the resource :type url: str """ @@ -1311,11 +1338,11 @@ def __init__(self, _links=None, url=None): class TeamSettingsDaysOff(TeamSettingsDataContractBase): """ :param _links: Collection of links relevant to resource - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param url: Full http link to the resource :type url: str :param days_off: - :type days_off: list of :class:`DateRange ` + :type days_off: list of :class:`DateRange ` """ _attribute_map = { @@ -1332,7 +1359,7 @@ def __init__(self, _links=None, url=None, days_off=None): class TeamSettingsDaysOffPatch(Model): """ :param days_off: - :type days_off: list of :class:`DateRange ` + :type days_off: list of :class:`DateRange ` """ _attribute_map = { @@ -1349,11 +1376,11 @@ class TeamSettingsIteration(TeamSettingsDataContractBase): Represents a shallow ref for a single iteration. :param _links: Collection of links relevant to resource - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param url: Full http link to the resource :type url: str :param attributes: Attributes of the iteration such as start and end date. - :type attributes: :class:`TeamIterationAttributes ` + :type attributes: :class:`TeamIterationAttributes ` :param id: Id of the iteration. :type id: str :param name: Name of the iteration. @@ -1457,7 +1484,7 @@ def __init__(self, message=None, type=None): class TimelineTeamData(Model): """ :param backlog: Backlog matching the mapped backlog associated with this team. - :type backlog: :class:`BacklogLevel ` + :type backlog: :class:`BacklogLevel ` :param field_reference_names: The field reference names of the work item data :type field_reference_names: list of str :param id: The id of the team @@ -1465,7 +1492,7 @@ class TimelineTeamData(Model): :param is_expanded: Was iteration and work item data retrieved for this team. Teams with IsExpanded false have not had their iteration, work item, and field related data queried and will never contain this data. If true then these items are queried and, if there are items in the queried range, there will be data. :type is_expanded: bool :param iterations: The iteration data, including the work items, in the queried date range. - :type iterations: list of :class:`TimelineTeamIteration ` + :type iterations: list of :class:`TimelineTeamIteration ` :param name: The name of the team :type name: str :param order_by_field: The order by field name of this team @@ -1479,17 +1506,17 @@ class TimelineTeamData(Model): :param rollup_work_item_types: Work item types for which we will collect roll up data on the client side :type rollup_work_item_types: list of str :param status: Status for this team. - :type status: :class:`TimelineTeamStatus ` + :type status: :class:`TimelineTeamStatus ` :param team_field_default_value: The team field default value :type team_field_default_value: str :param team_field_name: The team field name of this team :type team_field_name: str :param team_field_values: The team field values - :type team_field_values: list of :class:`TeamFieldValue ` + :type team_field_values: list of :class:`TeamFieldValue ` :param work_items: Work items associated with the team that are not under any of the team's iterations :type work_items: list of [object] :param work_item_type_colors: Colors for the work item types. - :type work_item_type_colors: list of :class:`WorkItemColor ` + :type work_item_type_colors: list of :class:`WorkItemColor ` """ _attribute_map = { @@ -1548,7 +1575,7 @@ class TimelineTeamIteration(Model): :param start_date: The start date of the iteration :type start_date: datetime :param status: The status of this iteration - :type status: :class:`TimelineIterationStatus ` + :type status: :class:`TimelineIterationStatus ` :param work_items: The work items that have been paged in this iteration :type work_items: list of [object] """ @@ -1631,7 +1658,7 @@ class UpdateTaskboardColumn(Model): :param id: Column ID, keep it null for new column :type id: str :param mappings: Work item type states mapped to this column to support auto state update when column is updated. - :type mappings: list of :class:`TaskboardColumnMapping ` + :type mappings: list of :class:`TaskboardColumnMapping ` :param name: Column name is required :type name: str :param order: Column position relative to other columns in the same board @@ -1725,9 +1752,9 @@ class WorkItemLink(Model): :param rel: The type of link. :type rel: str :param source: The source work item. - :type source: :class:`WorkItemReference ` + :type source: :class:`WorkItemReference ` :param target: The target work item. - :type target: :class:`WorkItemReference ` + :type target: :class:`WorkItemReference ` """ _attribute_map = { @@ -1788,7 +1815,7 @@ class WorkItemTrackingResourceReference(Model): """ Base class for work item tracking resource references. - :param url: + :param url: REST URL for the resource. :type url: str """ @@ -1805,7 +1832,7 @@ class WorkItemTypeReference(WorkItemTrackingResourceReference): """ Reference to a work item type. - :param url: + :param url: REST URL for the resource. :type url: str :param name: Name of the work item type. :type name: str @@ -1849,21 +1876,21 @@ class Board(BoardReference): :param url: Full http link to the resource :type url: str :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param allowed_mappings: :type allowed_mappings: dict :param can_edit: :type can_edit: bool :param columns: - :type columns: list of :class:`BoardColumn ` + :type columns: list of :class:`BoardColumn ` :param fields: - :type fields: :class:`BoardFields ` + :type fields: :class:`BoardFields ` :param is_valid: :type is_valid: bool :param revision: :type revision: int :param rows: - :type rows: list of :class:`BoardRow ` + :type rows: list of :class:`BoardRow ` """ _attribute_map = { @@ -1899,7 +1926,7 @@ class BoardChart(BoardChartReference): :param url: Full http link to the resource :type url: str :param _links: The links for the resource - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param settings: The settings for the resource :type settings: dict """ @@ -1920,13 +1947,13 @@ def __init__(self, name=None, url=None, _links=None, settings=None): class CapacityContractBase(TeamSettingsDataContractBase): """ :param _links: Collection of links relevant to resource - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param url: Full http link to the resource :type url: str :param activities: Collection of capacities associated with the team member - :type activities: list of :class:`Activity ` + :type activities: list of :class:`Activity ` :param days_off: The days off associated with the team member - :type days_off: list of :class:`DateRange ` + :type days_off: list of :class:`DateRange ` """ _attribute_map = { @@ -1950,20 +1977,20 @@ class DeliveryViewData(PlanViewData): :type id: str :param revision: :type revision: int + :param child_id_to_parent_id_map: Work item child id to parent id map + :type child_id_to_parent_id_map: dict :param criteria_status: Filter criteria status of the timeline - :type criteria_status: :class:`TimelineCriteriaStatus ` + :type criteria_status: :class:`TimelineCriteriaStatus ` :param end_date: The end date of the delivery view data :type end_date: datetime - :param child_id_to_parent_id_map: Work item child id to parent id map - :type child_id_to_parent_id_map: dict :param max_expanded_teams: Max number of teams that can be configured for a delivery plan :type max_expanded_teams: int :param parent_item_maps: Mapping between parent id, title and all the child work item ids - :type parent_item_maps: list of :class:`ParentChildWIMap ` + :type parent_item_maps: list of :class:`ParentChildWIMap ` :param start_date: The start date for the delivery view data :type start_date: datetime :param teams: All the team data - :type teams: list of :class:`TimelineTeamData ` + :type teams: list of :class:`TimelineTeamData ` :param work_item_dependencies: List of all work item ids that have a dependency but not a violation :type work_item_dependencies: list of int :param work_item_violations: List of all work item ids that have a violation @@ -1973,9 +2000,9 @@ class DeliveryViewData(PlanViewData): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'revision': {'key': 'revision', 'type': 'int'}, + 'child_id_to_parent_id_map': {'key': 'childIdToParentIdMap', 'type': '{int}'}, 'criteria_status': {'key': 'criteriaStatus', 'type': 'TimelineCriteriaStatus'}, 'end_date': {'key': 'endDate', 'type': 'iso-8601'}, - 'child_id_to_parent_id_map': {'key': 'childIdToParentIdMap', 'type': '{int}'}, 'max_expanded_teams': {'key': 'maxExpandedTeams', 'type': 'int'}, 'parent_item_maps': {'key': 'parentItemMaps', 'type': '[ParentChildWIMap]'}, 'start_date': {'key': 'startDate', 'type': 'iso-8601'}, @@ -1984,11 +2011,11 @@ class DeliveryViewData(PlanViewData): 'work_item_violations': {'key': 'workItemViolations', 'type': '[int]'} } - def __init__(self, id=None, revision=None, criteria_status=None, end_date=None, child_id_to_parent_id_map=None, max_expanded_teams=None, parent_item_maps=None, start_date=None, teams=None, work_item_dependencies=None, work_item_violations=None): + def __init__(self, id=None, revision=None, child_id_to_parent_id_map=None, criteria_status=None, end_date=None, max_expanded_teams=None, parent_item_maps=None, start_date=None, teams=None, work_item_dependencies=None, work_item_violations=None): super(DeliveryViewData, self).__init__(id=id, revision=revision) + self.child_id_to_parent_id_map = child_id_to_parent_id_map self.criteria_status = criteria_status self.end_date = end_date - self.child_id_to_parent_id_map = child_id_to_parent_id_map self.max_expanded_teams = max_expanded_teams self.parent_item_maps = parent_item_maps self.start_date = start_date @@ -2002,11 +2029,11 @@ class IterationWorkItems(TeamSettingsDataContractBase): Represents work items in an iteration backlog :param _links: Collection of links relevant to resource - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param url: Full http link to the resource :type url: str :param work_item_relations: Work item relations - :type work_item_relations: list of :class:`WorkItemLink ` + :type work_item_relations: list of :class:`WorkItemLink ` """ _attribute_map = { @@ -2025,15 +2052,15 @@ class TeamFieldValues(TeamSettingsDataContractBase): Essentially a collection of team field values :param _links: Collection of links relevant to resource - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param url: Full http link to the resource :type url: str :param default_value: The default team field value :type default_value: str :param field: Shallow ref to the field being used as a team field - :type field: :class:`FieldReference ` + :type field: :class:`FieldReference ` :param values: Collection of all valid team field values - :type values: list of :class:`TeamFieldValue ` + :type values: list of :class:`TeamFieldValue ` """ _attribute_map = { @@ -2056,15 +2083,15 @@ class TeamMemberCapacity(CapacityContractBase): Represents capacity for a specific team member :param _links: Collection of links relevant to resource - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param url: Full http link to the resource :type url: str :param activities: Collection of capacities associated with the team member - :type activities: list of :class:`Activity ` + :type activities: list of :class:`Activity ` :param days_off: The days off associated with the team member - :type days_off: list of :class:`DateRange ` + :type days_off: list of :class:`DateRange ` :param team_member: Shallow Ref to the associated team member - :type team_member: :class:`Member ` + :type team_member: :class:`Member ` """ _attribute_map = { @@ -2085,15 +2112,15 @@ class TeamMemberCapacityIdentityRef(CapacityContractBase): Represents capacity for a specific team member :param _links: Collection of links relevant to resource - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param url: Full http link to the resource :type url: str :param activities: Collection of capacities associated with the team member - :type activities: list of :class:`Activity ` + :type activities: list of :class:`Activity ` :param days_off: The days off associated with the team member - :type days_off: list of :class:`DateRange ` + :type days_off: list of :class:`DateRange ` :param team_member: Identity ref of the associated team member - :type team_member: :class:`IdentityRef ` + :type team_member: :class:`IdentityRef ` """ _attribute_map = { @@ -2114,17 +2141,17 @@ class TeamSetting(TeamSettingsDataContractBase): Data contract for TeamSettings :param _links: Collection of links relevant to resource - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param url: Full http link to the resource :type url: str :param backlog_iteration: Backlog Iteration - :type backlog_iteration: :class:`TeamSettingsIteration ` + :type backlog_iteration: :class:`TeamSettingsIteration ` :param backlog_visibilities: Information about categories that are visible on the backlog. :type backlog_visibilities: dict :param bugs_behavior: BugsBehavior (Off, AsTasks, AsRequirements, ...) :type bugs_behavior: object :param default_iteration: Default Iteration, the iteration used when creating a new work item on the queries page. - :type default_iteration: :class:`TeamSettingsIteration ` + :type default_iteration: :class:`TeamSettingsIteration ` :param default_iteration_macro: Default Iteration macro (if any) :type default_iteration_macro: str :param working_days: Days that the team is working @@ -2156,7 +2183,7 @@ class WorkItemCommentVersionRef(WorkItemTrackingResourceReference): """ Represents the reference to a specific version of a comment on a Work Item. - :param url: + :param url: REST URL for the resource. :type url: str :param comment_id: The id assigned to the comment. :type comment_id: int @@ -2192,10 +2219,10 @@ class WorkItemTrackingResource(WorkItemTrackingResourceReference): """ Base class for WIT REST resources. - :param url: + :param url: REST URL for the resource. :type url: str :param _links: Link references to related REST resources. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` """ _attribute_map = { @@ -2212,18 +2239,18 @@ class WorkItem(WorkItemTrackingResource): """ Describes a work item. - :param url: + :param url: REST URL for the resource. :type url: str :param _links: Link references to related REST resources. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param comment_version_ref: Reference to a specific version of the comment added/edited/deleted in this revision. - :type comment_version_ref: :class:`WorkItemCommentVersionRef ` + :type comment_version_ref: :class:`WorkItemCommentVersionRef ` :param fields: Map of field and values for the work item. :type fields: dict :param id: The work item ID. :type id: int :param relations: Relations of the work item. - :type relations: list of :class:`WorkItemRelation ` + :type relations: list of :class:`WorkItemRelation ` :param rev: Revision number of the work item. :type rev: int """ @@ -2258,9 +2285,9 @@ def __init__(self, url=None, _links=None, comment_version_ref=None, fields=None, 'BoardBadge', 'BoardCardRuleSettings', 'BoardCardSettings', + 'BoardChartReference', 'BoardColumn', 'BoardFields', - 'BoardChartReference', 'BoardReference', 'BoardRow', 'BoardSuggestedValue', @@ -2290,6 +2317,7 @@ def __init__(self, url=None, _links=None, comment_version_ref=None, fields=None, 'TaskboardColumnMapping', 'TaskboardColumns', 'TaskboardWorkItemColumn', + 'TeamAutomationRulesSettingsRequestModel', 'TeamCapacity', 'TeamCapacityTotals', 'TeamContext', diff --git a/azure-devops/azure/devops/v7_0/work/work_client.py b/azure-devops/azure/devops/v7_2/work/work_client.py similarity index 85% rename from azure-devops/azure/devops/v7_0/work/work_client.py rename to azure-devops/azure/devops/v7_2/work/work_client.py index 0ba0e6f8..77f9a4e6 100644 --- a/azure-devops/azure/devops/v7_0/work/work_client.py +++ b/azure-devops/azure/devops/v7_2/work/work_client.py @@ -27,9 +27,9 @@ def __init__(self, base_url=None, creds=None): def get_backlog_configurations(self, team_context): """GetBacklogConfigurations. - Gets backlog configuration for a team - :param :class:` ` team_context: The team context for the operation - :rtype: :class:` ` + [Preview API] Gets backlog configuration for a team + :param :class:` ` team_context: The team context for the operation + :rtype: :class:` ` """ project = None team = None @@ -50,16 +50,16 @@ def get_backlog_configurations(self, team_context): route_values['team'] = self._serialize.url('team', team, 'string') response = self._send(http_method='GET', location_id='7799f497-3cb5-4f16-ad4f-5cd06012db64', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('BacklogConfiguration', response) def get_backlog_level_work_items(self, team_context, backlog_id): """GetBacklogLevelWorkItems. - Get a list of work items within a backlog level - :param :class:` ` team_context: The team context for the operation + [Preview API] Get a list of work items within a backlog level + :param :class:` ` team_context: The team context for the operation :param str backlog_id: - :rtype: :class:` ` + :rtype: :class:` ` """ project = None team = None @@ -82,16 +82,16 @@ def get_backlog_level_work_items(self, team_context, backlog_id): route_values['backlogId'] = self._serialize.url('backlog_id', backlog_id, 'str') response = self._send(http_method='GET', location_id='7c468d96-ab1d-4294-a360-92f07e9ccd98', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('BacklogLevelWorkItems', response) def get_backlog(self, team_context, id): """GetBacklog. - Get a backlog level - :param :class:` ` team_context: The team context for the operation + [Preview API] Get a backlog level + :param :class:` ` team_context: The team context for the operation :param str id: The id of the backlog level - :rtype: :class:` ` + :rtype: :class:` ` """ project = None team = None @@ -114,14 +114,14 @@ def get_backlog(self, team_context, id): route_values['id'] = self._serialize.url('id', id, 'str') response = self._send(http_method='GET', location_id='a93726f9-7867-4e38-b4f2-0bfafc2f6a94', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('BacklogLevelConfiguration', response) def get_backlogs(self, team_context): """GetBacklogs. - List all backlog levels - :param :class:` ` team_context: The team context for the operation + [Preview API] List all backlog levels + :param :class:` ` team_context: The team context for the operation :rtype: [BacklogLevelConfiguration] """ project = None @@ -143,13 +143,13 @@ def get_backlogs(self, team_context): route_values['team'] = self._serialize.url('team', team, 'string') response = self._send(http_method='GET', location_id='a93726f9-7867-4e38-b4f2-0bfafc2f6a94', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('[BacklogLevelConfiguration]', self._unwrap_collection(response)) def get_column_suggested_values(self, project=None): """GetColumnSuggestedValues. - Get available board columns in a project + [Preview API] Get available board columns in a project :param str project: Project ID or project name :rtype: [BoardSuggestedValue] """ @@ -158,14 +158,14 @@ def get_column_suggested_values(self, project=None): route_values['project'] = self._serialize.url('project', project, 'str') response = self._send(http_method='GET', location_id='eb7ec5a3-1ba3-4fd1-b834-49a5a387e57d', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('[BoardSuggestedValue]', self._unwrap_collection(response)) def get_board_mapping_parent_items(self, team_context, child_backlog_context_category_ref_name, workitem_ids): """GetBoardMappingParentItems. - Returns the list of parent field filter model for the given list of workitem ids - :param :class:` ` team_context: The team context for the operation + [Preview API] Returns the list of parent field filter model for the given list of workitem ids + :param :class:` ` team_context: The team context for the operation :param str child_backlog_context_category_ref_name: :param [int] workitem_ids: :rtype: [ParentChildWIMap] @@ -195,14 +195,14 @@ def get_board_mapping_parent_items(self, team_context, child_backlog_context_cat query_parameters['workitemIds'] = self._serialize.query('workitem_ids', workitem_ids, 'str') response = self._send(http_method='GET', location_id='186abea3-5c35-432f-9e28-7a15b4312a0e', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[ParentChildWIMap]', self._unwrap_collection(response)) def get_row_suggested_values(self, project=None): """GetRowSuggestedValues. - Get available board rows in a project + [Preview API] Get available board rows in a project :param str project: Project ID or project name :rtype: [BoardSuggestedValue] """ @@ -211,16 +211,16 @@ def get_row_suggested_values(self, project=None): route_values['project'] = self._serialize.url('project', project, 'str') response = self._send(http_method='GET', location_id='bb494cc6-a0f5-4c6c-8dca-ea6912e79eb9', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('[BoardSuggestedValue]', self._unwrap_collection(response)) def get_board(self, team_context, id): """GetBoard. - Get board - :param :class:` ` team_context: The team context for the operation + [Preview API] Get board + :param :class:` ` team_context: The team context for the operation :param str id: identifier for board, either board's backlog level name (Eg:"Stories") or Id - :rtype: :class:` ` + :rtype: :class:` ` """ project = None team = None @@ -243,14 +243,14 @@ def get_board(self, team_context, id): route_values['id'] = self._serialize.url('id', id, 'str') response = self._send(http_method='GET', location_id='23ad19fc-3b8e-4877-8462-b3f92bc06b40', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('Board', response) def get_boards(self, team_context): """GetBoards. - Get boards - :param :class:` ` team_context: The team context for the operation + [Preview API] Get boards + :param :class:` ` team_context: The team context for the operation :rtype: [BoardReference] """ project = None @@ -272,15 +272,15 @@ def get_boards(self, team_context): route_values['team'] = self._serialize.url('team', team, 'string') response = self._send(http_method='GET', location_id='23ad19fc-3b8e-4877-8462-b3f92bc06b40', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('[BoardReference]', self._unwrap_collection(response)) def set_board_options(self, options, team_context, id): """SetBoardOptions. - Update board options + [Preview API] Update board options :param {str} options: options to updated - :param :class:` ` team_context: The team context for the operation + :param :class:` ` team_context: The team context for the operation :param str id: identifier for board, either category plural name (Eg:"Stories") or guid :rtype: {str} """ @@ -306,17 +306,17 @@ def set_board_options(self, options, team_context, id): content = self._serialize.body(options, '{str}') response = self._send(http_method='PUT', location_id='23ad19fc-3b8e-4877-8462-b3f92bc06b40', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('{str}', self._unwrap_collection(response)) def get_board_user_settings(self, team_context, board): """GetBoardUserSettings. - Get board user settings for a board id - :param :class:` ` team_context: The team context for the operation + [Preview API] Get board user settings for a board id + :param :class:` ` team_context: The team context for the operation :param str board: Board ID or Name - :rtype: :class:` ` + :rtype: :class:` ` """ project = None team = None @@ -339,17 +339,17 @@ def get_board_user_settings(self, team_context, board): route_values['board'] = self._serialize.url('board', board, 'str') response = self._send(http_method='GET', location_id='b30d9f58-1891-4b0a-b168-c46408f919b0', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('BoardUserSettings', response) def update_board_user_settings(self, board_user_settings, team_context, board): """UpdateBoardUserSettings. - Update board user settings for the board id + [Preview API] Update board user settings for the board id :param {str} board_user_settings: - :param :class:` ` team_context: The team context for the operation + :param :class:` ` team_context: The team context for the operation :param str board: - :rtype: :class:` ` + :rtype: :class:` ` """ project = None team = None @@ -373,17 +373,17 @@ def update_board_user_settings(self, board_user_settings, team_context, board): content = self._serialize.body(board_user_settings, '{str}') response = self._send(http_method='PATCH', location_id='b30d9f58-1891-4b0a-b168-c46408f919b0', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('BoardUserSettings', response) def get_capacities_with_identity_ref_and_totals(self, team_context, iteration_id): """GetCapacitiesWithIdentityRefAndTotals. - Get a team's capacity including total capacity and days off - :param :class:` ` team_context: The team context for the operation + [Preview API] Get a team's capacity including total capacity and days off + :param :class:` ` team_context: The team context for the operation :param str iteration_id: ID of the iteration - :rtype: :class:` ` + :rtype: :class:` ` """ project = None team = None @@ -406,17 +406,17 @@ def get_capacities_with_identity_ref_and_totals(self, team_context, iteration_id route_values['iterationId'] = self._serialize.url('iteration_id', iteration_id, 'str') response = self._send(http_method='GET', location_id='74412d15-8c1a-4352-a48d-ef1ed5587d57', - version='7.0', + version='7.2-preview.3', route_values=route_values) return self._deserialize('TeamCapacity', response) def get_capacity_with_identity_ref(self, team_context, iteration_id, team_member_id): """GetCapacityWithIdentityRef. - Get a team member's capacity - :param :class:` ` team_context: The team context for the operation + [Preview API] Get a team member's capacity + :param :class:` ` team_context: The team context for the operation :param str iteration_id: ID of the iteration :param str team_member_id: ID of the team member - :rtype: :class:` ` + :rtype: :class:` ` """ project = None team = None @@ -441,15 +441,15 @@ def get_capacity_with_identity_ref(self, team_context, iteration_id, team_member route_values['teamMemberId'] = self._serialize.url('team_member_id', team_member_id, 'str') response = self._send(http_method='GET', location_id='74412d15-8c1a-4352-a48d-ef1ed5587d57', - version='7.0', + version='7.2-preview.3', route_values=route_values) return self._deserialize('TeamMemberCapacityIdentityRef', response) def replace_capacities_with_identity_ref(self, capacities, team_context, iteration_id): """ReplaceCapacitiesWithIdentityRef. - Replace a team's capacity + [Preview API] Replace a team's capacity :param [TeamMemberCapacityIdentityRef] capacities: Team capacity to replace - :param :class:` ` team_context: The team context for the operation + :param :class:` ` team_context: The team context for the operation :param str iteration_id: ID of the iteration :rtype: [TeamMemberCapacityIdentityRef] """ @@ -475,19 +475,19 @@ def replace_capacities_with_identity_ref(self, capacities, team_context, iterati content = self._serialize.body(capacities, '[TeamMemberCapacityIdentityRef]') response = self._send(http_method='PUT', location_id='74412d15-8c1a-4352-a48d-ef1ed5587d57', - version='7.0', + version='7.2-preview.3', route_values=route_values, content=content) return self._deserialize('[TeamMemberCapacityIdentityRef]', self._unwrap_collection(response)) def update_capacity_with_identity_ref(self, patch, team_context, iteration_id, team_member_id): """UpdateCapacityWithIdentityRef. - Update a team member's capacity - :param :class:` ` patch: Updated capacity - :param :class:` ` team_context: The team context for the operation + [Preview API] Update a team member's capacity + :param :class:` ` patch: Updated capacity + :param :class:` ` team_context: The team context for the operation :param str iteration_id: ID of the iteration :param str team_member_id: ID of the team member - :rtype: :class:` ` + :rtype: :class:` ` """ project = None team = None @@ -513,17 +513,17 @@ def update_capacity_with_identity_ref(self, patch, team_context, iteration_id, t content = self._serialize.body(patch, 'CapacityPatch') response = self._send(http_method='PATCH', location_id='74412d15-8c1a-4352-a48d-ef1ed5587d57', - version='7.0', + version='7.2-preview.3', route_values=route_values, content=content) return self._deserialize('TeamMemberCapacityIdentityRef', response) def get_board_card_rule_settings(self, team_context, board): """GetBoardCardRuleSettings. - Get board card Rule settings for the board id or board by name - :param :class:` ` team_context: The team context for the operation + [Preview API] Get board card Rule settings for the board id or board by name + :param :class:` ` team_context: The team context for the operation :param str board: - :rtype: :class:` ` + :rtype: :class:` ` """ project = None team = None @@ -546,17 +546,17 @@ def get_board_card_rule_settings(self, team_context, board): route_values['board'] = self._serialize.url('board', board, 'str') response = self._send(http_method='GET', location_id='b044a3d9-02ea-49c7-91a1-b730949cc896', - version='7.0', + version='7.2-preview.2', route_values=route_values) return self._deserialize('BoardCardRuleSettings', response) def update_board_card_rule_settings(self, board_card_rule_settings, team_context, board): """UpdateBoardCardRuleSettings. - Update board card Rule settings for the board id or board by name - :param :class:` ` board_card_rule_settings: - :param :class:` ` team_context: The team context for the operation + [Preview API] Update board card Rule settings for the board id or board by name + :param :class:` ` board_card_rule_settings: + :param :class:` ` team_context: The team context for the operation :param str board: - :rtype: :class:` ` + :rtype: :class:` ` """ project = None team = None @@ -580,16 +580,16 @@ def update_board_card_rule_settings(self, board_card_rule_settings, team_context content = self._serialize.body(board_card_rule_settings, 'BoardCardRuleSettings') response = self._send(http_method='PATCH', location_id='b044a3d9-02ea-49c7-91a1-b730949cc896', - version='7.0', + version='7.2-preview.2', route_values=route_values, content=content) return self._deserialize('BoardCardRuleSettings', response) def update_taskboard_card_rule_settings(self, board_card_rule_settings, team_context): """UpdateTaskboardCardRuleSettings. - Update taskboard card Rule settings - :param :class:` ` board_card_rule_settings: - :param :class:` ` team_context: The team context for the operation + [Preview API] Update taskboard card Rule settings + :param :class:` ` board_card_rule_settings: + :param :class:` ` team_context: The team context for the operation """ project = None team = None @@ -611,16 +611,16 @@ def update_taskboard_card_rule_settings(self, board_card_rule_settings, team_con content = self._serialize.body(board_card_rule_settings, 'BoardCardRuleSettings') self._send(http_method='PATCH', location_id='3f84a8d1-1aab-423e-a94b-6dcbdcca511f', - version='7.0', + version='7.2-preview.2', route_values=route_values, content=content) def get_board_card_settings(self, team_context, board): """GetBoardCardSettings. - Get board card settings for the board id or board by name - :param :class:` ` team_context: The team context for the operation + [Preview API] Get board card settings for the board id or board by name + :param :class:` ` team_context: The team context for the operation :param str board: - :rtype: :class:` ` + :rtype: :class:` ` """ project = None team = None @@ -643,17 +643,17 @@ def get_board_card_settings(self, team_context, board): route_values['board'] = self._serialize.url('board', board, 'str') response = self._send(http_method='GET', location_id='07c3b467-bc60-4f05-8e34-599ce288fafc', - version='7.0', + version='7.2-preview.2', route_values=route_values) return self._deserialize('BoardCardSettings', response) def update_board_card_settings(self, board_card_settings_to_save, team_context, board): """UpdateBoardCardSettings. - Update board card settings for the board id or board by name - :param :class:` ` board_card_settings_to_save: - :param :class:` ` team_context: The team context for the operation + [Preview API] Update board card settings for the board id or board by name + :param :class:` ` board_card_settings_to_save: + :param :class:` ` team_context: The team context for the operation :param str board: - :rtype: :class:` ` + :rtype: :class:` ` """ project = None team = None @@ -677,16 +677,16 @@ def update_board_card_settings(self, board_card_settings_to_save, team_context, content = self._serialize.body(board_card_settings_to_save, 'BoardCardSettings') response = self._send(http_method='PUT', location_id='07c3b467-bc60-4f05-8e34-599ce288fafc', - version='7.0', + version='7.2-preview.2', route_values=route_values, content=content) return self._deserialize('BoardCardSettings', response) def update_taskboard_card_settings(self, board_card_settings_to_save, team_context): """UpdateTaskboardCardSettings. - Update taskboard card settings - :param :class:` ` board_card_settings_to_save: - :param :class:` ` team_context: The team context for the operation + [Preview API] Update taskboard card settings + :param :class:` ` board_card_settings_to_save: + :param :class:` ` team_context: The team context for the operation """ project = None team = None @@ -708,16 +708,17 @@ def update_taskboard_card_settings(self, board_card_settings_to_save, team_conte content = self._serialize.body(board_card_settings_to_save, 'BoardCardSettings') self._send(http_method='PUT', location_id='0d63745f-31f3-4cf3-9056-2a064e567637', - version='7.0', + version='7.2-preview.2', route_values=route_values, content=content) - def get_board_columns(self, team_context, board): - """GetBoardColumns. - Get columns on a board - :param :class:` ` team_context: The team context for the operation - :param str board: Name or ID of the specific board - :rtype: [BoardColumn] + def get_board_chart(self, team_context, board, name): + """GetBoardChart. + [Preview API] Get a board chart + :param :class:` ` team_context: The team context for the operation + :param str board: Identifier for board, either board's backlog level name (Eg:"Stories") or Id + :param str name: The chart name + :rtype: :class:` ` """ project = None team = None @@ -738,19 +739,20 @@ def get_board_columns(self, team_context, board): route_values['team'] = self._serialize.url('team', team, 'string') if board is not None: route_values['board'] = self._serialize.url('board', board, 'str') + if name is not None: + route_values['name'] = self._serialize.url('name', name, 'str') response = self._send(http_method='GET', - location_id='c555d7ff-84e1-47df-9923-a3fe0cd8751b', - version='7.0', + location_id='45fe888c-239e-49fd-958c-df1a1ab21d97', + version='7.2-preview.1', route_values=route_values) - return self._deserialize('[BoardColumn]', self._unwrap_collection(response)) + return self._deserialize('BoardChart', response) - def update_board_columns(self, board_columns, team_context, board): - """UpdateBoardColumns. - Update columns on a board - :param [BoardColumn] board_columns: List of board columns to update - :param :class:` ` team_context: The team context for the operation - :param str board: Name or ID of the specific board - :rtype: [BoardColumn] + def get_board_charts(self, team_context, board): + """GetBoardCharts. + [Preview API] Get board charts + :param :class:` ` team_context: The team context for the operation + :param str board: Identifier for board, either board's backlog level name (Eg:"Stories") or Id + :rtype: [BoardChartReference] """ project = None team = None @@ -771,50 +773,20 @@ def update_board_columns(self, board_columns, team_context, board): route_values['team'] = self._serialize.url('team', team, 'string') if board is not None: route_values['board'] = self._serialize.url('board', board, 'str') - content = self._serialize.body(board_columns, '[BoardColumn]') - response = self._send(http_method='PUT', - location_id='c555d7ff-84e1-47df-9923-a3fe0cd8751b', - version='7.0', - route_values=route_values, - content=content) - return self._deserialize('[BoardColumn]', self._unwrap_collection(response)) - - def get_delivery_timeline_data(self, project, id, revision=None, start_date=None, end_date=None): - """GetDeliveryTimelineData. - Get Delivery View Data - :param str project: Project ID or project name - :param str id: Identifier for delivery view - :param int revision: Revision of the plan for which you want data. If the current plan is a different revision you will get an ViewRevisionMismatchException exception. If you do not supply a revision you will get data for the latest revision. - :param datetime start_date: The start date of timeline - :param datetime end_date: The end date of timeline - :rtype: :class:` ` - """ - route_values = {} - if project is not None: - route_values['project'] = self._serialize.url('project', project, 'str') - if id is not None: - route_values['id'] = self._serialize.url('id', id, 'str') - query_parameters = {} - if revision is not None: - query_parameters['revision'] = self._serialize.query('revision', revision, 'int') - if start_date is not None: - query_parameters['startDate'] = self._serialize.query('start_date', start_date, 'iso-8601') - if end_date is not None: - query_parameters['endDate'] = self._serialize.query('end_date', end_date, 'iso-8601') response = self._send(http_method='GET', - location_id='bdd0834e-101f-49f0-a6ae-509f384a12b4', - version='7.0', - route_values=route_values, - query_parameters=query_parameters) - return self._deserialize('DeliveryViewData', response) + location_id='45fe888c-239e-49fd-958c-df1a1ab21d97', + version='7.2-preview.1', + route_values=route_values) + return self._deserialize('[BoardChartReference]', self._unwrap_collection(response)) - def get_board_chart(self, team_context, board, name): - """GetBoardChart. - Get a board chart - :param :class:` ` team_context: The team context for the operation + def update_board_chart(self, chart, team_context, board, name): + """UpdateBoardChart. + [Preview API] Update a board chart + :param :class:` ` chart: + :param :class:` ` team_context: The team context for the operation :param str board: Identifier for board, either board's backlog level name (Eg:"Stories") or Id :param str name: The chart name - :rtype: :class:` ` + :rtype: :class:` ` """ project = None team = None @@ -837,18 +809,20 @@ def get_board_chart(self, team_context, board, name): route_values['board'] = self._serialize.url('board', board, 'str') if name is not None: route_values['name'] = self._serialize.url('name', name, 'str') - response = self._send(http_method='GET', + content = self._serialize.body(chart, 'BoardChart') + response = self._send(http_method='PATCH', location_id='45fe888c-239e-49fd-958c-df1a1ab21d97', - version='7.0', - route_values=route_values) + version='7.2-preview.1', + route_values=route_values, + content=content) return self._deserialize('BoardChart', response) - def get_board_charts(self, team_context, board): - """GetBoardCharts. - Get board charts - :param :class:` ` team_context: The team context for the operation - :param str board: Identifier for board, either board's backlog level name (Eg:"Stories") or Id - :rtype: [BoardChartReference] + def get_board_columns(self, team_context, board): + """GetBoardColumns. + [Preview API] Get columns on a board + :param :class:` ` team_context: The team context for the operation + :param str board: Name or ID of the specific board + :rtype: [BoardColumn] """ project = None team = None @@ -870,19 +844,18 @@ def get_board_charts(self, team_context, board): if board is not None: route_values['board'] = self._serialize.url('board', board, 'str') response = self._send(http_method='GET', - location_id='45fe888c-239e-49fd-958c-df1a1ab21d97', - version='7.0', + location_id='c555d7ff-84e1-47df-9923-a3fe0cd8751b', + version='7.2-preview.1', route_values=route_values) - return self._deserialize('[BoardChartReference]', self._unwrap_collection(response)) + return self._deserialize('[BoardColumn]', self._unwrap_collection(response)) - def update_board_chart(self, chart, team_context, board, name): - """UpdateBoardChart. - Update a board chart - :param :class:` ` chart: - :param :class:` ` team_context: The team context for the operation - :param str board: Identifier for board, either board's backlog level name (Eg:"Stories") or Id - :param str name: The chart name - :rtype: :class:` ` + def update_board_columns(self, board_columns, team_context, board): + """UpdateBoardColumns. + [Preview API] Update columns on a board + :param [BoardColumn] board_columns: List of board columns to update + :param :class:` ` team_context: The team context for the operation + :param str board: Name or ID of the specific board + :rtype: [BoardColumn] """ project = None team = None @@ -903,22 +876,49 @@ def update_board_chart(self, chart, team_context, board, name): route_values['team'] = self._serialize.url('team', team, 'string') if board is not None: route_values['board'] = self._serialize.url('board', board, 'str') - if name is not None: - route_values['name'] = self._serialize.url('name', name, 'str') - content = self._serialize.body(chart, 'BoardChart') - response = self._send(http_method='PATCH', - location_id='45fe888c-239e-49fd-958c-df1a1ab21d97', - version='7.0', + content = self._serialize.body(board_columns, '[BoardColumn]') + response = self._send(http_method='PUT', + location_id='c555d7ff-84e1-47df-9923-a3fe0cd8751b', + version='7.2-preview.1', route_values=route_values, content=content) - return self._deserialize('BoardChart', response) + return self._deserialize('[BoardColumn]', self._unwrap_collection(response)) + + def get_delivery_timeline_data(self, project, id, revision=None, start_date=None, end_date=None): + """GetDeliveryTimelineData. + [Preview API] Get Delivery View Data + :param str project: Project ID or project name + :param str id: Identifier for delivery view + :param int revision: Revision of the plan for which you want data. If the current plan is a different revision you will get an ViewRevisionMismatchException exception. If you do not supply a revision you will get data for the latest revision. + :param datetime start_date: The start date of timeline + :param datetime end_date: The end date of timeline + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'str') + query_parameters = {} + if revision is not None: + query_parameters['revision'] = self._serialize.query('revision', revision, 'int') + if start_date is not None: + query_parameters['startDate'] = self._serialize.query('start_date', start_date, 'iso-8601') + if end_date is not None: + query_parameters['endDate'] = self._serialize.query('end_date', end_date, 'iso-8601') + response = self._send(http_method='GET', + location_id='bdd0834e-101f-49f0-a6ae-509f384a12b4', + version='7.2-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('DeliveryViewData', response) def get_total_iteration_capacities(self, project, iteration_id): """GetTotalIterationCapacities. - Get an iteration's capacity for all teams in iteration + [Preview API] Get an iteration's capacity for all teams in iteration :param str project: Project ID or project name :param str iteration_id: ID of the iteration - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -927,14 +927,14 @@ def get_total_iteration_capacities(self, project, iteration_id): route_values['iterationId'] = self._serialize.url('iteration_id', iteration_id, 'str') response = self._send(http_method='GET', location_id='1e385ce0-396b-4273-8171-d64562c18d37', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('IterationCapacity', response) def delete_team_iteration(self, team_context, id): """DeleteTeamIteration. - Delete a team's iteration by iterationId - :param :class:` ` team_context: The team context for the operation + [Preview API] Delete a team's iteration by iterationId + :param :class:` ` team_context: The team context for the operation :param str id: ID of the iteration """ project = None @@ -958,15 +958,15 @@ def delete_team_iteration(self, team_context, id): route_values['id'] = self._serialize.url('id', id, 'str') self._send(http_method='DELETE', location_id='c9175577-28a1-4b06-9197-8636af9f64ad', - version='7.0', + version='7.2-preview.1', route_values=route_values) def get_team_iteration(self, team_context, id): """GetTeamIteration. - Get team's iteration by iterationId - :param :class:` ` team_context: The team context for the operation + [Preview API] Get team's iteration by iterationId + :param :class:` ` team_context: The team context for the operation :param str id: ID of the iteration - :rtype: :class:` ` + :rtype: :class:` ` """ project = None team = None @@ -989,14 +989,14 @@ def get_team_iteration(self, team_context, id): route_values['id'] = self._serialize.url('id', id, 'str') response = self._send(http_method='GET', location_id='c9175577-28a1-4b06-9197-8636af9f64ad', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('TeamSettingsIteration', response) def get_team_iterations(self, team_context, timeframe=None): """GetTeamIterations. - Get a team's iterations using timeframe filter - :param :class:` ` team_context: The team context for the operation + [Preview API] Get a team's iterations using timeframe filter + :param :class:` ` team_context: The team context for the operation :param str timeframe: A filter for which iterations are returned based on relative time. Only Current is supported currently. :rtype: [TeamSettingsIteration] """ @@ -1022,17 +1022,17 @@ def get_team_iterations(self, team_context, timeframe=None): query_parameters['$timeframe'] = self._serialize.query('timeframe', timeframe, 'str') response = self._send(http_method='GET', location_id='c9175577-28a1-4b06-9197-8636af9f64ad', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TeamSettingsIteration]', self._unwrap_collection(response)) def post_team_iteration(self, iteration, team_context): """PostTeamIteration. - Add an iteration to the team - :param :class:` ` iteration: Iteration to add - :param :class:` ` team_context: The team context for the operation - :rtype: :class:` ` + [Preview API] Add an iteration to the team + :param :class:` ` iteration: Iteration to add + :param :class:` ` team_context: The team context for the operation + :rtype: :class:` ` """ project = None team = None @@ -1054,17 +1054,17 @@ def post_team_iteration(self, iteration, team_context): content = self._serialize.body(iteration, 'TeamSettingsIteration') response = self._send(http_method='POST', location_id='c9175577-28a1-4b06-9197-8636af9f64ad', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('TeamSettingsIteration', response) def create_plan(self, posted_plan, project): """CreatePlan. - Add a new plan for the team - :param :class:` ` posted_plan: Plan definition + [Preview API] Add a new plan for the team + :param :class:` ` posted_plan: Plan definition :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -1072,14 +1072,14 @@ def create_plan(self, posted_plan, project): content = self._serialize.body(posted_plan, 'CreatePlan') response = self._send(http_method='POST', location_id='0b42cb47-cd73-4810-ac90-19c9ba147453', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('Plan', response) def delete_plan(self, project, id): """DeletePlan. - Delete the specified plan + [Preview API] Delete the specified plan :param str project: Project ID or project name :param str id: Identifier of the plan """ @@ -1090,15 +1090,15 @@ def delete_plan(self, project, id): route_values['id'] = self._serialize.url('id', id, 'str') self._send(http_method='DELETE', location_id='0b42cb47-cd73-4810-ac90-19c9ba147453', - version='7.0', + version='7.2-preview.1', route_values=route_values) def get_plan(self, project, id): """GetPlan. - Get the information for the specified plan + [Preview API] Get the information for the specified plan :param str project: Project ID or project name :param str id: Identifier of the plan - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -1107,13 +1107,13 @@ def get_plan(self, project, id): route_values['id'] = self._serialize.url('id', id, 'str') response = self._send(http_method='GET', location_id='0b42cb47-cd73-4810-ac90-19c9ba147453', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('Plan', response) def get_plans(self, project): """GetPlans. - Get the information for all the plans configured for the given team + [Preview API] Get the information for all the plans configured for the given team :param str project: Project ID or project name :rtype: [Plan] """ @@ -1122,17 +1122,17 @@ def get_plans(self, project): route_values['project'] = self._serialize.url('project', project, 'str') response = self._send(http_method='GET', location_id='0b42cb47-cd73-4810-ac90-19c9ba147453', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('[Plan]', self._unwrap_collection(response)) def update_plan(self, updated_plan, project, id): """UpdatePlan. - Update the information for the specified plan - :param :class:` ` updated_plan: Plan definition to be updated + [Preview API] Update the information for the specified plan + :param :class:` ` updated_plan: Plan definition to be updated :param str project: Project ID or project name :param str id: Identifier of the plan - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -1142,30 +1142,30 @@ def update_plan(self, updated_plan, project, id): content = self._serialize.body(updated_plan, 'UpdatePlan') response = self._send(http_method='PUT', location_id='0b42cb47-cd73-4810-ac90-19c9ba147453', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('Plan', response) def get_process_configuration(self, project): """GetProcessConfiguration. - Get process configuration + [Preview API] Get process configuration :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') response = self._send(http_method='GET', location_id='f901ba42-86d2-4b0c-89c1-3f86d06daa84', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('ProcessConfiguration', response) def get_board_rows(self, team_context, board): """GetBoardRows. - Get rows on a board - :param :class:` ` team_context: The team context for the operation + [Preview API] Get rows on a board + :param :class:` ` team_context: The team context for the operation :param str board: Name or ID of the specific board :rtype: [BoardRow] """ @@ -1190,15 +1190,15 @@ def get_board_rows(self, team_context, board): route_values['board'] = self._serialize.url('board', board, 'str') response = self._send(http_method='GET', location_id='0863355d-aefd-4d63-8669-984c9b7b0e78', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('[BoardRow]', self._unwrap_collection(response)) def update_board_rows(self, board_rows, team_context, board): """UpdateBoardRows. - Update rows on a board + [Preview API] Update rows on a board :param [BoardRow] board_rows: List of board rows to update - :param :class:` ` team_context: The team context for the operation + :param :class:` ` team_context: The team context for the operation :param str board: Name or ID of the specific board :rtype: [BoardRow] """ @@ -1224,15 +1224,16 @@ def update_board_rows(self, board_rows, team_context, board): content = self._serialize.body(board_rows, '[BoardRow]') response = self._send(http_method='PUT', location_id='0863355d-aefd-4d63-8669-984c9b7b0e78', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('[BoardRow]', self._unwrap_collection(response)) def get_columns(self, team_context): """GetColumns. - :param :class:` ` team_context: The team context for the operation - :rtype: :class:` ` + [Preview API] + :param :class:` ` team_context: The team context for the operation + :rtype: :class:` ` """ project = None team = None @@ -1253,15 +1254,16 @@ def get_columns(self, team_context): route_values['team'] = self._serialize.url('team', team, 'string') response = self._send(http_method='GET', location_id='c6815dbe-8e7e-4ffe-9a79-e83ee712aa92', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('TaskboardColumns', response) def update_columns(self, update_columns, team_context): """UpdateColumns. + [Preview API] :param [UpdateTaskboardColumn] update_columns: - :param :class:` ` team_context: The team context for the operation - :rtype: :class:` ` + :param :class:` ` team_context: The team context for the operation + :rtype: :class:` ` """ project = None team = None @@ -1283,14 +1285,15 @@ def update_columns(self, update_columns, team_context): content = self._serialize.body(update_columns, '[UpdateTaskboardColumn]') response = self._send(http_method='PUT', location_id='c6815dbe-8e7e-4ffe-9a79-e83ee712aa92', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('TaskboardColumns', response) def get_work_item_columns(self, team_context, iteration_id): """GetWorkItemColumns. - :param :class:` ` team_context: The team context for the operation + [Preview API] + :param :class:` ` team_context: The team context for the operation :param str iteration_id: :rtype: [TaskboardWorkItemColumn] """ @@ -1315,14 +1318,15 @@ def get_work_item_columns(self, team_context, iteration_id): route_values['iterationId'] = self._serialize.url('iteration_id', iteration_id, 'str') response = self._send(http_method='GET', location_id='1be23c36-8872-4abc-b57d-402cd6c669d9', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('[TaskboardWorkItemColumn]', self._unwrap_collection(response)) def update_work_item_column(self, update_column, team_context, iteration_id, work_item_id): """UpdateWorkItemColumn. - :param :class:` ` update_column: - :param :class:` ` team_context: The team context for the operation + [Preview API] + :param :class:` ` update_column: + :param :class:` ` team_context: The team context for the operation :param str iteration_id: :param int work_item_id: """ @@ -1350,16 +1354,16 @@ def update_work_item_column(self, update_column, team_context, iteration_id, wor content = self._serialize.body(update_column, 'UpdateTaskboardWorkItemColumn') self._send(http_method='PATCH', location_id='1be23c36-8872-4abc-b57d-402cd6c669d9', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) def get_team_days_off(self, team_context, iteration_id): """GetTeamDaysOff. - Get team's days off for an iteration - :param :class:` ` team_context: The team context for the operation + [Preview API] Get team's days off for an iteration + :param :class:` ` team_context: The team context for the operation :param str iteration_id: ID of the iteration - :rtype: :class:` ` + :rtype: :class:` ` """ project = None team = None @@ -1382,17 +1386,17 @@ def get_team_days_off(self, team_context, iteration_id): route_values['iterationId'] = self._serialize.url('iteration_id', iteration_id, 'str') response = self._send(http_method='GET', location_id='2d4faa2e-9150-4cbf-a47a-932b1b4a0773', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('TeamSettingsDaysOff', response) def update_team_days_off(self, days_off_patch, team_context, iteration_id): """UpdateTeamDaysOff. - Set a team's days off for an iteration - :param :class:` ` days_off_patch: Team's days off patch containing a list of start and end dates - :param :class:` ` team_context: The team context for the operation + [Preview API] Set a team's days off for an iteration + :param :class:` ` days_off_patch: Team's days off patch containing a list of start and end dates + :param :class:` ` team_context: The team context for the operation :param str iteration_id: ID of the iteration - :rtype: :class:` ` + :rtype: :class:` ` """ project = None team = None @@ -1416,16 +1420,16 @@ def update_team_days_off(self, days_off_patch, team_context, iteration_id): content = self._serialize.body(days_off_patch, 'TeamSettingsDaysOffPatch') response = self._send(http_method='PATCH', location_id='2d4faa2e-9150-4cbf-a47a-932b1b4a0773', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('TeamSettingsDaysOff', response) def get_team_field_values(self, team_context): """GetTeamFieldValues. - Get a collection of team field values - :param :class:` ` team_context: The team context for the operation - :rtype: :class:` ` + [Preview API] Get a collection of team field values + :param :class:` ` team_context: The team context for the operation + :rtype: :class:` ` """ project = None team = None @@ -1446,16 +1450,16 @@ def get_team_field_values(self, team_context): route_values['team'] = self._serialize.url('team', team, 'string') response = self._send(http_method='GET', location_id='07ced576-58ed-49e6-9c1e-5cb53ab8bf2a', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('TeamFieldValues', response) def update_team_field_values(self, patch, team_context): """UpdateTeamFieldValues. - Update team field values - :param :class:` ` patch: - :param :class:` ` team_context: The team context for the operation - :rtype: :class:` ` + [Preview API] Update team field values + :param :class:` ` patch: + :param :class:` ` team_context: The team context for the operation + :rtype: :class:` ` """ project = None team = None @@ -1477,16 +1481,16 @@ def update_team_field_values(self, patch, team_context): content = self._serialize.body(patch, 'TeamFieldValuesPatch') response = self._send(http_method='PATCH', location_id='07ced576-58ed-49e6-9c1e-5cb53ab8bf2a', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('TeamFieldValues', response) def get_team_settings(self, team_context): """GetTeamSettings. - Get a team's settings - :param :class:` ` team_context: The team context for the operation - :rtype: :class:` ` + [Preview API] Get a team's settings + :param :class:` ` team_context: The team context for the operation + :rtype: :class:` ` """ project = None team = None @@ -1507,16 +1511,16 @@ def get_team_settings(self, team_context): route_values['team'] = self._serialize.url('team', team, 'string') response = self._send(http_method='GET', location_id='c3c1012b-bea7-49d7-b45e-1664e566f84c', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('TeamSetting', response) def update_team_settings(self, team_settings_patch, team_context): """UpdateTeamSettings. - Update a team's settings - :param :class:` ` team_settings_patch: TeamSettings changes - :param :class:` ` team_context: The team context for the operation - :rtype: :class:` ` + [Preview API] Update a team's settings + :param :class:` ` team_settings_patch: TeamSettings changes + :param :class:` ` team_context: The team context for the operation + :rtype: :class:` ` """ project = None team = None @@ -1538,17 +1542,17 @@ def update_team_settings(self, team_settings_patch, team_context): content = self._serialize.body(team_settings_patch, 'TeamSettingsPatch') response = self._send(http_method='PATCH', location_id='c3c1012b-bea7-49d7-b45e-1664e566f84c', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('TeamSetting', response) def get_iteration_work_items(self, team_context, iteration_id): """GetIterationWorkItems. - Get work items for iteration - :param :class:` ` team_context: The team context for the operation + [Preview API] Get work items for iteration + :param :class:` ` team_context: The team context for the operation :param str iteration_id: ID of the iteration - :rtype: :class:` ` + :rtype: :class:` ` """ project = None team = None @@ -1571,15 +1575,15 @@ def get_iteration_work_items(self, team_context, iteration_id): route_values['iterationId'] = self._serialize.url('iteration_id', iteration_id, 'str') response = self._send(http_method='GET', location_id='5b3ef1a6-d3ab-44cd-bafd-c7f45db850fa', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('IterationWorkItems', response) def reorder_backlog_work_items(self, operation, team_context): """ReorderBacklogWorkItems. - Reorder Product Backlog/Boards Work Items - :param :class:` ` operation: - :param :class:` ` team_context: The team context for the operation + [Preview API] Reorder Product Backlog/Boards Work Items + :param :class:` ` operation: + :param :class:` ` team_context: The team context for the operation :rtype: [ReorderResult] """ project = None @@ -1602,16 +1606,16 @@ def reorder_backlog_work_items(self, operation, team_context): content = self._serialize.body(operation, 'ReorderOperation') response = self._send(http_method='PATCH', location_id='1c22b714-e7e4-41b9-85e0-56ee13ef55ed', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('[ReorderResult]', self._unwrap_collection(response)) def reorder_iteration_work_items(self, operation, team_context, iteration_id): """ReorderIterationWorkItems. - Reorder Sprint Backlog/Taskboard Work Items - :param :class:` ` operation: - :param :class:` ` team_context: The team context for the operation + [Preview API] Reorder Sprint Backlog/Taskboard Work Items + :param :class:` ` operation: + :param :class:` ` team_context: The team context for the operation :param str iteration_id: The id of the iteration :rtype: [ReorderResult] """ @@ -1637,7 +1641,7 @@ def reorder_iteration_work_items(self, operation, team_context, iteration_id): content = self._serialize.body(operation, 'ReorderOperation') response = self._send(http_method='PATCH', location_id='47755db2-d7eb-405a-8c25-675401525fc9', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('[ReorderResult]', self._unwrap_collection(response)) diff --git a/azure-devops/azure/devops/v7_0/work_item_tracking/__init__.py b/azure-devops/azure/devops/v7_2/work_item_tracking/__init__.py similarity index 90% rename from azure-devops/azure/devops/v7_0/work_item_tracking/__init__.py rename to azure-devops/azure/devops/v7_2/work_item_tracking/__init__.py index 6ed6dec4..3095fbe8 100644 --- a/azure-devops/azure/devops/v7_0/work_item_tracking/__init__.py +++ b/azure-devops/azure/devops/v7_2/work_item_tracking/__init__.py @@ -31,6 +31,10 @@ 'ExternalEnvironment', 'ExternalPipeline', 'FieldDependentRule', + 'FieldUpdate', + 'GitHubConnectionModel', + 'GitHubConnectionRepoModel', + 'GitHubConnectionReposBatchRequest', 'GraphSubjectBase', 'IdentityRef', 'IdentityReference', @@ -51,6 +55,8 @@ 'SendMailBody', 'StreamedBatch', 'TeamContext', + 'TemporaryQueryRequestModel', + 'TemporaryQueryResponseModel', 'UpdateWorkItemField', 'Wiql', 'WorkArtifactLink', @@ -61,10 +67,14 @@ 'WorkItemComments', 'WorkItemCommentVersionRef', 'WorkItemDelete', + 'WorkItemDeleteBatch', + 'WorkItemDeleteBatchRequest', 'WorkItemDeleteReference', 'WorkItemDeleteShallowReference', 'WorkItemDeleteUpdate', 'WorkItemField', + 'WorkItemField2', + 'WorkItemFieldAllowedValues', 'WorkItemFieldOperation', 'WorkItemFieldReference', 'WorkItemFieldUpdate', @@ -99,5 +109,6 @@ 'WorkItemTypeTemplate', 'WorkItemTypeTemplateUpdateModel', 'WorkItemUpdate', + 'WorkItemUpdate2', 'WorkItemTrackingClient' ] diff --git a/azure-devops/azure/devops/v7_0/work_item_tracking/models.py b/azure-devops/azure/devops/v7_2/work_item_tracking/models.py similarity index 84% rename from azure-devops/azure/devops/v7_0/work_item_tracking/models.py rename to azure-devops/azure/devops/v7_2/work_item_tracking/models.py index 51b646d7..38b122fa 100644 --- a/azure-devops/azure/devops/v7_0/work_item_tracking/models.py +++ b/azure-devops/azure/devops/v7_2/work_item_tracking/models.py @@ -14,7 +14,7 @@ class AccountMyWorkResult(Model): :param query_size_limit_exceeded: True, when length of WorkItemDetails is same as the limit :type query_size_limit_exceeded: bool :param work_item_details: WorkItem Details - :type work_item_details: list of :class:`AccountWorkWorkItemModel ` + :type work_item_details: list of :class:`AccountWorkWorkItemModel ` """ _attribute_map = { @@ -278,11 +278,11 @@ class ExternalDeployment(Model): :param display_name: :type display_name: str :param environment: - :type environment: :class:`ExternalEnvironment ` + :type environment: :class:`ExternalEnvironment ` :param group: :type group: str :param pipeline: - :type pipeline: :class:`ExternalPipeline ` + :type pipeline: :class:`ExternalPipeline ` :param related_work_item_ids: :type related_work_item_ids: list of int :param run_id: @@ -376,10 +376,106 @@ def __init__(self, display_name=None, id=None, url=None): self.url = url +class FieldUpdate(Model): + """ + Describes an update request for a work item field. + + :param is_deleted: Indicates whether the user wants to restore the field. + :type is_deleted: bool + :param is_locked: Indicates whether the user wants to lock the field. + :type is_locked: bool + """ + + _attribute_map = { + 'is_deleted': {'key': 'isDeleted', 'type': 'bool'}, + 'is_locked': {'key': 'isLocked', 'type': 'bool'} + } + + def __init__(self, is_deleted=None, is_locked=None): + super(FieldUpdate, self).__init__() + self.is_deleted = is_deleted + self.is_locked = is_locked + + +class GitHubConnectionModel(Model): + """ + Describes Github connection. + + :param authorization_type: Github connection authorization type (f. e. PAT, OAuth) + :type authorization_type: str + :param created_by: Github connection created by + :type created_by: :class:`IdentityRef ` + :param id: Github connection id + :type id: str + :param is_connection_valid: Whether current Github connection is valid or not + :type is_connection_valid: bool + :param name: Github connection name (should contain organization/user name) + :type name: str + """ + + _attribute_map = { + 'authorization_type': {'key': 'authorizationType', 'type': 'str'}, + 'created_by': {'key': 'createdBy', 'type': 'IdentityRef'}, + 'id': {'key': 'id', 'type': 'str'}, + 'is_connection_valid': {'key': 'isConnectionValid', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, authorization_type=None, created_by=None, id=None, is_connection_valid=None, name=None): + super(GitHubConnectionModel, self).__init__() + self.authorization_type = authorization_type + self.created_by = created_by + self.id = id + self.is_connection_valid = is_connection_valid + self.name = name + + +class GitHubConnectionRepoModel(Model): + """ + Describes Github connection's repo. + + :param error_message: Error message + :type error_message: str + :param git_hub_repository_url: Repository web url + :type git_hub_repository_url: str + """ + + _attribute_map = { + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'git_hub_repository_url': {'key': 'gitHubRepositoryUrl', 'type': 'str'} + } + + def __init__(self, error_message=None, git_hub_repository_url=None): + super(GitHubConnectionRepoModel, self).__init__() + self.error_message = error_message + self.git_hub_repository_url = git_hub_repository_url + + +class GitHubConnectionReposBatchRequest(Model): + """ + Describes Github connection's repo bulk request + + :param git_hub_repository_urls: Requested repos urls + :type git_hub_repository_urls: list of :class:`GitHubConnectionRepoModel ` + :param operation_type: Operation type (f. e. add, remove) + :type operation_type: str + """ + + _attribute_map = { + 'git_hub_repository_urls': {'key': 'gitHubRepositoryUrls', 'type': '[GitHubConnectionRepoModel]'}, + 'operation_type': {'key': 'operationType', 'type': 'str'} + } + + def __init__(self, git_hub_repository_urls=None, operation_type=None): + super(GitHubConnectionReposBatchRequest, self).__init__() + self.git_hub_repository_urls = git_hub_repository_urls + self.operation_type = operation_type + + class GraphSubjectBase(Model): """ :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. :type descriptor: str :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. @@ -406,7 +502,7 @@ def __init__(self, _links=None, descriptor=None, display_name=None, url=None): class IdentityRef(GraphSubjectBase): """ :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. :type descriptor: str :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. @@ -467,7 +563,7 @@ class IdentityReference(IdentityRef): Describes a reference to an identity. :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. :type descriptor: str :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. @@ -490,7 +586,7 @@ class IdentityReference(IdentityRef): :type profile_url: str :param unique_name: Deprecated - use Domain+PrincipalName instead :type unique_name: str - :param id: + :param id: Gets or sets the identifier of the identity. :type id: str :param name: Legacy back-compat property. This has been the WIT specific value from Constants. Will be hidden (but exists) on the client unless they are targeting the newest version :type name: str @@ -578,17 +674,17 @@ class MailMessage(Model): :param body: The mail body in HTML format. :type body: str :param cc: CC recipients. - :type cc: :class:`EmailRecipients ` + :type cc: :class:`EmailRecipients ` :param in_reply_to: The in-reply-to header value :type in_reply_to: str :param message_id: The Message Id value :type message_id: str :param reply_to: Reply To recipients. - :type reply_to: :class:`EmailRecipients ` + :type reply_to: :class:`EmailRecipients ` :param subject: The mail subject. :type subject: str :param to: To recipients - :type to: :class:`EmailRecipients ` + :type to: :class:`EmailRecipients ` """ _attribute_map = { @@ -657,7 +753,7 @@ class ProjectWorkItemStateColors(Model): :param project_name: Project name :type project_name: str :param work_item_type_state_colors: State colors for all work item type in a project - :type work_item_type_state_colors: list of :class:`WorkItemTypeStateColors ` + :type work_item_type_state_colors: list of :class:`WorkItemTypeStateColors ` """ _attribute_map = { @@ -720,7 +816,7 @@ class QueryHierarchyItemsResult(Model): :param has_more: Indicates if the max return limit was hit but there are still more items :type has_more: bool :param value: The list of items - :type value: list of :class:`QueryHierarchyItem ` + :type value: list of :class:`QueryHierarchyItem ` """ _attribute_map = { @@ -797,7 +893,7 @@ class SendMailBody(Model): :param ids: :type ids: list of int :param message: - :type message: :class:`MailMessage ` + :type message: :class:`MailMessage ` :param persistence_id: :type persistence_id: str :param project_id: @@ -891,6 +987,23 @@ def __init__(self, project=None, project_id=None, team=None, team_id=None): self.team_id = team_id +class TemporaryQueryResponseModel(Model): + """ + The result of a temporary query creation. + + :param id: The id of the temporary query item. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'} + } + + def __init__(self, id=None): + super(TemporaryQueryResponseModel, self).__init__() + self.id = id + + class UpdateWorkItemField(Model): """ Describes an update request for a work item field. @@ -983,6 +1096,48 @@ def __init__(self, expand=None, as_of=None, error_policy=None, fields=None, ids= self.ids = ids +class WorkItemDeleteBatch(Model): + """ + Describes response to delete a set of work items. + + :param results: List of results for each work item + :type results: list of :class:`WorkItemDelete ` + """ + + _attribute_map = { + 'results': {'key': 'results', 'type': '[WorkItemDelete]'} + } + + def __init__(self, results=None): + super(WorkItemDeleteBatch, self).__init__() + self.results = results + + +class WorkItemDeleteBatchRequest(Model): + """ + Describes a request to delete a set of work items + + :param destroy: Optional parameter, if set to true, the work item is deleted permanently. Please note: the destroy action is PERMANENT and cannot be undone. + :type destroy: bool + :param ids: The requested work item ids + :type ids: list of int + :param skip_notifications: Optional parameter, if set to true, notifications will be disabled. + :type skip_notifications: bool + """ + + _attribute_map = { + 'destroy': {'key': 'destroy', 'type': 'bool'}, + 'ids': {'key': 'ids', 'type': '[int]'}, + 'skip_notifications': {'key': 'skipNotifications', 'type': 'bool'} + } + + def __init__(self, destroy=None, ids=None, skip_notifications=None): + super(WorkItemDeleteBatchRequest, self).__init__() + self.destroy = destroy + self.ids = ids + self.skip_notifications = skip_notifications + + class WorkItemDeleteReference(Model): """ Reference to a deleted work item. @@ -1070,6 +1225,27 @@ def __init__(self, is_deleted=None): self.is_deleted = is_deleted +class WorkItemFieldAllowedValues(Model): + """ + Describes the list of allowed values of the field. + + :param allowed_values: The list of field allowed values. + :type allowed_values: list of str + :param field_name: Name of the field. + :type field_name: str + """ + + _attribute_map = { + 'allowed_values': {'key': 'allowedValues', 'type': '[str]'}, + 'field_name': {'key': 'fieldName', 'type': 'str'} + } + + def __init__(self, allowed_values=None, field_name=None): + super(WorkItemFieldAllowedValues, self).__init__() + self.allowed_values = allowed_values + self.field_name = field_name + + class WorkItemFieldOperation(Model): """ Describes a work item field operation. @@ -1165,9 +1341,9 @@ class WorkItemLink(Model): :param rel: The type of link. :type rel: str :param source: The source work item. - :type source: :class:`WorkItemReference ` + :type source: :class:`WorkItemReference ` :param target: The target work item. - :type target: :class:`WorkItemReference ` + :type target: :class:`WorkItemReference ` """ _attribute_map = { @@ -1217,17 +1393,17 @@ class WorkItemQueryClause(Model): Represents a clause in a work item query. This shows the structure of a work item query. :param clauses: Child clauses if the current clause is a logical operator - :type clauses: list of :class:`WorkItemQueryClause ` + :type clauses: list of :class:`WorkItemQueryClause ` :param field: Field associated with condition - :type field: :class:`WorkItemFieldReference ` + :type field: :class:`WorkItemFieldReference ` :param field_value: Right side of the condition when a field to field comparison - :type field_value: :class:`WorkItemFieldReference ` + :type field_value: :class:`WorkItemFieldReference ` :param is_field_value: Determines if this is a field to field comparison :type is_field_value: bool :param logical_operator: Logical operator separating the condition clause :type logical_operator: object :param operator: The field operator - :type operator: :class:`WorkItemFieldOperation ` + :type operator: :class:`WorkItemFieldOperation ` :param value: Right side of the condition when a field to value comparison :type value: str """ @@ -1260,17 +1436,17 @@ class WorkItemQueryResult(Model): :param as_of: The date the query was run in the context of. :type as_of: datetime :param columns: The columns of the query. - :type columns: list of :class:`WorkItemFieldReference ` + :type columns: list of :class:`WorkItemFieldReference ` :param query_result_type: The result type :type query_result_type: object :param query_type: The type of the query :type query_type: object :param sort_columns: The sort columns of the query. - :type sort_columns: list of :class:`WorkItemQuerySortColumn ` + :type sort_columns: list of :class:`WorkItemQuerySortColumn ` :param work_item_relations: The work item links returned by the query. - :type work_item_relations: list of :class:`WorkItemLink ` + :type work_item_relations: list of :class:`WorkItemLink ` :param work_items: The work items returned by the query. - :type work_items: list of :class:`WorkItemReference ` + :type work_items: list of :class:`WorkItemReference ` """ _attribute_map = { @@ -1301,7 +1477,7 @@ class WorkItemQuerySortColumn(Model): :param descending: The direction to sort by. :type descending: bool :param field: A work item field. - :type field: :class:`WorkItemFieldReference ` + :type field: :class:`WorkItemFieldReference ` """ _attribute_map = { @@ -1361,11 +1537,11 @@ class WorkItemRelationUpdates(Model): Describes updates to a work item's relations. :param added: List of newly added relations. - :type added: list of :class:`WorkItemRelation ` + :type added: list of :class:`WorkItemRelation ` :param removed: List of removed relations. - :type removed: list of :class:`WorkItemRelation ` + :type removed: list of :class:`WorkItemRelation ` :param updated: List of updated relations. - :type updated: list of :class:`WorkItemRelation ` + :type updated: list of :class:`WorkItemRelation ` """ _attribute_map = { @@ -1431,6 +1607,8 @@ class WorkItemTagDefinition(Model): """ :param id: :type id: str + :param last_updated: + :type last_updated: datetime :param name: :type name: str :param url: @@ -1439,13 +1617,15 @@ class WorkItemTagDefinition(Model): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, + 'last_updated': {'key': 'lastUpdated', 'type': 'iso-8601'}, 'name': {'key': 'name', 'type': 'str'}, 'url': {'key': 'url', 'type': 'str'} } - def __init__(self, id=None, name=None, url=None): + def __init__(self, id=None, last_updated=None, name=None, url=None): super(WorkItemTagDefinition, self).__init__() self.id = id + self.last_updated = last_updated self.name = name self.url = url @@ -1454,7 +1634,7 @@ class WorkItemTrackingResourceReference(Model): """ Base class for work item tracking resource references. - :param url: + :param url: REST URL for the resource. :type url: str """ @@ -1494,12 +1674,14 @@ def __init__(self, primary_color=None, secondary_color=None, work_item_type_name class WorkItemTypeColorAndIcon(Model): """ - Describes work item type nam, its icon and color. + Describes work item type name, its icon and color. :param color: The color of the work item type in hex format. :type color: str :param icon: The work item type icon. :type icon: str + :param is_disabled: Indicates if the work item is disabled in the process. + :type is_disabled: bool :param work_item_type_name: The name of the work item type. :type work_item_type_name: str """ @@ -1507,13 +1689,15 @@ class WorkItemTypeColorAndIcon(Model): _attribute_map = { 'color': {'key': 'color', 'type': 'str'}, 'icon': {'key': 'icon', 'type': 'str'}, + 'is_disabled': {'key': 'isDisabled', 'type': 'bool'}, 'work_item_type_name': {'key': 'workItemTypeName', 'type': 'str'} } - def __init__(self, color=None, icon=None, work_item_type_name=None): + def __init__(self, color=None, icon=None, is_disabled=None, work_item_type_name=None): super(WorkItemTypeColorAndIcon, self).__init__() self.color = color self.icon = icon + self.is_disabled = is_disabled self.work_item_type_name = work_item_type_name @@ -1530,7 +1714,7 @@ class WorkItemTypeFieldInstanceBase(WorkItemFieldReference): :param always_required: Indicates whether field value is always required. :type always_required: bool :param dependent_fields: The list of dependent fields. - :type dependent_fields: list of :class:`WorkItemFieldReference ` + :type dependent_fields: list of :class:`WorkItemFieldReference ` :param help_text: Gets the help text for the field. :type help_text: str """ @@ -1564,7 +1748,7 @@ class WorkItemTypeFieldWithReferences(WorkItemTypeFieldInstanceBase): :param always_required: Indicates whether field value is always required. :type always_required: bool :param dependent_fields: The list of dependent fields. - :type dependent_fields: list of :class:`WorkItemFieldReference ` + :type dependent_fields: list of :class:`WorkItemFieldReference ` :param help_text: Gets the help text for the field. :type help_text: str :param allowed_values: The list of field allowed values. @@ -1594,7 +1778,7 @@ class WorkItemTypeReference(WorkItemTrackingResourceReference): """ Reference to a work item type. - :param url: + :param url: REST URL for the resource. :type url: str :param name: Name of the work item type. :type name: str @@ -1615,7 +1799,7 @@ class WorkItemTypeStateColors(Model): State colors for a work item type :param state_colors: Work item type state colors - :type state_colors: list of :class:`WorkItemStateColor ` + :type state_colors: list of :class:`WorkItemStateColor ` :param work_item_type_name: Work item type name :type work_item_type_name: str """ @@ -1744,7 +1928,7 @@ class AccountRecentActivityWorkItemModel2(AccountRecentActivityWorkItemModelBase :param work_item_type: Type of Work Item :type work_item_type: str :param assigned_to: Assigned To - :type assigned_to: :class:`IdentityRef ` + :type assigned_to: :class:`IdentityRef ` """ _attribute_map = { @@ -1791,7 +1975,7 @@ class WorkItemCommentVersionRef(WorkItemTrackingResourceReference): """ Represents the reference to a specific version of a comment on a Work Item. - :param url: + :param url: REST URL for the resource. :type url: str :param comment_id: The id assigned to the comment. :type comment_id: int @@ -1846,7 +2030,7 @@ class WorkItemDelete(WorkItemDeleteReference): :param url: REST API URL of the resource :type url: str :param resource: The work item object that was deleted. - :type resource: :class:`WorkItem ` + :type resource: :class:`WorkItem ` """ _attribute_map = { @@ -1871,10 +2055,10 @@ class WorkItemTrackingResource(WorkItemTrackingResourceReference): """ Base class for WIT REST resources. - :param url: + :param url: REST URL for the resource. :type url: str :param _links: Link references to related REST resources. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` """ _attribute_map = { @@ -1891,20 +2075,20 @@ class WorkItemType(WorkItemTrackingResource): """ Describes a work item type. - :param url: + :param url: REST URL for the resource. :type url: str :param _links: Link references to related REST resources. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param color: The color. :type color: str :param description: The description of the work item type. :type description: str :param field_instances: The fields that exist on the work item type. - :type field_instances: list of :class:`WorkItemTypeFieldInstance ` + :type field_instances: list of :class:`WorkItemTypeFieldInstance ` :param fields: The fields that exist on the work item type. - :type fields: list of :class:`WorkItemTypeFieldInstance ` + :type fields: list of :class:`WorkItemTypeFieldInstance ` :param icon: The icon of the work item type. - :type icon: :class:`WorkItemIcon ` + :type icon: :class:`WorkItemIcon ` :param is_disabled: True if work item type is disabled :type is_disabled: bool :param name: Gets the name of the work item type. @@ -1912,7 +2096,7 @@ class WorkItemType(WorkItemTrackingResource): :param reference_name: The reference name of the work item type. :type reference_name: str :param states: Gets state information for the work item type. - :type states: list of :class:`WorkItemStateColor ` + :type states: list of :class:`WorkItemStateColor ` :param transitions: Gets the various state transition mappings in the work item type. :type transitions: dict :param xml_form: The XML form. @@ -1954,18 +2138,18 @@ class WorkItemTypeCategory(WorkItemTrackingResource): """ Describes a work item type category. - :param url: + :param url: REST URL for the resource. :type url: str :param _links: Link references to related REST resources. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param default_work_item_type: Gets or sets the default type of the work item. - :type default_work_item_type: :class:`WorkItemTypeReference ` + :type default_work_item_type: :class:`WorkItemTypeReference ` :param name: The name of the category. :type name: str :param reference_name: The reference name of the category. :type reference_name: str :param work_item_types: The work item types that belong to the category. - :type work_item_types: list of :class:`WorkItemTypeReference ` + :type work_item_types: list of :class:`WorkItemTypeReference ` """ _attribute_map = { @@ -1998,7 +2182,7 @@ class WorkItemTypeFieldInstance(WorkItemTypeFieldInstanceBase): :param always_required: Indicates whether field value is always required. :type always_required: bool :param dependent_fields: The list of dependent fields. - :type dependent_fields: list of :class:`WorkItemFieldReference ` + :type dependent_fields: list of :class:`WorkItemFieldReference ` :param help_text: Gets the help text for the field. :type help_text: str :param allowed_values: The list of field allowed values. @@ -2028,20 +2212,20 @@ class WorkItemUpdate(WorkItemTrackingResource): """ Describes an update to a work item. - :param url: + :param url: REST URL for the resource. :type url: str :param _links: Link references to related REST resources. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param fields: List of updates to fields. :type fields: dict :param id: ID of update. :type id: int :param relations: List of updates to relations. - :type relations: :class:`WorkItemRelationUpdates ` + :type relations: :class:`WorkItemRelationUpdates ` :param rev: The revision number of work item update. :type rev: int :param revised_by: Identity for the work item update. - :type revised_by: :class:`IdentityReference ` + :type revised_by: :class:`IdentityReference ` :param revised_date: The work item updates revision date. :type revised_date: datetime :param work_item_id: The work item ID. @@ -2071,34 +2255,77 @@ def __init__(self, url=None, _links=None, fields=None, id=None, relations=None, self.work_item_id = work_item_id +class WorkItemUpdate2(WorkItemUpdate): + """ + :param url: REST URL for the resource. + :type url: str + :param _links: Link references to related REST resources. + :type _links: :class:`ReferenceLinks ` + :param fields: List of updates to fields. + :type fields: dict + :param relations: List of updates to relations. + :type relations: :class:`WorkItemRelationUpdates ` + :param rev: The revision number of work item update. + :type rev: int + :param revised_by: Identity for the work item update. + :type revised_by: :class:`IdentityReference ` + :param revised_date: The work item updates revision date. + :type revised_date: datetime + :param work_item_id: The work item ID. + :type work_item_id: int + :param id: + :type id: long + """ + + _attribute_map = { + 'url': {'key': 'url', 'type': 'str'}, + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'fields': {'key': 'fields', 'type': '{WorkItemFieldUpdate}'}, + 'relations': {'key': 'relations', 'type': 'WorkItemRelationUpdates'}, + 'rev': {'key': 'rev', 'type': 'int'}, + 'revised_by': {'key': 'revisedBy', 'type': 'IdentityReference'}, + 'revised_date': {'key': 'revisedDate', 'type': 'iso-8601'}, + 'work_item_id': {'key': 'workItemId', 'type': 'int'}, + 'id': {'key': 'id', 'type': 'long'} + } + + def __init__(self, url=None, _links=None, fields=None, relations=None, rev=None, revised_by=None, revised_date=None, work_item_id=None, id=None): + super(WorkItemUpdate2, self).__init__(url=url, _links=_links, fields=fields, relations=relations, rev=rev, revised_by=revised_by, revised_date=revised_date, work_item_id=work_item_id) + self.id = id + + class Comment(WorkItemTrackingResource): """ Comment on a Work Item. - :param url: + :param url: REST URL for the resource. :type url: str :param _links: Link references to related REST resources. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param created_by: IdentityRef of the creator of the comment. - :type created_by: :class:`IdentityRef ` + :type created_by: :class:`IdentityRef ` :param created_date: The creation date of the comment. :type created_date: datetime :param created_on_behalf_date: Effective Date/time value for adding the comment. Can be optionally different from CreatedDate. :type created_on_behalf_date: datetime :param created_on_behalf_of: Identity on whose behalf this comment has been added. Can be optionally different from CreatedBy. - :type created_on_behalf_of: :class:`IdentityRef ` + :type created_on_behalf_of: :class:`IdentityRef ` + :param format: Represents the possible types for the comment format. + :type format: object :param id: The id assigned to the comment. :type id: int :param is_deleted: Indicates if the comment has been deleted. :type is_deleted: bool :param mentions: The mentions of the comment. - :type mentions: list of :class:`CommentMention ` + :type mentions: list of :class:`CommentMention ` :param modified_by: IdentityRef of the user who last modified the comment. - :type modified_by: :class:`IdentityRef ` + :type modified_by: :class:`IdentityRef ` :param modified_date: The last modification date of the comment. :type modified_date: datetime :param reactions: The reactions of the comment. - :type reactions: list of :class:`CommentReaction ` + :type reactions: list of :class:`CommentReaction ` + :param rendered_text: The text of the comment in HTML format. + :type rendered_text: str :param text: The text of the comment. :type text: str :param version: The current version of the comment. @@ -2114,29 +2341,33 @@ class Comment(WorkItemTrackingResource): 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, 'created_on_behalf_date': {'key': 'createdOnBehalfDate', 'type': 'iso-8601'}, 'created_on_behalf_of': {'key': 'createdOnBehalfOf', 'type': 'IdentityRef'}, + 'format': {'key': 'format', 'type': 'object'}, 'id': {'key': 'id', 'type': 'int'}, 'is_deleted': {'key': 'isDeleted', 'type': 'bool'}, 'mentions': {'key': 'mentions', 'type': '[CommentMention]'}, 'modified_by': {'key': 'modifiedBy', 'type': 'IdentityRef'}, 'modified_date': {'key': 'modifiedDate', 'type': 'iso-8601'}, 'reactions': {'key': 'reactions', 'type': '[CommentReaction]'}, + 'rendered_text': {'key': 'renderedText', 'type': 'str'}, 'text': {'key': 'text', 'type': 'str'}, 'version': {'key': 'version', 'type': 'int'}, 'work_item_id': {'key': 'workItemId', 'type': 'int'} } - def __init__(self, url=None, _links=None, created_by=None, created_date=None, created_on_behalf_date=None, created_on_behalf_of=None, id=None, is_deleted=None, mentions=None, modified_by=None, modified_date=None, reactions=None, text=None, version=None, work_item_id=None): + def __init__(self, url=None, _links=None, created_by=None, created_date=None, created_on_behalf_date=None, created_on_behalf_of=None, format=None, id=None, is_deleted=None, mentions=None, modified_by=None, modified_date=None, reactions=None, rendered_text=None, text=None, version=None, work_item_id=None): super(Comment, self).__init__(url=url, _links=_links) self.created_by = created_by self.created_date = created_date self.created_on_behalf_date = created_on_behalf_date self.created_on_behalf_of = created_on_behalf_of + self.format = format self.id = id self.is_deleted = is_deleted self.mentions = mentions self.modified_by = modified_by self.modified_date = modified_date self.reactions = reactions + self.rendered_text = rendered_text self.text = text self.version = version self.work_item_id = work_item_id @@ -2146,12 +2377,12 @@ class CommentList(WorkItemTrackingResource): """ Represents a list of work item comments. - :param url: + :param url: REST URL for the resource. :type url: str :param _links: Link references to related REST resources. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param comments: List of comments in the current batch. - :type comments: list of :class:`Comment ` + :type comments: list of :class:`Comment ` :param continuation_token: A string token that can be used to retrieving next page of comments if available. Otherwise null. :type continuation_token: str :param count: The count of comments in the current batch. @@ -2183,10 +2414,10 @@ def __init__(self, url=None, _links=None, comments=None, continuation_token=None class CommentMention(WorkItemTrackingResource): """ - :param url: + :param url: REST URL for the resource. :type url: str :param _links: Link references to related REST resources. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param artifact_id: The artifact portion of the parsed text. (i.e. the work item's id) :type artifact_id: str :param artifact_type: The type the parser assigned to the mention. (i.e. person, work item, etc) @@ -2218,10 +2449,10 @@ class CommentReaction(WorkItemTrackingResource): """ Contains information about work item comment reaction for a particular reaction type. - :param url: + :param url: REST URL for the resource. :type url: str :param _links: Link references to related REST resources. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param comment_id: The id of the comment this reaction belongs to. :type comment_id: int :param count: Total number of reactions for the CommentReactionType. @@ -2253,24 +2484,24 @@ class CommentVersion(WorkItemTrackingResource): """ Represents a specific version of a comment on a work item. - :param url: + :param url: REST URL for the resource. :type url: str :param _links: Link references to related REST resources. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param created_by: IdentityRef of the creator of the comment. - :type created_by: :class:`IdentityRef ` + :type created_by: :class:`IdentityRef ` :param created_date: The creation date of the comment. :type created_date: datetime :param created_on_behalf_date: Effective Date/time value for adding the comment. Can be optionally different from CreatedDate. :type created_on_behalf_date: datetime :param created_on_behalf_of: Identity on whose behalf this comment has been added. Can be optionally different from CreatedBy. - :type created_on_behalf_of: :class:`IdentityRef ` + :type created_on_behalf_of: :class:`IdentityRef ` :param id: The id assigned to the comment. :type id: int :param is_deleted: Indicates if the comment has been deleted at this version. :type is_deleted: bool :param modified_by: IdentityRef of the user who modified the comment at this version. - :type modified_by: :class:`IdentityRef ` + :type modified_by: :class:`IdentityRef ` :param modified_date: The modification date of the comment for this version. :type modified_date: datetime :param rendered_text: The rendered content of the comment at this version. @@ -2316,12 +2547,12 @@ class FieldDependentRule(WorkItemTrackingResource): """ Describes a list of dependent fields for a rule. - :param url: + :param url: REST URL for the resource. :type url: str :param _links: Link references to related REST resources. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param dependent_fields: The dependent fields. - :type dependent_fields: list of :class:`WorkItemFieldReference ` + :type dependent_fields: list of :class:`WorkItemFieldReference ` """ _attribute_map = { @@ -2339,24 +2570,24 @@ class QueryHierarchyItem(WorkItemTrackingResource): """ Represents an item in the work item query hierarchy. This can be either a query or a folder. - :param url: + :param url: REST URL for the resource. :type url: str :param _links: Link references to related REST resources. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` + :param children: The child query items inside a query folder. + :type children: list of :class:`QueryHierarchyItem ` :param clauses: The clauses for a flat query. - :type clauses: :class:`WorkItemQueryClause ` + :type clauses: :class:`WorkItemQueryClause ` :param columns: The columns of the query. - :type columns: list of :class:`WorkItemFieldReference ` + :type columns: list of :class:`WorkItemFieldReference ` :param created_by: The identity who created the query item. - :type created_by: :class:`IdentityReference ` + :type created_by: :class:`IdentityReference ` :param created_date: When the query item was created. :type created_date: datetime :param filter_options: The link query mode. :type filter_options: object :param has_children: If this is a query folder, indicates if it contains any children. :type has_children: bool - :param children: The child query items inside a query folder. - :type children: list of :class:`QueryHierarchyItem ` :param id: The id of the query item. :type id: str :param is_deleted: Indicates if this query item is deleted. Setting this to false on a deleted query item will undelete it. Undeleting a query or folder will not bring back the permission changes that were previously applied to it. @@ -2368,15 +2599,15 @@ class QueryHierarchyItem(WorkItemTrackingResource): :param is_public: Indicates if this query item is public or private. :type is_public: bool :param last_executed_by: The identity who last ran the query. - :type last_executed_by: :class:`IdentityReference ` + :type last_executed_by: :class:`IdentityReference ` :param last_executed_date: When the query was last run. :type last_executed_date: datetime :param last_modified_by: The identity who last modified the query item. - :type last_modified_by: :class:`IdentityReference ` + :type last_modified_by: :class:`IdentityReference ` :param last_modified_date: When the query item was last modified. :type last_modified_date: datetime :param link_clauses: The link query clause. - :type link_clauses: :class:`WorkItemQueryClause ` + :type link_clauses: :class:`WorkItemQueryClause ` :param name: The name of the query item. :type name: str :param path: The path of the query item. @@ -2386,11 +2617,11 @@ class QueryHierarchyItem(WorkItemTrackingResource): :param query_type: The type of query. :type query_type: object :param sort_columns: The sort columns of the query. - :type sort_columns: list of :class:`WorkItemQuerySortColumn ` + :type sort_columns: list of :class:`WorkItemQuerySortColumn ` :param source_clauses: The source clauses in a tree or one-hop link query. - :type source_clauses: :class:`WorkItemQueryClause ` + :type source_clauses: :class:`WorkItemQueryClause ` :param target_clauses: The target clauses in a tree or one-hop link query. - :type target_clauses: :class:`WorkItemQueryClause ` + :type target_clauses: :class:`WorkItemQueryClause ` :param wiql: The WIQL text of the query :type wiql: str """ @@ -2398,13 +2629,13 @@ class QueryHierarchyItem(WorkItemTrackingResource): _attribute_map = { 'url': {'key': 'url', 'type': 'str'}, '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'children': {'key': 'children', 'type': '[QueryHierarchyItem]'}, 'clauses': {'key': 'clauses', 'type': 'WorkItemQueryClause'}, 'columns': {'key': 'columns', 'type': '[WorkItemFieldReference]'}, 'created_by': {'key': 'createdBy', 'type': 'IdentityReference'}, 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, 'filter_options': {'key': 'filterOptions', 'type': 'object'}, 'has_children': {'key': 'hasChildren', 'type': 'bool'}, - 'children': {'key': 'children', 'type': '[QueryHierarchyItem]'}, 'id': {'key': 'id', 'type': 'str'}, 'is_deleted': {'key': 'isDeleted', 'type': 'bool'}, 'is_folder': {'key': 'isFolder', 'type': 'bool'}, @@ -2425,15 +2656,15 @@ class QueryHierarchyItem(WorkItemTrackingResource): 'wiql': {'key': 'wiql', 'type': 'str'} } - def __init__(self, url=None, _links=None, clauses=None, columns=None, created_by=None, created_date=None, filter_options=None, has_children=None, children=None, id=None, is_deleted=None, is_folder=None, is_invalid_syntax=None, is_public=None, last_executed_by=None, last_executed_date=None, last_modified_by=None, last_modified_date=None, link_clauses=None, name=None, path=None, query_recursion_option=None, query_type=None, sort_columns=None, source_clauses=None, target_clauses=None, wiql=None): + def __init__(self, url=None, _links=None, children=None, clauses=None, columns=None, created_by=None, created_date=None, filter_options=None, has_children=None, id=None, is_deleted=None, is_folder=None, is_invalid_syntax=None, is_public=None, last_executed_by=None, last_executed_date=None, last_modified_by=None, last_modified_date=None, link_clauses=None, name=None, path=None, query_recursion_option=None, query_type=None, sort_columns=None, source_clauses=None, target_clauses=None, wiql=None): super(QueryHierarchyItem, self).__init__(url=url, _links=_links) + self.children = children self.clauses = clauses self.columns = columns self.created_by = created_by self.created_date = created_date self.filter_options = filter_options self.has_children = has_children - self.children = children self.id = id self.is_deleted = is_deleted self.is_folder = is_folder @@ -2454,22 +2685,45 @@ def __init__(self, url=None, _links=None, clauses=None, columns=None, created_by self.wiql = wiql +class TemporaryQueryRequestModel(WorkItemTrackingResource): + """ + Describes a request to create a temporary query + + :param url: REST URL for the resource. + :type url: str + :param _links: Link references to related REST resources. + :type _links: :class:`ReferenceLinks ` + :param wiql: The WIQL text of the temporary query + :type wiql: str + """ + + _attribute_map = { + 'url': {'key': 'url', 'type': 'str'}, + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'wiql': {'key': 'wiql', 'type': 'str'} + } + + def __init__(self, url=None, _links=None, wiql=None): + super(TemporaryQueryRequestModel, self).__init__(url=url, _links=_links) + self.wiql = wiql + + class WorkItem(WorkItemTrackingResource): """ Describes a work item. - :param url: + :param url: REST URL for the resource. :type url: str :param _links: Link references to related REST resources. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param comment_version_ref: Reference to a specific version of the comment added/edited/deleted in this revision. - :type comment_version_ref: :class:`WorkItemCommentVersionRef ` + :type comment_version_ref: :class:`WorkItemCommentVersionRef ` :param fields: Map of field and values for the work item. :type fields: dict :param id: The work item ID. :type id: int :param relations: Relations of the work item. - :type relations: list of :class:`WorkItemRelation ` + :type relations: list of :class:`WorkItemRelation ` :param rev: Revision number of the work item. :type rev: int """ @@ -2497,16 +2751,16 @@ class WorkItemClassificationNode(WorkItemTrackingResource): """ Defines a classification node for work item tracking. - :param url: + :param url: REST URL for the resource. :type url: str :param _links: Link references to related REST resources. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param attributes: Dictionary that has node attributes like start/finish date for iteration nodes. :type attributes: dict + :param children: List of child nodes fetched. + :type children: list of :class:`WorkItemClassificationNode ` :param has_children: Flag that indicates if the classification node has any child nodes. :type has_children: bool - :param children: List of child nodes fetched. - :type children: list of :class:`WorkItemClassificationNode ` :param id: Integer ID of the classification node. :type id: int :param identifier: GUID ID of the classification node. @@ -2523,8 +2777,8 @@ class WorkItemClassificationNode(WorkItemTrackingResource): 'url': {'key': 'url', 'type': 'str'}, '_links': {'key': '_links', 'type': 'ReferenceLinks'}, 'attributes': {'key': 'attributes', 'type': '{object}'}, - 'has_children': {'key': 'hasChildren', 'type': 'bool'}, 'children': {'key': 'children', 'type': '[WorkItemClassificationNode]'}, + 'has_children': {'key': 'hasChildren', 'type': 'bool'}, 'id': {'key': 'id', 'type': 'int'}, 'identifier': {'key': 'identifier', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, @@ -2532,11 +2786,11 @@ class WorkItemClassificationNode(WorkItemTrackingResource): 'structure_type': {'key': 'structureType', 'type': 'object'} } - def __init__(self, url=None, _links=None, attributes=None, has_children=None, children=None, id=None, identifier=None, name=None, path=None, structure_type=None): + def __init__(self, url=None, _links=None, attributes=None, children=None, has_children=None, id=None, identifier=None, name=None, path=None, structure_type=None): super(WorkItemClassificationNode, self).__init__(url=url, _links=_links) self.attributes = attributes - self.has_children = has_children self.children = children + self.has_children = has_children self.id = id self.identifier = identifier self.name = name @@ -2548,12 +2802,16 @@ class WorkItemComment(WorkItemTrackingResource): """ Comment on Work Item - :param url: + :param url: REST URL for the resource. :type url: str :param _links: Link references to related REST resources. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` + :param format: Represents the possible types for the comment format. + :type format: object + :param rendered_text: The text of the comment in HTML format. + :type rendered_text: str :param revised_by: Identity of user who added the comment. - :type revised_by: :class:`IdentityReference ` + :type revised_by: :class:`IdentityReference ` :param revised_date: The date of comment. :type revised_date: datetime :param revision: The work item revision number. @@ -2565,14 +2823,18 @@ class WorkItemComment(WorkItemTrackingResource): _attribute_map = { 'url': {'key': 'url', 'type': 'str'}, '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'format': {'key': 'format', 'type': 'object'}, + 'rendered_text': {'key': 'renderedText', 'type': 'str'}, 'revised_by': {'key': 'revisedBy', 'type': 'IdentityReference'}, 'revised_date': {'key': 'revisedDate', 'type': 'iso-8601'}, 'revision': {'key': 'revision', 'type': 'int'}, 'text': {'key': 'text', 'type': 'str'} } - def __init__(self, url=None, _links=None, revised_by=None, revised_date=None, revision=None, text=None): + def __init__(self, url=None, _links=None, format=None, rendered_text=None, revised_by=None, revised_date=None, revision=None, text=None): super(WorkItemComment, self).__init__(url=url, _links=_links) + self.format = format + self.rendered_text = rendered_text self.revised_by = revised_by self.revised_date = revised_date self.revision = revision @@ -2583,12 +2845,12 @@ class WorkItemComments(WorkItemTrackingResource): """ Collection of comments. - :param url: + :param url: REST URL for the resource. :type url: str :param _links: Link references to related REST resources. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param comments: Comments collection. - :type comments: list of :class:`WorkItemComment ` + :type comments: list of :class:`WorkItemComment ` :param count: The count of comments. :type count: int :param from_revision_count: Count of comments from the revision. @@ -2618,10 +2880,10 @@ class WorkItemField(WorkItemTrackingResource): """ Describes a field on a work item and it's properties specific to that work item type. - :param url: + :param url: REST URL for the resource. :type url: str :param _links: Link references to related REST resources. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param can_sort_by: Indicates whether the field is sortable in server queries. :type can_sort_by: bool :param description: The description of the field. @@ -2645,7 +2907,7 @@ class WorkItemField(WorkItemTrackingResource): :param reference_name: The reference name of the field. :type reference_name: str :param supported_operations: The supported operations on this field. - :type supported_operations: list of :class:`WorkItemFieldOperation ` + :type supported_operations: list of :class:`WorkItemFieldOperation ` :param type: The type of the field. :type type: object :param usage: The usage of the field. @@ -2689,16 +2951,81 @@ def __init__(self, url=None, _links=None, can_sort_by=None, description=None, is self.usage = usage +class WorkItemField2(WorkItemField): + """ + Describes a field on a work item and it's properties specific to that work item type. + + :param url: REST URL for the resource. + :type url: str + :param _links: Link references to related REST resources. + :type _links: :class:`ReferenceLinks ` + :param can_sort_by: Indicates whether the field is sortable in server queries. + :type can_sort_by: bool + :param description: The description of the field. + :type description: str + :param is_deleted: Indicates whether this field is deleted. + :type is_deleted: bool + :param is_identity: Indicates whether this field is an identity field. + :type is_identity: bool + :param is_picklist: Indicates whether this instance is picklist. + :type is_picklist: bool + :param is_picklist_suggested: Indicates whether this instance is a suggested picklist . + :type is_picklist_suggested: bool + :param is_queryable: Indicates whether the field can be queried in the server. + :type is_queryable: bool + :param name: The name of the field. + :type name: str + :param picklist_id: If this field is picklist, the identifier of the picklist associated, otherwise null + :type picklist_id: str + :param read_only: Indicates whether the field is [read only]. + :type read_only: bool + :param reference_name: The reference name of the field. + :type reference_name: str + :param supported_operations: The supported operations on this field. + :type supported_operations: list of :class:`WorkItemFieldOperation ` + :param type: The type of the field. + :type type: object + :param usage: The usage of the field. + :type usage: object + :param is_locked: Indicates whether this field is marked as locked for editing. + :type is_locked: bool + """ + + _attribute_map = { + 'url': {'key': 'url', 'type': 'str'}, + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'can_sort_by': {'key': 'canSortBy', 'type': 'bool'}, + 'description': {'key': 'description', 'type': 'str'}, + 'is_deleted': {'key': 'isDeleted', 'type': 'bool'}, + 'is_identity': {'key': 'isIdentity', 'type': 'bool'}, + 'is_picklist': {'key': 'isPicklist', 'type': 'bool'}, + 'is_picklist_suggested': {'key': 'isPicklistSuggested', 'type': 'bool'}, + 'is_queryable': {'key': 'isQueryable', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'picklist_id': {'key': 'picklistId', 'type': 'str'}, + 'read_only': {'key': 'readOnly', 'type': 'bool'}, + 'reference_name': {'key': 'referenceName', 'type': 'str'}, + 'supported_operations': {'key': 'supportedOperations', 'type': '[WorkItemFieldOperation]'}, + 'type': {'key': 'type', 'type': 'object'}, + 'usage': {'key': 'usage', 'type': 'object'}, + 'is_locked': {'key': 'isLocked', 'type': 'bool'} + } + + def __init__(self, url=None, _links=None, can_sort_by=None, description=None, is_deleted=None, is_identity=None, is_picklist=None, is_picklist_suggested=None, is_queryable=None, name=None, picklist_id=None, read_only=None, reference_name=None, supported_operations=None, type=None, usage=None, is_locked=None): + super(WorkItemField2, self).__init__(url=url, _links=_links, can_sort_by=can_sort_by, description=description, is_deleted=is_deleted, is_identity=is_identity, is_picklist=is_picklist, is_picklist_suggested=is_picklist_suggested, is_queryable=is_queryable, name=name, picklist_id=picklist_id, read_only=read_only, reference_name=reference_name, supported_operations=supported_operations, type=type, usage=usage) + self.is_locked = is_locked + + class WorkItemHistory(WorkItemTrackingResource): """ - :param url: + :param url: REST URL for the resource. :type url: str :param _links: Link references to related REST resources. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param rev: :type rev: int :param revised_by: - :type revised_by: :class:`IdentityReference ` + :type revised_by: :class:`IdentityReference ` :param revised_date: :type revised_date: datetime :param value: @@ -2726,10 +3053,10 @@ class WorkItemTemplateReference(WorkItemTrackingResource): """ Describes a shallow reference to a work item template. - :param url: + :param url: REST URL for the resource. :type url: str :param _links: Link references to related REST resources. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param description: The description of the work item template. :type description: str :param id: The identifier of the work item template. @@ -2759,10 +3086,10 @@ def __init__(self, url=None, _links=None, description=None, id=None, name=None, class WorkItemTrackingReference(WorkItemTrackingResource): """ - :param url: + :param url: REST URL for the resource. :type url: str :param _links: Link references to related REST resources. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param name: The name. :type name: str :param reference_name: The reference name. @@ -2786,10 +3113,10 @@ class WorkItemRelationType(WorkItemTrackingReference): """ Represents the work item type relation type. - :param url: + :param url: REST URL for the resource. :type url: str :param _links: Link references to related REST resources. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param name: The name. :type name: str :param reference_name: The reference name. @@ -2815,10 +3142,10 @@ class WorkItemTemplate(WorkItemTemplateReference): """ Describes a work item template. - :param url: + :param url: REST URL for the resource. :type url: str :param _links: Link references to related REST resources. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param description: The description of the work item template. :type description: str :param id: The identifier of the work item template. @@ -2860,6 +3187,10 @@ def __init__(self, url=None, _links=None, description=None, id=None, name=None, 'ExternalDeployment', 'ExternalEnvironment', 'ExternalPipeline', + 'FieldUpdate', + 'GitHubConnectionModel', + 'GitHubConnectionRepoModel', + 'GitHubConnectionReposBatchRequest', 'GraphSubjectBase', 'IdentityRef', 'IdentityReference', @@ -2877,13 +3208,17 @@ def __init__(self, url=None, _links=None, description=None, id=None, name=None, 'SendMailBody', 'StreamedBatch', 'TeamContext', + 'TemporaryQueryResponseModel', 'UpdateWorkItemField', 'Wiql', 'WorkArtifactLink', 'WorkItemBatchGetRequest', + 'WorkItemDeleteBatch', + 'WorkItemDeleteBatchRequest', 'WorkItemDeleteReference', 'WorkItemDeleteShallowReference', 'WorkItemDeleteUpdate', + 'WorkItemFieldAllowedValues', 'WorkItemFieldOperation', 'WorkItemFieldReference', 'WorkItemFieldUpdate', @@ -2919,6 +3254,7 @@ def __init__(self, url=None, _links=None, description=None, id=None, name=None, 'WorkItemTypeCategory', 'WorkItemTypeFieldInstance', 'WorkItemUpdate', + 'WorkItemUpdate2', 'Comment', 'CommentList', 'CommentMention', @@ -2926,11 +3262,13 @@ def __init__(self, url=None, _links=None, description=None, id=None, name=None, 'CommentVersion', 'FieldDependentRule', 'QueryHierarchyItem', + 'TemporaryQueryRequestModel', 'WorkItem', 'WorkItemClassificationNode', 'WorkItemComment', 'WorkItemComments', 'WorkItemField', + 'WorkItemField2', 'WorkItemHistory', 'WorkItemTemplateReference', 'WorkItemTrackingReference', diff --git a/azure-devops/azure/devops/v7_0/work_item_tracking/work_item_tracking_client.py b/azure-devops/azure/devops/v7_2/work_item_tracking/work_item_tracking_client.py similarity index 80% rename from azure-devops/azure/devops/v7_0/work_item_tracking/work_item_tracking_client.py rename to azure-devops/azure/devops/v7_2/work_item_tracking/work_item_tracking_client.py index 50ae3280..d2ff938a 100644 --- a/azure-devops/azure/devops/v7_0/work_item_tracking/work_item_tracking_client.py +++ b/azure-devops/azure/devops/v7_2/work_item_tracking/work_item_tracking_client.py @@ -27,30 +27,30 @@ def __init__(self, base_url=None, creds=None): def get_recent_activity_data(self): """GetRecentActivityData. - Gets recent work item activities + [Preview API] Gets recent work item activities :rtype: [AccountRecentActivityWorkItemModel2] """ response = self._send(http_method='GET', location_id='1bc988f4-c15f-4072-ad35-497c87e3a909', - version='7.0') + version='7.2-preview.2') return self._deserialize('[AccountRecentActivityWorkItemModel2]', self._unwrap_collection(response)) def get_work_artifact_link_types(self): """GetWorkArtifactLinkTypes. - Get the list of work item tracking outbound artifact link types. + [Preview API] Get the list of work item tracking outbound artifact link types. :rtype: [WorkArtifactLink] """ response = self._send(http_method='GET', location_id='1a31de40-e318-41cd-a6c6-881077df52e3', - version='7.0') + version='7.2-preview.1') return self._deserialize('[WorkArtifactLink]', self._unwrap_collection(response)) def query_work_items_for_artifact_uris(self, artifact_uri_query, project=None): """QueryWorkItemsForArtifactUris. - Queries work items linked to a given list of artifact URI. - :param :class:` ` artifact_uri_query: Defines a list of artifact URI for querying work items. + [Preview API] Queries work items linked to a given list of artifact URI. + :param :class:` ` artifact_uri_query: Defines a list of artifact URI for querying work items. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -58,20 +58,20 @@ def query_work_items_for_artifact_uris(self, artifact_uri_query, project=None): content = self._serialize.body(artifact_uri_query, 'ArtifactUriQuery') response = self._send(http_method='POST', location_id='a9a9aa7a-8c09-44d3-ad1b-46e855c1e3d3', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('ArtifactUriQueryResult', response) def create_attachment(self, upload_stream, project=None, file_name=None, upload_type=None, area_path=None, **kwargs): """CreateAttachment. - Uploads an attachment. + [Preview API] Uploads an attachment. :param object upload_stream: Stream to upload :param str project: Project ID or project name :param str file_name: The name of the file :param str upload_type: Attachment upload type: Simple or Chunked :param str area_path: Target project Area Path - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -90,7 +90,7 @@ def create_attachment(self, upload_stream, project=None, file_name=None, upload_ content = self._client.stream_upload(upload_stream, callback=callback) response = self._send(http_method='POST', location_id='e07b5fa4-1499-494d-a496-64b860fd64ff', - version='7.0', + version='7.2-preview.3', route_values=route_values, query_parameters=query_parameters, content=content, @@ -99,7 +99,7 @@ def create_attachment(self, upload_stream, project=None, file_name=None, upload_ def get_attachment_content(self, id, project=None, file_name=None, download=None, **kwargs): """GetAttachmentContent. - Downloads an attachment. + [Preview API] Downloads an attachment. :param str id: Attachment ID :param str project: Project ID or project name :param str file_name: Name of the file @@ -118,7 +118,7 @@ def get_attachment_content(self, id, project=None, file_name=None, download=None query_parameters['download'] = self._serialize.query('download', download, 'bool') response = self._send(http_method='GET', location_id='e07b5fa4-1499-494d-a496-64b860fd64ff', - version='7.0', + version='7.2-preview.3', route_values=route_values, query_parameters=query_parameters, accept_media_type='application/octet-stream') @@ -130,7 +130,7 @@ def get_attachment_content(self, id, project=None, file_name=None, download=None def get_attachment_zip(self, id, project=None, file_name=None, download=None, **kwargs): """GetAttachmentZip. - Downloads an attachment. + [Preview API] Downloads an attachment. :param str id: Attachment ID :param str project: Project ID or project name :param str file_name: Name of the file @@ -149,7 +149,7 @@ def get_attachment_zip(self, id, project=None, file_name=None, download=None, ** query_parameters['download'] = self._serialize.query('download', download, 'bool') response = self._send(http_method='GET', location_id='e07b5fa4-1499-494d-a496-64b860fd64ff', - version='7.0', + version='7.2-preview.3', route_values=route_values, query_parameters=query_parameters, accept_media_type='application/zip') @@ -161,7 +161,7 @@ def get_attachment_zip(self, id, project=None, file_name=None, download=None, ** def get_classification_nodes(self, project, ids, depth=None, error_policy=None): """GetClassificationNodes. - Gets root classification nodes or list of classification nodes for a given list of nodes ids, for a given project. In case ids parameter is supplied you will get list of classification nodes for those ids. Otherwise you will get root classification nodes for this project. + [Preview API] Gets root classification nodes or list of classification nodes for a given list of nodes ids, for a given project. In case ids parameter is supplied you will get list of classification nodes for those ids. Otherwise you will get root classification nodes for this project. :param str project: Project ID or project name :param [int] ids: Comma separated integer classification nodes ids. It's not required, if you want root nodes. :param int depth: Depth of children to fetch. @@ -181,14 +181,14 @@ def get_classification_nodes(self, project, ids, depth=None, error_policy=None): query_parameters['errorPolicy'] = self._serialize.query('error_policy', error_policy, 'str') response = self._send(http_method='GET', location_id='a70579d1-f53a-48ee-a5be-7be8659023b9', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[WorkItemClassificationNode]', self._unwrap_collection(response)) def get_root_nodes(self, project, depth=None): """GetRootNodes. - Gets root classification nodes under the project. + [Preview API] Gets root classification nodes under the project. :param str project: Project ID or project name :param int depth: Depth of children to fetch. :rtype: [WorkItemClassificationNode] @@ -201,19 +201,19 @@ def get_root_nodes(self, project, depth=None): query_parameters['$depth'] = self._serialize.query('depth', depth, 'int') response = self._send(http_method='GET', location_id='a70579d1-f53a-48ee-a5be-7be8659023b9', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[WorkItemClassificationNode]', self._unwrap_collection(response)) def create_or_update_classification_node(self, posted_node, project, structure_group, path=None): """CreateOrUpdateClassificationNode. - Create new or update an existing classification node. - :param :class:` ` posted_node: Node to create or update. + [Preview API] Create new or update an existing classification node. + :param :class:` ` posted_node: Node to create or update. :param str project: Project ID or project name :param TreeStructureGroup structure_group: Structure group of the classification node, area or iteration. :param str path: Path of the classification node. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -225,14 +225,14 @@ def create_or_update_classification_node(self, posted_node, project, structure_g content = self._serialize.body(posted_node, 'WorkItemClassificationNode') response = self._send(http_method='POST', location_id='5a172953-1b41-49d3-840a-33f79c3ce89f', - version='7.0', + version='7.2-preview.2', route_values=route_values, content=content) return self._deserialize('WorkItemClassificationNode', response) def delete_classification_node(self, project, structure_group, path=None, reclassify_id=None): """DeleteClassificationNode. - Delete an existing classification node. + [Preview API] Delete an existing classification node. :param str project: Project ID or project name :param TreeStructureGroup structure_group: Structure group of the classification node, area or iteration. :param str path: Path of the classification node. @@ -250,18 +250,18 @@ def delete_classification_node(self, project, structure_group, path=None, reclas query_parameters['$reclassifyId'] = self._serialize.query('reclassify_id', reclassify_id, 'int') self._send(http_method='DELETE', location_id='5a172953-1b41-49d3-840a-33f79c3ce89f', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters) def get_classification_node(self, project, structure_group, path=None, depth=None): """GetClassificationNode. - Gets the classification node for a given node path. + [Preview API] Gets the classification node for a given node path. :param str project: Project ID or project name :param TreeStructureGroup structure_group: Structure group of the classification node, area or iteration. :param str path: Path of the classification node. :param int depth: Depth of children to fetch. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -275,19 +275,19 @@ def get_classification_node(self, project, structure_group, path=None, depth=Non query_parameters['$depth'] = self._serialize.query('depth', depth, 'int') response = self._send(http_method='GET', location_id='5a172953-1b41-49d3-840a-33f79c3ce89f', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters) return self._deserialize('WorkItemClassificationNode', response) def update_classification_node(self, posted_node, project, structure_group, path=None): """UpdateClassificationNode. - Update an existing classification node. - :param :class:` ` posted_node: Node to create or update. + [Preview API] Update an existing classification node. + :param :class:` ` posted_node: Node to create or update. :param str project: Project ID or project name :param TreeStructureGroup structure_group: Structure group of the classification node, area or iteration. :param str path: Path of the classification node. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -299,7 +299,7 @@ def update_classification_node(self, posted_node, project, structure_group, path content = self._serialize.body(posted_node, 'WorkItemClassificationNode') response = self._send(http_method='PATCH', location_id='5a172953-1b41-49d3-840a-33f79c3ce89f', - version='7.0', + version='7.2-preview.2', route_values=route_values, content=content) return self._deserialize('WorkItemClassificationNode', response) @@ -331,7 +331,7 @@ def get_engaged_users(self, project, work_item_id, comment_id, reaction_type, to query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') response = self._send(http_method='GET', location_id='e33ca5e0-2349-4285-af3d-d72d86781c35', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[IdentityRef]', self._unwrap_collection(response)) @@ -339,10 +339,10 @@ def get_engaged_users(self, project, work_item_id, comment_id, reaction_type, to def add_comment(self, request, project, work_item_id): """AddComment. [Preview API] Add a comment on a work item. - :param :class:` ` request: Comment create request. + :param :class:` ` request: Comment create request. :param str project: Project ID or project name :param int work_item_id: Id of a work item. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -352,11 +352,37 @@ def add_comment(self, request, project, work_item_id): content = self._serialize.body(request, 'CommentCreate') response = self._send(http_method='POST', location_id='608aac0a-32e1-4493-a863-b9cf4566d257', - version='7.0-preview.3', + version='7.2-preview.4', route_values=route_values, content=content) return self._deserialize('Comment', response) + def add_work_item_comment(self, request, project, work_item_id, format): + """AddWorkItemComment. + [Preview API] Add a comment on a work item. + :param :class:` ` request: Comment create request. + :param str project: Project ID or project name + :param int work_item_id: Id of a work item. + :param str format: Format of a work item comment (Markdown or Html). + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if work_item_id is not None: + route_values['workItemId'] = self._serialize.url('work_item_id', work_item_id, 'int') + query_parameters = {} + if format is not None: + query_parameters['format'] = self._serialize.query('format', format, 'str') + content = self._serialize.body(request, 'CommentCreate') + response = self._send(http_method='POST', + location_id='608aac0a-32e1-4493-a863-b9cf4566d257', + version='7.2-preview.4', + route_values=route_values, + query_parameters=query_parameters, + content=content) + return self._deserialize('Comment', response) + def delete_comment(self, project, work_item_id, comment_id): """DeleteComment. [Preview API] Delete a comment on a work item. @@ -373,7 +399,7 @@ def delete_comment(self, project, work_item_id, comment_id): route_values['commentId'] = self._serialize.url('comment_id', comment_id, 'int') self._send(http_method='DELETE', location_id='608aac0a-32e1-4493-a863-b9cf4566d257', - version='7.0-preview.3', + version='7.2-preview.4', route_values=route_values) def get_comment(self, project, work_item_id, comment_id, include_deleted=None, expand=None): @@ -384,7 +410,7 @@ def get_comment(self, project, work_item_id, comment_id, include_deleted=None, e :param int comment_id: Id of the comment to return. :param bool include_deleted: Specify if the deleted comment should be retrieved. :param str expand: Specifies the additional data retrieval options for work item comments. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -400,7 +426,7 @@ def get_comment(self, project, work_item_id, comment_id, include_deleted=None, e query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') response = self._send(http_method='GET', location_id='608aac0a-32e1-4493-a863-b9cf4566d257', - version='7.0-preview.3', + version='7.2-preview.4', route_values=route_values, query_parameters=query_parameters) return self._deserialize('Comment', response) @@ -415,7 +441,7 @@ def get_comments(self, project, work_item_id, top=None, continuation_token=None, :param bool include_deleted: Specify if the deleted comments should be retrieved. :param str expand: Specifies the additional data retrieval options for work item comments. :param str order: Order in which the comments should be returned. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -435,7 +461,7 @@ def get_comments(self, project, work_item_id, top=None, continuation_token=None, query_parameters['order'] = self._serialize.query('order', order, 'str') response = self._send(http_method='GET', location_id='608aac0a-32e1-4493-a863-b9cf4566d257', - version='7.0-preview.3', + version='7.2-preview.4', route_values=route_values, query_parameters=query_parameters) return self._deserialize('CommentList', response) @@ -448,7 +474,7 @@ def get_comments_batch(self, project, work_item_id, ids, include_deleted=None, e :param [int] ids: Comma-separated list of comment ids to return. :param bool include_deleted: Specify if the deleted comments should be retrieved. :param str expand: Specifies the additional data retrieval options for work item comments. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -465,7 +491,7 @@ def get_comments_batch(self, project, work_item_id, ids, include_deleted=None, e query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') response = self._send(http_method='GET', location_id='608aac0a-32e1-4493-a863-b9cf4566d257', - version='7.0-preview.3', + version='7.2-preview.4', route_values=route_values, query_parameters=query_parameters) return self._deserialize('CommentList', response) @@ -473,11 +499,11 @@ def get_comments_batch(self, project, work_item_id, ids, include_deleted=None, e def update_comment(self, request, project, work_item_id, comment_id): """UpdateComment. [Preview API] Update a comment on a work item. - :param :class:` ` request: Comment update request. + :param :class:` ` request: Comment update request. :param str project: Project ID or project name :param int work_item_id: Id of a work item. :param int comment_id: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -489,11 +515,40 @@ def update_comment(self, request, project, work_item_id, comment_id): content = self._serialize.body(request, 'CommentUpdate') response = self._send(http_method='PATCH', location_id='608aac0a-32e1-4493-a863-b9cf4566d257', - version='7.0-preview.3', + version='7.2-preview.4', route_values=route_values, content=content) return self._deserialize('Comment', response) + def update_work_item_comment(self, request, project, work_item_id, comment_id, format): + """UpdateWorkItemComment. + [Preview API] Update a comment on a work item. + :param :class:` ` request: Comment update request. + :param str project: Project ID or project name + :param int work_item_id: Id of a work item. + :param int comment_id: + :param str format: Format of a work item comment (Markdown or Html). + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if work_item_id is not None: + route_values['workItemId'] = self._serialize.url('work_item_id', work_item_id, 'int') + if comment_id is not None: + route_values['commentId'] = self._serialize.url('comment_id', comment_id, 'int') + query_parameters = {} + if format is not None: + query_parameters['format'] = self._serialize.query('format', format, 'str') + content = self._serialize.body(request, 'CommentUpdate') + response = self._send(http_method='PATCH', + location_id='608aac0a-32e1-4493-a863-b9cf4566d257', + version='7.2-preview.4', + route_values=route_values, + query_parameters=query_parameters, + content=content) + return self._deserialize('Comment', response) + def create_comment_reaction(self, project, work_item_id, comment_id, reaction_type): """CreateCommentReaction. [Preview API] Adds a new reaction to a comment. @@ -501,7 +556,7 @@ def create_comment_reaction(self, project, work_item_id, comment_id, reaction_ty :param int work_item_id: WorkItem ID :param int comment_id: Comment ID :param CommentReactionType reaction_type: Type of the reaction - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -514,7 +569,7 @@ def create_comment_reaction(self, project, work_item_id, comment_id, reaction_ty route_values['reactionType'] = self._serialize.url('reaction_type', reaction_type, 'CommentReactionType') response = self._send(http_method='PUT', location_id='f6cb3f27-1028-4851-af96-887e570dc21f', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) return self._deserialize('CommentReaction', response) @@ -525,7 +580,7 @@ def delete_comment_reaction(self, project, work_item_id, comment_id, reaction_ty :param int work_item_id: WorkItem ID :param int comment_id: Comment ID :param CommentReactionType reaction_type: Type of the reaction - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -538,7 +593,7 @@ def delete_comment_reaction(self, project, work_item_id, comment_id, reaction_ty route_values['reactionType'] = self._serialize.url('reaction_type', reaction_type, 'CommentReactionType') response = self._send(http_method='DELETE', location_id='f6cb3f27-1028-4851-af96-887e570dc21f', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) return self._deserialize('CommentReaction', response) @@ -559,7 +614,7 @@ def get_comment_reactions(self, project, work_item_id, comment_id): route_values['commentId'] = self._serialize.url('comment_id', comment_id, 'int') response = self._send(http_method='GET', location_id='f6cb3f27-1028-4851-af96-887e570dc21f', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) return self._deserialize('[CommentReaction]', self._unwrap_collection(response)) @@ -570,7 +625,7 @@ def get_comment_version(self, project, work_item_id, comment_id, version): :param int work_item_id: :param int comment_id: :param int version: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -583,7 +638,7 @@ def get_comment_version(self, project, work_item_id, comment_id, version): route_values['version'] = self._serialize.url('version', version, 'int') response = self._send(http_method='GET', location_id='49e03b34-3be0-42e3-8a5d-e8dfb88ac954', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) return self._deserialize('CommentVersion', response) @@ -604,31 +659,31 @@ def get_comment_versions(self, project, work_item_id, comment_id): route_values['commentId'] = self._serialize.url('comment_id', comment_id, 'int') response = self._send(http_method='GET', location_id='49e03b34-3be0-42e3-8a5d-e8dfb88ac954', - version='7.0-preview.1', + version='7.2-preview.1', route_values=route_values) return self._deserialize('[CommentVersion]', self._unwrap_collection(response)) - def create_field(self, work_item_field, project=None): - """CreateField. - Create a new field. - :param :class:` ` work_item_field: New field definition + def create_work_item_field(self, work_item_field, project=None): + """CreateWorkItemField. + [Preview API] Create a new field. + :param :class:` ` work_item_field: New field definition :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') - content = self._serialize.body(work_item_field, 'WorkItemField') + content = self._serialize.body(work_item_field, 'WorkItemField2') response = self._send(http_method='POST', location_id='b51fd764-e5c2-4b9b-aaf7-3395cf4bdd94', - version='7.0', + version='7.2-preview.3', route_values=route_values, content=content) - return self._deserialize('WorkItemField', response) + return self._deserialize('WorkItemField2', response) - def delete_field(self, field_name_or_ref_name, project=None): - """DeleteField. - Deletes the field. To undelete a filed, see "Update Field" API. + def delete_work_item_field(self, field_name_or_ref_name, project=None): + """DeleteWorkItemField. + [Preview API] Deletes the field. To undelete a filed, see "Update Field" API. :param str field_name_or_ref_name: Field simple name or reference name :param str project: Project ID or project name """ @@ -639,15 +694,15 @@ def delete_field(self, field_name_or_ref_name, project=None): route_values['fieldNameOrRefName'] = self._serialize.url('field_name_or_ref_name', field_name_or_ref_name, 'str') self._send(http_method='DELETE', location_id='b51fd764-e5c2-4b9b-aaf7-3395cf4bdd94', - version='7.0', + version='7.2-preview.3', route_values=route_values) - def get_field(self, field_name_or_ref_name, project=None): - """GetField. - Gets information on a specific field. + def get_work_item_field(self, field_name_or_ref_name, project=None): + """GetWorkItemField. + [Preview API] Gets information on a specific field. :param str field_name_or_ref_name: Field simple name or reference name :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -656,16 +711,16 @@ def get_field(self, field_name_or_ref_name, project=None): route_values['fieldNameOrRefName'] = self._serialize.url('field_name_or_ref_name', field_name_or_ref_name, 'str') response = self._send(http_method='GET', location_id='b51fd764-e5c2-4b9b-aaf7-3395cf4bdd94', - version='7.0', + version='7.2-preview.3', route_values=route_values) - return self._deserialize('WorkItemField', response) + return self._deserialize('WorkItemField2', response) - def get_fields(self, project=None, expand=None): - """GetFields. - Returns information for all fields. The project ID/name parameter is optional. + def get_work_item_fields(self, project=None, expand=None): + """GetWorkItemFields. + [Preview API] Returns information for all fields. The project ID/name parameter is optional. :param str project: Project ID or project name :param str expand: Use ExtensionFields to include extension fields, otherwise exclude them. Unless the feature flag for this parameter is enabled, extension fields are always included. - :rtype: [WorkItemField] + :rtype: [WorkItemField2] """ route_values = {} if project is not None: @@ -675,38 +730,38 @@ def get_fields(self, project=None, expand=None): query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') response = self._send(http_method='GET', location_id='b51fd764-e5c2-4b9b-aaf7-3395cf4bdd94', - version='7.0', + version='7.2-preview.3', route_values=route_values, query_parameters=query_parameters) - return self._deserialize('[WorkItemField]', self._unwrap_collection(response)) + return self._deserialize('[WorkItemField2]', self._unwrap_collection(response)) - def update_field(self, payload, field_name_or_ref_name, project=None): - """UpdateField. - Update a field. - :param :class:` ` payload: Payload contains desired value of the field's properties + def update_work_item_field(self, payload, field_name_or_ref_name, project=None): + """UpdateWorkItemField. + [Preview API] Update a field. + :param :class:` ` payload: Payload contains desired value of the field's properties :param str field_name_or_ref_name: Name/reference name of the field to be updated :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') if field_name_or_ref_name is not None: route_values['fieldNameOrRefName'] = self._serialize.url('field_name_or_ref_name', field_name_or_ref_name, 'str') - content = self._serialize.body(payload, 'UpdateWorkItemField') + content = self._serialize.body(payload, 'FieldUpdate') response = self._send(http_method='PATCH', location_id='b51fd764-e5c2-4b9b-aaf7-3395cf4bdd94', - version='7.0', + version='7.2-preview.3', route_values=route_values, content=content) - return self._deserialize('WorkItemField', response) + return self._deserialize('WorkItemField2', response) def migrate_projects_process(self, new_process, project): """MigrateProjectsProcess. - Migrates a project to a different process within the same OOB type. For example, you can only migrate a project from agile/custom-agile to agile/custom-agile. - :param :class:` ` new_process: + [Preview API] Migrates a project to a different process within the same OOB type. For example, you can only migrate a project from agile/custom-agile to agile/custom-agile. + :param :class:` ` new_process: :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -714,19 +769,19 @@ def migrate_projects_process(self, new_process, project): content = self._serialize.body(new_process, 'ProcessIdModel') response = self._send(http_method='POST', location_id='19801631-d4e5-47e9-8166-0330de0ff1e6', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('ProcessMigrationResultModel', response) def create_query(self, posted_query, project, query, validate_wiql_only=None): """CreateQuery. - Creates a query, or moves a query. - :param :class:` ` posted_query: The query to create. + [Preview API] Creates a query, or moves a query. + :param :class:` ` posted_query: The query to create. :param str project: Project ID or project name :param str query: The parent id or path under which the query is to be created. :param bool validate_wiql_only: If you only want to validate your WIQL query without actually creating one, set it to true. Default is false. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -739,7 +794,7 @@ def create_query(self, posted_query, project, query, validate_wiql_only=None): content = self._serialize.body(posted_query, 'QueryHierarchyItem') response = self._send(http_method='POST', location_id='a67d190c-c41f-424b-814d-0e906f659301', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters, content=content) @@ -747,7 +802,7 @@ def create_query(self, posted_query, project, query, validate_wiql_only=None): def delete_query(self, project, query): """DeleteQuery. - Delete a query or a folder. This deletes any permission change on the deleted query or folder and any of its descendants if it is a folder. It is important to note that the deleted permission changes cannot be recovered upon undeleting the query or folder. + [Preview API] Delete a query or a folder. This deletes any permission change on the deleted query or folder and any of its descendants if it is a folder. It is important to note that the deleted permission changes cannot be recovered upon undeleting the query or folder. :param str project: Project ID or project name :param str query: ID or path of the query or folder to delete. """ @@ -758,12 +813,12 @@ def delete_query(self, project, query): route_values['query'] = self._serialize.url('query', query, 'str') self._send(http_method='DELETE', location_id='a67d190c-c41f-424b-814d-0e906f659301', - version='7.0', + version='7.2-preview.2', route_values=route_values) def get_queries(self, project, expand=None, depth=None, include_deleted=None): """GetQueries. - Gets the root queries and their children + [Preview API] Gets the root queries and their children :param str project: Project ID or project name :param str expand: Include the query string (wiql), clauses, query result columns, and sort options in the results. :param int depth: In the folder of queries, return child queries and folders to this depth. @@ -782,21 +837,21 @@ def get_queries(self, project, expand=None, depth=None, include_deleted=None): query_parameters['$includeDeleted'] = self._serialize.query('include_deleted', include_deleted, 'bool') response = self._send(http_method='GET', location_id='a67d190c-c41f-424b-814d-0e906f659301', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[QueryHierarchyItem]', self._unwrap_collection(response)) def get_query(self, project, query, expand=None, depth=None, include_deleted=None, use_iso_date_format=None): """GetQuery. - Retrieves an individual query and its children + [Preview API] Retrieves an individual query and its children :param str project: Project ID or project name :param str query: ID or path of the query. :param str expand: Include the query string (wiql), clauses, query result columns, and sort options in the results. :param int depth: In the folder of queries, return child queries and folders to this depth. :param bool include_deleted: Include deleted queries and folders :param bool use_iso_date_format: DateTime query clauses will be formatted using a ISO 8601 compliant format - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -814,20 +869,20 @@ def get_query(self, project, query, expand=None, depth=None, include_deleted=Non query_parameters['$useIsoDateFormat'] = self._serialize.query('use_iso_date_format', use_iso_date_format, 'bool') response = self._send(http_method='GET', location_id='a67d190c-c41f-424b-814d-0e906f659301', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters) return self._deserialize('QueryHierarchyItem', response) def search_queries(self, project, filter, top=None, expand=None, include_deleted=None): """SearchQueries. - Searches all queries the user has access to in the current project + [Preview API] Searches all queries the user has access to in the current project :param str project: Project ID or project name :param str filter: The text to filter the queries with. :param int top: The number of queries to return (Default is 50 and maximum is 200). :param str expand: :param bool include_deleted: Include deleted queries and folders - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -843,19 +898,19 @@ def search_queries(self, project, filter, top=None, expand=None, include_deleted query_parameters['$includeDeleted'] = self._serialize.query('include_deleted', include_deleted, 'bool') response = self._send(http_method='GET', location_id='a67d190c-c41f-424b-814d-0e906f659301', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters) return self._deserialize('QueryHierarchyItemsResult', response) def update_query(self, query_update, project, query, undelete_descendants=None): """UpdateQuery. - Update a query or a folder. This allows you to update, rename and move queries and folders. - :param :class:` ` query_update: The query to update. + [Preview API] Update a query or a folder. This allows you to update, rename and move queries and folders. + :param :class:` ` query_update: The query to update. :param str project: Project ID or project name :param str query: The ID or path for the query to update. :param bool undelete_descendants: Undelete the children of this folder. It is important to note that this will not bring back the permission changes that were previously applied to the descendants. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -868,7 +923,7 @@ def update_query(self, query_update, project, query, undelete_descendants=None): content = self._serialize.body(query_update, 'QueryHierarchyItem') response = self._send(http_method='PATCH', location_id='a67d190c-c41f-424b-814d-0e906f659301', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters, content=content) @@ -876,8 +931,8 @@ def update_query(self, query_update, project, query, undelete_descendants=None): def get_queries_batch(self, query_get_request, project): """GetQueriesBatch. - Gets a list of queries by ids (Maximum 1000) - :param :class:` ` query_get_request: + [Preview API] Gets a list of queries by ids (Maximum 1000) + :param :class:` ` query_get_request: :param str project: Project ID or project name :rtype: [QueryHierarchyItem] """ @@ -887,14 +942,14 @@ def get_queries_batch(self, query_get_request, project): content = self._serialize.body(query_get_request, 'QueryBatchGetRequest') response = self._send(http_method='POST', location_id='549816f9-09b0-4e75-9e81-01fbfcd07426', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('[QueryHierarchyItem]', self._unwrap_collection(response)) def destroy_work_item(self, id, project=None): """DestroyWorkItem. - Destroys the specified work item permanently from the Recycle Bin. This action can not be undone. + [Preview API] Destroys the specified work item permanently from the Recycle Bin. This action can not be undone. :param int id: ID of the work item to be destroyed permanently :param str project: Project ID or project name """ @@ -905,15 +960,15 @@ def destroy_work_item(self, id, project=None): route_values['id'] = self._serialize.url('id', id, 'int') self._send(http_method='DELETE', location_id='b70d8d39-926c-465e-b927-b1bf0e5ca0e0', - version='7.0', + version='7.2-preview.2', route_values=route_values) def get_deleted_work_item(self, id, project=None): """GetDeletedWorkItem. - Gets a deleted work item from Recycle Bin. + [Preview API] Gets a deleted work item from Recycle Bin. :param int id: ID of the work item to be returned :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -922,13 +977,13 @@ def get_deleted_work_item(self, id, project=None): route_values['id'] = self._serialize.url('id', id, 'int') response = self._send(http_method='GET', location_id='b70d8d39-926c-465e-b927-b1bf0e5ca0e0', - version='7.0', + version='7.2-preview.2', route_values=route_values) return self._deserialize('WorkItemDelete', response) def get_deleted_work_items(self, ids, project=None): """GetDeletedWorkItems. - Gets the work items from the recycle bin, whose IDs have been specified in the parameters + [Preview API] Gets the work items from the recycle bin, whose IDs have been specified in the parameters :param [int] ids: Comma separated list of IDs of the deleted work items to be returned :param str project: Project ID or project name :rtype: [WorkItemDeleteReference] @@ -942,14 +997,14 @@ def get_deleted_work_items(self, ids, project=None): query_parameters['ids'] = self._serialize.query('ids', ids, 'str') response = self._send(http_method='GET', location_id='b70d8d39-926c-465e-b927-b1bf0e5ca0e0', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[WorkItemDeleteReference]', self._unwrap_collection(response)) def get_deleted_work_item_shallow_references(self, project=None): """GetDeletedWorkItemShallowReferences. - Gets a list of the IDs and the URLs of the deleted the work items in the Recycle Bin. + [Preview API] Gets a list of the IDs and the URLs of the deleted the work items in the Recycle Bin. :param str project: Project ID or project name :rtype: [WorkItemDeleteShallowReference] """ @@ -958,17 +1013,17 @@ def get_deleted_work_item_shallow_references(self, project=None): route_values['project'] = self._serialize.url('project', project, 'str') response = self._send(http_method='GET', location_id='b70d8d39-926c-465e-b927-b1bf0e5ca0e0', - version='7.0', + version='7.2-preview.2', route_values=route_values) return self._deserialize('[WorkItemDeleteShallowReference]', self._unwrap_collection(response)) def restore_work_item(self, payload, id, project=None): """RestoreWorkItem. - Restores the deleted work item from Recycle Bin. - :param :class:` ` payload: Paylod with instructions to update the IsDeleted flag to false + [Preview API] Restores the deleted work item from Recycle Bin. + :param :class:` ` payload: Paylod with instructions to update the IsDeleted flag to false :param int id: ID of the work item to be restored :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -978,19 +1033,19 @@ def restore_work_item(self, payload, id, project=None): content = self._serialize.body(payload, 'WorkItemDeleteUpdate') response = self._send(http_method='PATCH', location_id='b70d8d39-926c-465e-b927-b1bf0e5ca0e0', - version='7.0', + version='7.2-preview.2', route_values=route_values, content=content) return self._deserialize('WorkItemDelete', response) def get_revision(self, id, revision_number, project=None, expand=None): """GetRevision. - Returns a fully hydrated work item for the requested revision + [Preview API] Returns a fully hydrated work item for the requested revision :param int id: :param int revision_number: :param str project: Project ID or project name :param str expand: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -1004,14 +1059,14 @@ def get_revision(self, id, revision_number, project=None, expand=None): query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') response = self._send(http_method='GET', location_id='a00c85a5-80fa-4565-99c3-bcd2181434bb', - version='7.0', + version='7.2-preview.3', route_values=route_values, query_parameters=query_parameters) return self._deserialize('WorkItem', response) def get_revisions(self, id, project=None, top=None, skip=None, expand=None): """GetRevisions. - Returns the list of fully hydrated work item revisions, paged. + [Preview API] Returns the list of fully hydrated work item revisions, paged. :param int id: :param str project: Project ID or project name :param int top: @@ -1033,15 +1088,15 @@ def get_revisions(self, id, project=None, top=None, skip=None, expand=None): query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') response = self._send(http_method='GET', location_id='a00c85a5-80fa-4565-99c3-bcd2181434bb', - version='7.0', + version='7.2-preview.3', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[WorkItem]', self._unwrap_collection(response)) def send_mail(self, body, project=None): """SendMail. - RESTful method to send mail for selected/queried work items. - :param :class:` ` body: + [Preview API] RESTful method to send mail for selected/queried work items. + :param :class:` ` body: :param str project: Project ID or project name """ route_values = {} @@ -1050,14 +1105,15 @@ def send_mail(self, body, project=None): content = self._serialize.body(body, 'SendMailBody') self._send(http_method='POST', location_id='12438500-2f84-4fa7-9f1a-c31871b4959d', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) def delete_tag(self, project, tag_id_or_name): """DeleteTag. + [Preview API] Delete the tag for the project. Please note, that the deleted tag will be removed from all Work Items as well as Pull Requests. :param str project: Project ID or project name - :param str tag_id_or_name: + :param str tag_id_or_name: Tag ID or tag name. """ route_values = {} if project is not None: @@ -1066,14 +1122,15 @@ def delete_tag(self, project, tag_id_or_name): route_values['tagIdOrName'] = self._serialize.url('tag_id_or_name', tag_id_or_name, 'str') self._send(http_method='DELETE', location_id='bc15bc60-e7a8-43cb-ab01-2106be3983a1', - version='7.0', + version='7.2-preview.1', route_values=route_values) def get_tag(self, project, tag_id_or_name): """GetTag. + [Preview API] Get the tag for the project. :param str project: Project ID or project name - :param str tag_id_or_name: - :rtype: :class:` ` + :param str tag_id_or_name: Tag ID or tag name. + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -1082,12 +1139,13 @@ def get_tag(self, project, tag_id_or_name): route_values['tagIdOrName'] = self._serialize.url('tag_id_or_name', tag_id_or_name, 'str') response = self._send(http_method='GET', location_id='bc15bc60-e7a8-43cb-ab01-2106be3983a1', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('WorkItemTagDefinition', response) def get_tags(self, project): """GetTags. + [Preview API] Get all the tags for the project. :param str project: Project ID or project name :rtype: [WorkItemTagDefinition] """ @@ -1096,16 +1154,17 @@ def get_tags(self, project): route_values['project'] = self._serialize.url('project', project, 'str') response = self._send(http_method='GET', location_id='bc15bc60-e7a8-43cb-ab01-2106be3983a1', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('[WorkItemTagDefinition]', self._unwrap_collection(response)) def update_tag(self, tag_data, project, tag_id_or_name): """UpdateTag. - :param :class:` ` tag_data: + [Preview API] Update the tag for the project. + :param :class:` ` tag_data: :param str project: Project ID or project name - :param str tag_id_or_name: - :rtype: :class:` ` + :param str tag_id_or_name: Tag ID or tag name. + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -1115,17 +1174,17 @@ def update_tag(self, tag_data, project, tag_id_or_name): content = self._serialize.body(tag_data, 'WorkItemTagDefinition') response = self._send(http_method='PATCH', location_id='bc15bc60-e7a8-43cb-ab01-2106be3983a1', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('WorkItemTagDefinition', response) def create_template(self, template, team_context): """CreateTemplate. - Creates a template - :param :class:` ` template: Template contents - :param :class:` ` team_context: The team context for the operation - :rtype: :class:` ` + [Preview API] Creates a template + :param :class:` ` template: Template contents + :param :class:` ` team_context: The team context for the operation + :rtype: :class:` ` """ project = None team = None @@ -1147,15 +1206,15 @@ def create_template(self, template, team_context): content = self._serialize.body(template, 'WorkItemTemplate') response = self._send(http_method='POST', location_id='6a90345f-a676-4969-afce-8e163e1d5642', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('WorkItemTemplate', response) def get_templates(self, team_context, workitemtypename=None): """GetTemplates. - Gets template - :param :class:` ` team_context: The team context for the operation + [Preview API] Gets template + :param :class:` ` team_context: The team context for the operation :param str workitemtypename: Optional, When specified returns templates for given Work item type. :rtype: [WorkItemTemplateReference] """ @@ -1181,15 +1240,15 @@ def get_templates(self, team_context, workitemtypename=None): query_parameters['workitemtypename'] = self._serialize.query('workitemtypename', workitemtypename, 'str') response = self._send(http_method='GET', location_id='6a90345f-a676-4969-afce-8e163e1d5642', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[WorkItemTemplateReference]', self._unwrap_collection(response)) def delete_template(self, team_context, template_id): """DeleteTemplate. - Deletes the template with given id - :param :class:` ` team_context: The team context for the operation + [Preview API] Deletes the template with given id + :param :class:` ` team_context: The team context for the operation :param str template_id: Template id """ project = None @@ -1213,15 +1272,15 @@ def delete_template(self, team_context, template_id): route_values['templateId'] = self._serialize.url('template_id', template_id, 'str') self._send(http_method='DELETE', location_id='fb10264a-8836-48a0-8033-1b0ccd2748d5', - version='7.0', + version='7.2-preview.1', route_values=route_values) def get_template(self, team_context, template_id): """GetTemplate. - Gets the template with specified id - :param :class:` ` team_context: The team context for the operation + [Preview API] Gets the template with specified id + :param :class:` ` team_context: The team context for the operation :param str template_id: Template Id - :rtype: :class:` ` + :rtype: :class:` ` """ project = None team = None @@ -1244,17 +1303,17 @@ def get_template(self, team_context, template_id): route_values['templateId'] = self._serialize.url('template_id', template_id, 'str') response = self._send(http_method='GET', location_id='fb10264a-8836-48a0-8033-1b0ccd2748d5', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('WorkItemTemplate', response) def replace_template(self, template_content, team_context, template_id): """ReplaceTemplate. - Replace template contents - :param :class:` ` template_content: Template contents to replace with - :param :class:` ` team_context: The team context for the operation + [Preview API] Replace template contents + :param :class:` ` template_content: Template contents to replace with + :param :class:` ` team_context: The team context for the operation :param str template_id: Template id - :rtype: :class:` ` + :rtype: :class:` ` """ project = None team = None @@ -1278,18 +1337,62 @@ def replace_template(self, template_content, team_context, template_id): content = self._serialize.body(template_content, 'WorkItemTemplate') response = self._send(http_method='PUT', location_id='fb10264a-8836-48a0-8033-1b0ccd2748d5', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('WorkItemTemplate', response) + def create_temp_query(self, posted_query, project): + """CreateTempQuery. + [Preview API] Creates a temporary query + :param :class:` ` posted_query: The temporary query to create + :param str project: Project ID or project name + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(posted_query, 'TemporaryQueryRequestModel') + response = self._send(http_method='POST', + location_id='9f614388-a9f0-4952-ad6c-89756bd8e388', + version='7.2-preview.1', + route_values=route_values, + content=content) + return self._deserialize('TemporaryQueryResponseModel', response) + + def get_single_update(self, id, update_number, source, project=None): + """GetSingleUpdate. + [Preview API] Returns a single update for a work item + :param int id: The work item id + :param long update_number: An identifier of the specific work item update + :param str source: String representation of the source + :param str project: Project ID or project name + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'int') + if update_number is not None: + route_values['updateNumber'] = self._serialize.url('update_number', update_number, 'long') + query_parameters = {} + if source is not None: + query_parameters['source'] = self._serialize.query('source', source, 'str') + response = self._send(http_method='GET', + location_id='6570bf97-d02c-4a91-8d93-3abe9895b1a9', + version='7.2-preview.4', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('WorkItemUpdate2', response) + def get_update(self, id, update_number, project=None): """GetUpdate. - Returns a single update for a work item + [Preview API] Returns a single update for a work item :param int id: :param int update_number: :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -1300,13 +1403,13 @@ def get_update(self, id, update_number, project=None): route_values['updateNumber'] = self._serialize.url('update_number', update_number, 'int') response = self._send(http_method='GET', location_id='6570bf97-d02c-4a91-8d93-3abe9895b1a9', - version='7.0', + version='7.2-preview.4', route_values=route_values) return self._deserialize('WorkItemUpdate', response) def get_updates(self, id, project=None, top=None, skip=None): """GetUpdates. - Returns a the deltas between work item revisions + [Preview API] Returns the deltas between work item revisions :param int id: :param str project: Project ID or project name :param int top: @@ -1325,19 +1428,19 @@ def get_updates(self, id, project=None, top=None, skip=None): query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') response = self._send(http_method='GET', location_id='6570bf97-d02c-4a91-8d93-3abe9895b1a9', - version='7.0', + version='7.2-preview.4', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[WorkItemUpdate]', self._unwrap_collection(response)) def query_by_wiql(self, wiql, team_context=None, time_precision=None, top=None): """QueryByWiql. - Gets the results of the query given its WIQL. - :param :class:` ` wiql: The query containing the WIQL. - :param :class:` ` team_context: The team context for the operation + [Preview API] Gets the results of the query given its WIQL. + :param :class:` ` wiql: The query containing the WIQL. + :param :class:` ` team_context: The team context for the operation :param bool time_precision: Whether or not to use time precision. :param int top: The max number of results to return. - :rtype: :class:` ` + :rtype: :class:` ` """ project = None team = None @@ -1364,7 +1467,7 @@ def query_by_wiql(self, wiql, team_context=None, time_precision=None, top=None): content = self._serialize.body(wiql, 'Wiql') response = self._send(http_method='POST', location_id='1a9c53f7-f243-4447-b110-35ef023636e4', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters, content=content) @@ -1372,9 +1475,9 @@ def query_by_wiql(self, wiql, team_context=None, time_precision=None, top=None): def get_query_result_count(self, id, team_context=None, time_precision=None, top=None): """GetQueryResultCount. - Gets the results of the query given the query ID. + [Preview API] Gets the results of the query given the query ID. :param str id: The query ID. - :param :class:` ` team_context: The team context for the operation + :param :class:` ` team_context: The team context for the operation :param bool time_precision: Whether or not to use time precision. :param int top: The max number of results to return. :rtype: int @@ -1405,19 +1508,19 @@ def get_query_result_count(self, id, team_context=None, time_precision=None, top query_parameters['$top'] = self._serialize.query('top', top, 'int') response = self._send(http_method='HEAD', location_id='a02355f5-5f8a-4671-8e32-369d23aac83d', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters) return self._deserialize('int', response) def query_by_id(self, id, team_context=None, time_precision=None, top=None): """QueryById. - Gets the results of the query given the query ID. + [Preview API] Gets the results of the query given the query ID. :param str id: The query ID. - :param :class:` ` team_context: The team context for the operation + :param :class:` ` team_context: The team context for the operation :param bool time_precision: Whether or not to use time precision. :param int top: The max number of results to return. - :rtype: :class:` ` + :rtype: :class:` ` """ project = None team = None @@ -1445,18 +1548,18 @@ def query_by_id(self, id, team_context=None, time_precision=None, top=None): query_parameters['$top'] = self._serialize.query('top', top, 'int') response = self._send(http_method='GET', location_id='a02355f5-5f8a-4671-8e32-369d23aac83d', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters) return self._deserialize('WorkItemQueryResult', response) def get_work_item_icon_json(self, icon, color=None, v=None): """GetWorkItemIconJson. - Get a work item icon given the friendly name and icon color. + [Preview API] Get a work item icon given the friendly name and icon color. :param str icon: The name of the icon :param str color: The 6-digit hex color for the icon :param int v: The version of the icon (used only for cache invalidation) - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if icon is not None: @@ -1468,24 +1571,24 @@ def get_work_item_icon_json(self, icon, color=None, v=None): query_parameters['v'] = self._serialize.query('v', v, 'int') response = self._send(http_method='GET', location_id='4e1eb4a5-1970-4228-a682-ec48eb2dca30', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('WorkItemIcon', response) def get_work_item_icons(self): """GetWorkItemIcons. - Get a list of all work item icons. + [Preview API] Get a list of all work item icons. :rtype: [WorkItemIcon] """ response = self._send(http_method='GET', location_id='4e1eb4a5-1970-4228-a682-ec48eb2dca30', - version='7.0') + version='7.2-preview.1') return self._deserialize('[WorkItemIcon]', self._unwrap_collection(response)) def get_work_item_icon_svg(self, icon, color=None, v=None, **kwargs): """GetWorkItemIconSvg. - Get a work item icon given the friendly name and icon color. + [Preview API] Get a work item icon given the friendly name and icon color. :param str icon: The name of the icon :param str color: The 6-digit hex color for the icon :param int v: The version of the icon (used only for cache invalidation) @@ -1501,7 +1604,7 @@ def get_work_item_icon_svg(self, icon, color=None, v=None, **kwargs): query_parameters['v'] = self._serialize.query('v', v, 'int') response = self._send(http_method='GET', location_id='4e1eb4a5-1970-4228-a682-ec48eb2dca30', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters, accept_media_type='image/svg+xml') @@ -1513,7 +1616,7 @@ def get_work_item_icon_svg(self, icon, color=None, v=None, **kwargs): def get_work_item_icon_xaml(self, icon, color=None, v=None, **kwargs): """GetWorkItemIconXaml. - Get a work item icon given the friendly name and icon color. + [Preview API] Get a work item icon given the friendly name and icon color. :param str icon: The name of the icon :param str color: The 6-digit hex color for the icon :param int v: The version of the icon (used only for cache invalidation) @@ -1529,7 +1632,7 @@ def get_work_item_icon_xaml(self, icon, color=None, v=None, **kwargs): query_parameters['v'] = self._serialize.query('v', v, 'int') response = self._send(http_method='GET', location_id='4e1eb4a5-1970-4228-a682-ec48eb2dca30', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters, accept_media_type='image/xaml+xml') @@ -1541,13 +1644,13 @@ def get_work_item_icon_xaml(self, icon, color=None, v=None, **kwargs): def get_reporting_links_by_link_type(self, project=None, link_types=None, types=None, continuation_token=None, start_date_time=None): """GetReportingLinksByLinkType. - Get a batch of work item links + [Preview API] Get a batch of work item links :param str project: Project ID or project name :param [str] link_types: A list of types to filter the results to specific link types. Omit this parameter to get work item links of all link types. :param [str] types: A list of types to filter the results to specific work item types. Omit this parameter to get work item links of all work item types. :param str continuation_token: Specifies the continuationToken to start the batch from. Omit this parameter to get the first batch of links. :param datetime start_date_time: Date/time to use as a starting point for link changes. Only link changes that occurred after that date/time will be returned. Cannot be used in conjunction with 'watermark' parameter. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -1565,39 +1668,39 @@ def get_reporting_links_by_link_type(self, project=None, link_types=None, types= query_parameters['startDateTime'] = self._serialize.query('start_date_time', start_date_time, 'iso-8601') response = self._send(http_method='GET', location_id='b5b5b6d0-0308-40a1-b3f4-b9bb3c66878f', - version='7.0', + version='7.2-preview.3', route_values=route_values, query_parameters=query_parameters) return self._deserialize('ReportingWorkItemLinksBatch', response) def get_relation_type(self, relation): """GetRelationType. - Gets the work item relation type definition. + [Preview API] Gets the work item relation type definition. :param str relation: The relation name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if relation is not None: route_values['relation'] = self._serialize.url('relation', relation, 'str') response = self._send(http_method='GET', location_id='f5d33bc9-5b49-4a3c-a9bd-f3cd46dd2165', - version='7.0', + version='7.2-preview.2', route_values=route_values) return self._deserialize('WorkItemRelationType', response) def get_relation_types(self): """GetRelationTypes. - Gets the work item relation types. + [Preview API] Gets the work item relation types. :rtype: [WorkItemRelationType] """ response = self._send(http_method='GET', location_id='f5d33bc9-5b49-4a3c-a9bd-f3cd46dd2165', - version='7.0') + version='7.2-preview.2') return self._deserialize('[WorkItemRelationType]', self._unwrap_collection(response)) def read_reporting_revisions_get(self, project=None, fields=None, types=None, continuation_token=None, start_date_time=None, include_identity_ref=None, include_deleted=None, include_tag_ref=None, include_latest_only=None, expand=None, include_discussion_changes_only=None, max_page_size=None): """ReadReportingRevisionsGet. - Get a batch of work item revisions with the option of including deleted items + [Preview API] Get a batch of work item revisions with the option of including deleted items :param str project: Project ID or project name :param [str] fields: A list of fields to return in work item revisions. Omit this parameter to get all reportable fields. :param [str] types: A list of types to filter the results to specific work item types. Omit this parameter to get work item revisions of all work item types. @@ -1610,7 +1713,7 @@ def read_reporting_revisions_get(self, project=None, fields=None, types=None, co :param str expand: Return all the fields in work item revisions, including long text fields which are not returned by default :param bool include_discussion_changes_only: Return only the those revisions of work items, where only history field was changed :param int max_page_size: The maximum number of results to return in this batch - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -1642,20 +1745,20 @@ def read_reporting_revisions_get(self, project=None, fields=None, types=None, co query_parameters['$maxPageSize'] = self._serialize.query('max_page_size', max_page_size, 'int') response = self._send(http_method='GET', location_id='f828fe59-dd87-495d-a17c-7a8d6211ca6c', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters) return self._deserialize('ReportingWorkItemRevisionsBatch', response) def read_reporting_revisions_post(self, filter, project=None, continuation_token=None, start_date_time=None, expand=None): """ReadReportingRevisionsPost. - Get a batch of work item revisions. This request may be used if your list of fields is large enough that it may run the URL over the length limit. - :param :class:` ` filter: An object that contains request settings: field filter, type filter, identity format + [Preview API] Get a batch of work item revisions. This request may be used if your list of fields is large enough that it may run the URL over the length limit. + :param :class:` ` filter: An object that contains request settings: field filter, type filter, identity format :param str project: Project ID or project name :param str continuation_token: Specifies the watermark to start the batch from. Omit this parameter to get the first batch of revisions. :param datetime start_date_time: Date/time to use as a starting point for revisions, all revisions will occur after this date/time. Cannot be used in conjunction with 'watermark' parameter. :param str expand: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -1670,7 +1773,7 @@ def read_reporting_revisions_post(self, filter, project=None, continuation_token content = self._serialize.body(filter, 'ReportingWorkItemRevisionsFilter') response = self._send(http_method='POST', location_id='f828fe59-dd87-495d-a17c-7a8d6211ca6c', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters, content=content) @@ -1678,10 +1781,11 @@ def read_reporting_revisions_post(self, filter, project=None, continuation_token def read_reporting_discussions(self, project=None, continuation_token=None, max_page_size=None): """ReadReportingDiscussions. + [Preview API] :param str project: Project ID or project name :param str continuation_token: :param int max_page_size: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -1693,22 +1797,22 @@ def read_reporting_discussions(self, project=None, continuation_token=None, max_ query_parameters['$maxPageSize'] = self._serialize.query('max_page_size', max_page_size, 'int') response = self._send(http_method='GET', location_id='4a644469-90c5-4fcc-9a9f-be0827d369ec', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('ReportingWorkItemRevisionsBatch', response) def create_work_item(self, document, project, type, validate_only=None, bypass_rules=None, suppress_notifications=None, expand=None): """CreateWorkItem. - Creates a single work item. - :param :class:`<[JsonPatchOperation]> ` document: The JSON Patch document representing the work item + [Preview API] Creates a single work item. + :param :class:`<[JsonPatchOperation]> ` document: The JSON Patch document representing the work item :param str project: Project ID or project name :param str type: The work item type of the work item to create :param bool validate_only: Indicate if you only want to validate the changes without saving the work item :param bool bypass_rules: Do not enforce the work item type rules on this update :param bool suppress_notifications: Do not fire any notifications for this change :param str expand: The expand parameters for work item attributes. Possible options are { None, Relations, Fields, Links, All }. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -1727,7 +1831,7 @@ def create_work_item(self, document, project, type, validate_only=None, bypass_r content = self._serialize.body(document, '[JsonPatchOperation]') response = self._send(http_method='POST', location_id='62d3d110-0047-428c-ad3c-4fe872c91c74', - version='7.0', + version='7.2-preview.3', route_values=route_values, query_parameters=query_parameters, content=content, @@ -1736,13 +1840,13 @@ def create_work_item(self, document, project, type, validate_only=None, bypass_r def get_work_item_template(self, project, type, fields=None, as_of=None, expand=None): """GetWorkItemTemplate. - Returns a single work item from a template. + [Preview API] Returns a single work item from a template. :param str project: Project ID or project name :param str type: The work item type name :param str fields: Comma-separated list of requested fields :param datetime as_of: AsOf UTC date time string :param str expand: The expand parameters for work item attributes. Possible options are { None, Relations, Fields, Links, All }. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -1758,18 +1862,18 @@ def get_work_item_template(self, project, type, fields=None, as_of=None, expand= query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') response = self._send(http_method='GET', location_id='62d3d110-0047-428c-ad3c-4fe872c91c74', - version='7.0', + version='7.2-preview.3', route_values=route_values, query_parameters=query_parameters) return self._deserialize('WorkItem', response) def delete_work_item(self, id, project=None, destroy=None): """DeleteWorkItem. - Deletes the specified work item and sends it to the Recycle Bin, so that it can be restored back, if required. Optionally, if the destroy parameter has been set to true, it destroys the work item permanently. WARNING: If the destroy parameter is set to true, work items deleted by this command will NOT go to recycle-bin and there is no way to restore/recover them after deletion. It is recommended NOT to use this parameter. If you do, please use this parameter with extreme caution. + [Preview API] Deletes the specified work item and sends it to the Recycle Bin, so that it can be restored back, if required. Optionally, if the destroy parameter has been set to true, it destroys the work item permanently. WARNING: If the destroy parameter is set to true, work items deleted by this command will NOT go to recycle-bin and there is no way to restore/recover them after deletion. It is recommended NOT to use this parameter. If you do, please use this parameter with extreme caution. :param int id: ID of the work item to be deleted :param str project: Project ID or project name :param bool destroy: Optional parameter, if set to true, the work item is deleted permanently. Please note: the destroy action is PERMANENT and cannot be undone. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -1781,20 +1885,20 @@ def delete_work_item(self, id, project=None, destroy=None): query_parameters['destroy'] = self._serialize.query('destroy', destroy, 'bool') response = self._send(http_method='DELETE', location_id='72c7ddf8-2cdc-4f60-90cd-ab71c14a399b', - version='7.0', + version='7.2-preview.3', route_values=route_values, query_parameters=query_parameters) return self._deserialize('WorkItemDelete', response) def get_work_item(self, id, project=None, fields=None, as_of=None, expand=None): """GetWorkItem. - Returns a single work item. + [Preview API] Returns a single work item. :param int id: The work item id :param str project: Project ID or project name :param [str] fields: Comma-separated list of requested fields :param datetime as_of: AsOf UTC date time string :param str expand: The expand parameters for work item attributes. Possible options are { None, Relations, Fields, Links, All }. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -1811,14 +1915,14 @@ def get_work_item(self, id, project=None, fields=None, as_of=None, expand=None): query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') response = self._send(http_method='GET', location_id='72c7ddf8-2cdc-4f60-90cd-ab71c14a399b', - version='7.0', + version='7.2-preview.3', route_values=route_values, query_parameters=query_parameters) return self._deserialize('WorkItem', response) def get_work_items(self, ids, project=None, fields=None, as_of=None, expand=None, error_policy=None): """GetWorkItems. - Returns a list of work items (Maximum 200) + [Preview API] Returns a list of work items (Maximum 200) :param [int] ids: The comma-separated list of requested work item ids. (Maximum 200 ids allowed). :param str project: Project ID or project name :param [str] fields: Comma-separated list of requested fields @@ -1845,22 +1949,22 @@ def get_work_items(self, ids, project=None, fields=None, as_of=None, expand=None query_parameters['errorPolicy'] = self._serialize.query('error_policy', error_policy, 'str') response = self._send(http_method='GET', location_id='72c7ddf8-2cdc-4f60-90cd-ab71c14a399b', - version='7.0', + version='7.2-preview.3', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[WorkItem]', self._unwrap_collection(response)) def update_work_item(self, document, id, project=None, validate_only=None, bypass_rules=None, suppress_notifications=None, expand=None): """UpdateWorkItem. - Updates a single work item. - :param :class:`<[JsonPatchOperation]> ` document: The JSON Patch document representing the update + [Preview API] Updates a single work item. + :param :class:`<[JsonPatchOperation]> ` document: The JSON Patch document representing the update :param int id: The id of the work item to update :param str project: Project ID or project name :param bool validate_only: Indicate if you only want to validate the changes without saving the work item :param bool bypass_rules: Do not enforce the work item type rules on this update :param bool suppress_notifications: Do not fire any notifications for this change :param str expand: The expand parameters for work item attributes. Possible options are { None, Relations, Fields, Links, All }. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -1879,7 +1983,7 @@ def update_work_item(self, document, id, project=None, validate_only=None, bypas content = self._serialize.body(document, '[JsonPatchOperation]') response = self._send(http_method='PATCH', location_id='72c7ddf8-2cdc-4f60-90cd-ab71c14a399b', - version='7.0', + version='7.2-preview.3', route_values=route_values, query_parameters=query_parameters, content=content, @@ -1888,8 +1992,8 @@ def update_work_item(self, document, id, project=None, validate_only=None, bypas def get_work_items_batch(self, work_item_get_request, project=None): """GetWorkItemsBatch. - Gets work items for a list of work item ids (Maximum 200) - :param :class:` ` work_item_get_request: + [Preview API] Gets work items for a list of work item ids (Maximum 200) + :param :class:` ` work_item_get_request: :param str project: Project ID or project name :rtype: [WorkItem] """ @@ -1899,14 +2003,32 @@ def get_work_items_batch(self, work_item_get_request, project=None): content = self._serialize.body(work_item_get_request, 'WorkItemBatchGetRequest') response = self._send(http_method='POST', location_id='908509b6-4248-4475-a1cd-829139ba419f', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('[WorkItem]', self._unwrap_collection(response)) + def delete_work_items(self, delete_request, project=None): + """DeleteWorkItems. + [Preview API] Deletes specified work items and sends them to the Recycle Bin, so that it can be restored back, if required. Optionally, if the destroy parameter has been set to true, it destroys the work item permanently. WARNING: If the destroy parameter is set to true, work items deleted by this command will NOT go to recycle-bin and there is no way to restore/recover them after deletion. + :param :class:` ` delete_request: + :param str project: Project ID or project name + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(delete_request, 'WorkItemDeleteBatchRequest') + response = self._send(http_method='POST', + location_id='8bc57545-27e5-420d-b709-f6e3ebcc1fc1', + version='7.2-preview.1', + route_values=route_values, + content=content) + return self._deserialize('WorkItemDeleteBatch', response) + def get_work_item_next_states_on_checkin_action(self, ids, action=None): """GetWorkItemNextStatesOnCheckinAction. - Returns the next state on the given work item IDs. + [Preview API] Returns the next state on the given work item IDs. :param [int] ids: list of work item ids :param str action: possible actions. Currently only supports checkin :rtype: [WorkItemNextStateOnTransition] @@ -1919,13 +2041,13 @@ def get_work_item_next_states_on_checkin_action(self, ids, action=None): query_parameters['action'] = self._serialize.query('action', action, 'str') response = self._send(http_method='GET', location_id='afae844b-e2f6-44c2-8053-17b3bb936a40', - version='7.0', + version='7.2-preview.1', query_parameters=query_parameters) return self._deserialize('[WorkItemNextStateOnTransition]', self._unwrap_collection(response)) def get_work_item_type_categories(self, project): """GetWorkItemTypeCategories. - Get all work item type categories. + [Preview API] Get all work item type categories. :param str project: Project ID or project name :rtype: [WorkItemTypeCategory] """ @@ -1934,16 +2056,16 @@ def get_work_item_type_categories(self, project): route_values['project'] = self._serialize.url('project', project, 'str') response = self._send(http_method='GET', location_id='9b9f5734-36c8-415e-ba67-f83b45c31408', - version='7.0', + version='7.2-preview.2', route_values=route_values) return self._deserialize('[WorkItemTypeCategory]', self._unwrap_collection(response)) def get_work_item_type_category(self, project, category): """GetWorkItemTypeCategory. - Get specific work item type category by name. + [Preview API] Get specific work item type category by name. :param str project: Project ID or project name :param str category: The category name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -1952,16 +2074,16 @@ def get_work_item_type_category(self, project, category): route_values['category'] = self._serialize.url('category', category, 'str') response = self._send(http_method='GET', location_id='9b9f5734-36c8-415e-ba67-f83b45c31408', - version='7.0', + version='7.2-preview.2', route_values=route_values) return self._deserialize('WorkItemTypeCategory', response) def get_work_item_type(self, project, type): """GetWorkItemType. - Returns a work item type definition. + [Preview API] Returns a work item type definition. :param str project: Project ID or project name :param str type: Work item type name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -1970,13 +2092,13 @@ def get_work_item_type(self, project, type): route_values['type'] = self._serialize.url('type', type, 'str') response = self._send(http_method='GET', location_id='7c8d7a76-4a09-43e8-b5df-bd792f4ac6aa', - version='7.0', + version='7.2-preview.2', route_values=route_values) return self._deserialize('WorkItemType', response) def get_work_item_types(self, project): """GetWorkItemTypes. - Returns the list of work item types + [Preview API] Returns the list of work item types :param str project: Project ID or project name :rtype: [WorkItemType] """ @@ -1985,13 +2107,13 @@ def get_work_item_types(self, project): route_values['project'] = self._serialize.url('project', project, 'str') response = self._send(http_method='GET', location_id='7c8d7a76-4a09-43e8-b5df-bd792f4ac6aa', - version='7.0', + version='7.2-preview.2', route_values=route_values) return self._deserialize('[WorkItemType]', self._unwrap_collection(response)) def get_work_item_type_fields_with_references(self, project, type, expand=None): """GetWorkItemTypeFieldsWithReferences. - Get a list of fields for a work item type with detailed references. + [Preview API] Get a list of fields for a work item type with detailed references. :param str project: Project ID or project name :param str type: Work item type. :param str expand: Expand level for the API response. Properties: to include allowedvalues, default value, isRequired etc. as a part of response; None: to skip these properties. @@ -2007,19 +2129,19 @@ def get_work_item_type_fields_with_references(self, project, type, expand=None): query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') response = self._send(http_method='GET', location_id='bd293ce5-3d25-4192-8e67-e8092e879efb', - version='7.0', + version='7.2-preview.3', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[WorkItemTypeFieldWithReferences]', self._unwrap_collection(response)) def get_work_item_type_field_with_references(self, project, type, field, expand=None): """GetWorkItemTypeFieldWithReferences. - Get a field for a work item type with detailed references. + [Preview API] Get a field for a work item type with detailed references. :param str project: Project ID or project name :param str type: Work item type. :param str field: :param str expand: Expand level for the API response. Properties: to include allowedvalues, default value, isRequired etc. as a part of response; None: to skip these properties. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -2033,14 +2155,14 @@ def get_work_item_type_field_with_references(self, project, type, field, expand= query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') response = self._send(http_method='GET', location_id='bd293ce5-3d25-4192-8e67-e8092e879efb', - version='7.0', + version='7.2-preview.3', route_values=route_values, query_parameters=query_parameters) return self._deserialize('WorkItemTypeFieldWithReferences', response) def get_work_item_type_states(self, project, type): """GetWorkItemTypeStates. - Returns the state names and colors for a work item type. + [Preview API] Returns the state names and colors for a work item type. :param str project: Project ID or project name :param str type: The state name :rtype: [WorkItemStateColor] @@ -2052,7 +2174,7 @@ def get_work_item_type_states(self, project, type): route_values['type'] = self._serialize.url('type', type, 'str') response = self._send(http_method='GET', location_id='7c9d7a76-4a09-43e8-b5df-bd792f4ac6aa', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('[WorkItemStateColor]', self._unwrap_collection(response)) diff --git a/azure-devops/azure/devops/v7_0/work_item_tracking_process/__init__.py b/azure-devops/azure/devops/v7_2/work_item_tracking_process/__init__.py similarity index 100% rename from azure-devops/azure/devops/v7_0/work_item_tracking_process/__init__.py rename to azure-devops/azure/devops/v7_2/work_item_tracking_process/__init__.py diff --git a/azure-devops/azure/devops/v7_0/work_item_tracking_process/models.py b/azure-devops/azure/devops/v7_2/work_item_tracking_process/models.py similarity index 95% rename from azure-devops/azure/devops/v7_0/work_item_tracking_process/models.py rename to azure-devops/azure/devops/v7_2/work_item_tracking_process/models.py index 9d59d436..08551239 100644 --- a/azure-devops/azure/devops/v7_0/work_item_tracking_process/models.py +++ b/azure-devops/azure/devops/v7_2/work_item_tracking_process/models.py @@ -51,7 +51,7 @@ class Control(Model): Represent a control in the form. :param contribution: Contribution for the control. - :type contribution: :class:`WitContribution ` + :type contribution: :class:`WitContribution ` :param control_type: Type of the control. :type control_type: str :param height: Height of the control, for html controls. @@ -145,9 +145,9 @@ class CreateProcessRuleRequest(Model): Request object/class for creating a rule on a work item type. :param actions: List of actions to take when the rule is triggered. - :type actions: list of :class:`RuleAction ` + :type actions: list of :class:`RuleAction ` :param conditions: List of conditions when the rule should be triggered. - :type conditions: list of :class:`RuleCondition ` + :type conditions: list of :class:`RuleCondition ` :param is_disabled: Indicates if the rule is disabled. :type is_disabled: bool :param name: Name for the rule. @@ -231,6 +231,8 @@ class FieldModel(Model): :type id: str :param is_identity: :type is_identity: bool + :param is_locked: + :type is_locked: bool :param name: :type name: str :param type: @@ -243,16 +245,18 @@ class FieldModel(Model): 'description': {'key': 'description', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, 'is_identity': {'key': 'isIdentity', 'type': 'bool'}, + 'is_locked': {'key': 'isLocked', 'type': 'bool'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'object'}, 'url': {'key': 'url', 'type': 'str'} } - def __init__(self, description=None, id=None, is_identity=None, name=None, type=None, url=None): + def __init__(self, description=None, id=None, is_identity=None, is_locked=None, name=None, type=None, url=None): super(FieldModel, self).__init__() self.description = description self.id = id self.is_identity = is_identity + self.is_locked = is_locked self.name = name self.type = type self.url = url @@ -261,9 +265,9 @@ def __init__(self, description=None, id=None, is_identity=None, name=None, type= class FieldRuleModel(Model): """ :param actions: - :type actions: list of :class:`RuleActionModel ` + :type actions: list of :class:`RuleActionModel ` :param conditions: - :type conditions: list of :class:`RuleConditionModel ` + :type conditions: list of :class:`RuleConditionModel ` :param friendly_name: :type friendly_name: str :param id: @@ -298,11 +302,11 @@ class FormLayout(Model): Describes the layout of a work item type :param extensions: Gets and sets extensions list. - :type extensions: list of :class:`Extension ` + :type extensions: list of :class:`Extension ` :param pages: Top level tabs of the layout. - :type pages: list of :class:`Page ` + :type pages: list of :class:`Page ` :param system_controls: Headers controls of the layout. - :type system_controls: list of :class:`Control ` + :type system_controls: list of :class:`Control ` """ _attribute_map = { @@ -323,9 +327,9 @@ class Group(Model): Represent a group in the form that holds controls in it. :param contribution: Contribution for the group. - :type contribution: :class:`WitContribution ` + :type contribution: :class:`WitContribution ` :param controls: Controls to be put in the group. - :type controls: list of :class:`Control ` + :type controls: list of :class:`Control ` :param height: The height for the contribution. :type height: int :param id: The id for the layout node. @@ -393,7 +397,7 @@ class Page(Model): Describes a page in the work item form layout :param contribution: Contribution for the page. - :type contribution: :class:`WitContribution ` + :type contribution: :class:`WitContribution ` :param id: The id for the layout node. :type id: str :param inherited: A value indicating whether this layout node has been inherited from a parent layout. This is expected to only be only set by the combiner. @@ -411,7 +415,7 @@ class Page(Model): :param page_type: The icon for the page. :type page_type: object :param sections: The sections of the page. - :type sections: list of :class:`Section ` + :type sections: list of :class:`Section ` :param visible: A value indicating if the page should be hidden or not. :type visible: bool """ @@ -484,14 +488,14 @@ class ProcessBehavior(Model): :param color: Color. :type color: str - :param customization: Indicates the type of customization on this work item. System behaviors are inherited from parent process but not modified. Inherited behaviors are modified modified behaviors that were inherited from parent process. Custom behaviors are behaviors created by user in current process. + :param customization: Indicates the type of customization on this work item. System behaviors are inherited from parent process but not modified. Inherited behaviors are modified behaviors that were inherited from parent process. Custom behaviors are behaviors created by user in current process. :type customization: object :param description: . Description :type description: str :param fields: Process Behavior Fields. - :type fields: list of :class:`ProcessBehaviorField ` + :type fields: list of :class:`ProcessBehaviorField ` :param inherits: Parent behavior reference. - :type inherits: :class:`ProcessBehaviorReference ` + :type inherits: :class:`ProcessBehaviorReference ` :param name: Behavior Name. :type name: str :param rank: Rank of the behavior @@ -640,7 +644,7 @@ class ProcessInfo(Model): :param parent_process_type_id: ID of the parent process. :type parent_process_type_id: str :param projects: Projects in this process to which the user is subscribed to. - :type projects: list of :class:`ProjectReference ` + :type projects: list of :class:`ProjectReference ` :param reference_name: Reference name of the process. :type reference_name: str :param type_id: The ID of the process. @@ -679,9 +683,9 @@ class ProcessModel(Model): :param name: Name of the process :type name: str :param projects: Projects in this process - :type projects: list of :class:`ProjectReference ` + :type projects: list of :class:`ProjectReference ` :param properties: Properties of the process - :type properties: :class:`ProcessProperties ` + :type properties: :class:`ProcessProperties ` :param reference_name: Reference name of the process :type reference_name: str :param type_id: The ID of the process @@ -745,9 +749,9 @@ class ProcessRule(CreateProcessRuleRequest): Process Rule Response. :param actions: List of actions to take when the rule is triggered. - :type actions: list of :class:`RuleAction ` + :type actions: list of :class:`RuleAction ` :param conditions: List of conditions when the rule should be triggered. - :type conditions: list of :class:`RuleCondition ` + :type conditions: list of :class:`RuleCondition ` :param is_disabled: Indicates if the rule is disabled. :type is_disabled: bool :param name: Name for the rule. @@ -782,7 +786,7 @@ class ProcessWorkItemType(Model): Class that describes a work item type object :param behaviors: - :type behaviors: list of :class:`WorkItemTypeBehavior ` + :type behaviors: list of :class:`WorkItemTypeBehavior ` :param color: Color hexadecimal code to represent the work item type :type color: str :param customization: Indicates the type of customization on this work item System work item types are inherited from parent process but not modified Inherited work item types are modified work item that were inherited from parent process Custom work item types are work item types that were created in the current process @@ -796,13 +800,13 @@ class ProcessWorkItemType(Model): :param is_disabled: Indicates if a work item type is disabled :type is_disabled: bool :param layout: - :type layout: :class:`FormLayout ` + :type layout: :class:`FormLayout ` :param name: Name of the work item type :type name: str :param reference_name: Reference name of work item type :type reference_name: str :param states: - :type states: list of :class:`WorkItemStateResultModel ` + :type states: list of :class:`WorkItemStateResultModel ` :param url: Url of the work item type :type url: str """ @@ -852,6 +856,8 @@ class ProcessWorkItemTypeField(Model): :type default_value: object :param description: Description of the field. :type description: str + :param is_locked: Information about field definition being locked for editing + :type is_locked: bool :param name: Name of the field. :type name: str :param read_only: If true the field cannot be edited. @@ -872,6 +878,7 @@ class ProcessWorkItemTypeField(Model): 'customization': {'key': 'customization', 'type': 'object'}, 'default_value': {'key': 'defaultValue', 'type': 'object'}, 'description': {'key': 'description', 'type': 'str'}, + 'is_locked': {'key': 'isLocked', 'type': 'bool'}, 'name': {'key': 'name', 'type': 'str'}, 'read_only': {'key': 'readOnly', 'type': 'bool'}, 'reference_name': {'key': 'referenceName', 'type': 'str'}, @@ -880,13 +887,14 @@ class ProcessWorkItemTypeField(Model): 'url': {'key': 'url', 'type': 'str'} } - def __init__(self, allowed_values=None, allow_groups=None, customization=None, default_value=None, description=None, name=None, read_only=None, reference_name=None, required=None, type=None, url=None): + def __init__(self, allowed_values=None, allow_groups=None, customization=None, default_value=None, description=None, is_locked=None, name=None, read_only=None, reference_name=None, required=None, type=None, url=None): super(ProcessWorkItemTypeField, self).__init__() self.allowed_values = allowed_values self.allow_groups = allow_groups self.customization = customization self.default_value = default_value self.description = description + self.is_locked = is_locked self.name = name self.read_only = read_only self.reference_name = reference_name @@ -1027,7 +1035,7 @@ class Section(Model): Defines a section of the work item form layout :param groups: List of child groups in this section - :type groups: list of :class:`Group ` + :type groups: list of :class:`Group ` :param id: The id for the layout node. :type id: str :param overridden: A value indicating whether this layout node has been overridden by a child layout. @@ -1081,9 +1089,9 @@ class UpdateProcessRuleRequest(CreateProcessRuleRequest): Request class/object to update the rule. :param actions: List of actions to take when the rule is triggered. - :type actions: list of :class:`RuleAction ` + :type actions: list of :class:`RuleAction ` :param conditions: List of conditions when the rule should be triggered. - :type conditions: list of :class:`RuleCondition ` + :type conditions: list of :class:`RuleCondition ` :param is_disabled: Indicates if the rule is disabled. :type is_disabled: bool :param name: Name for the rule. @@ -1205,11 +1213,11 @@ class WorkItemBehavior(Model): :param description: :type description: str :param fields: - :type fields: list of :class:`WorkItemBehaviorField ` + :type fields: list of :class:`WorkItemBehaviorField ` :param id: :type id: str :param inherits: - :type inherits: :class:`WorkItemBehaviorReference ` + :type inherits: :class:`WorkItemBehaviorReference ` :param name: :type name: str :param overriden: @@ -1370,7 +1378,7 @@ class WorkItemTypeBehavior(Model): Association between a work item type and it's behavior :param behavior: Reference to the behavior of a work item type - :type behavior: :class:`WorkItemBehaviorReference ` + :type behavior: :class:`WorkItemBehaviorReference ` :param is_default: If true the work item type is the default work item type in the behavior :type is_default: bool :param is_legacy_default: If true the work item type is the default work item type in the parent behavior @@ -1397,7 +1405,7 @@ def __init__(self, behavior=None, is_default=None, is_legacy_default=None, url=N class WorkItemTypeModel(Model): """ :param behaviors: - :type behaviors: list of :class:`WorkItemTypeBehavior ` + :type behaviors: list of :class:`WorkItemTypeBehavior ` :param class_: :type class_: object :param color: @@ -1413,11 +1421,11 @@ class WorkItemTypeModel(Model): :param is_disabled: :type is_disabled: bool :param layout: - :type layout: :class:`FormLayout ` + :type layout: :class:`FormLayout ` :param name: :type name: str :param states: - :type states: list of :class:`WorkItemStateResultModel ` + :type states: list of :class:`WorkItemStateResultModel ` :param url: :type url: str """ diff --git a/azure-devops/azure/devops/v7_0/work_item_tracking_process/work_item_tracking_process_client.py b/azure-devops/azure/devops/v7_2/work_item_tracking_process/work_item_tracking_process_client.py similarity index 84% rename from azure-devops/azure/devops/v7_0/work_item_tracking_process/work_item_tracking_process_client.py rename to azure-devops/azure/devops/v7_2/work_item_tracking_process/work_item_tracking_process_client.py index 853879e0..330645a7 100644 --- a/azure-devops/azure/devops/v7_0/work_item_tracking_process/work_item_tracking_process_client.py +++ b/azure-devops/azure/devops/v7_2/work_item_tracking_process/work_item_tracking_process_client.py @@ -27,10 +27,10 @@ def __init__(self, base_url=None, creds=None): def create_process_behavior(self, behavior, process_id): """CreateProcessBehavior. - Creates a single behavior in the given process. - :param :class:` ` behavior: + [Preview API] Creates a single behavior in the given process. + :param :class:` ` behavior: :param str process_id: The ID of the process - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if process_id is not None: @@ -38,14 +38,14 @@ def create_process_behavior(self, behavior, process_id): content = self._serialize.body(behavior, 'ProcessBehaviorCreateRequest') response = self._send(http_method='POST', location_id='d1800200-f184-4e75-a5f2-ad0b04b4373e', - version='7.0', + version='7.2-preview.2', route_values=route_values, content=content) return self._deserialize('ProcessBehavior', response) def delete_process_behavior(self, process_id, behavior_ref_name): """DeleteProcessBehavior. - Removes a behavior in the process. + [Preview API] Removes a behavior in the process. :param str process_id: The ID of the process :param str behavior_ref_name: The reference name of the behavior """ @@ -56,16 +56,16 @@ def delete_process_behavior(self, process_id, behavior_ref_name): route_values['behaviorRefName'] = self._serialize.url('behavior_ref_name', behavior_ref_name, 'str') self._send(http_method='DELETE', location_id='d1800200-f184-4e75-a5f2-ad0b04b4373e', - version='7.0', + version='7.2-preview.2', route_values=route_values) def get_process_behavior(self, process_id, behavior_ref_name, expand=None): """GetProcessBehavior. - Returns a behavior of the process. + [Preview API] Returns a behavior of the process. :param str process_id: The ID of the process :param str behavior_ref_name: The reference name of the behavior :param str expand: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if process_id is not None: @@ -77,14 +77,14 @@ def get_process_behavior(self, process_id, behavior_ref_name, expand=None): query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') response = self._send(http_method='GET', location_id='d1800200-f184-4e75-a5f2-ad0b04b4373e', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters) return self._deserialize('ProcessBehavior', response) def get_process_behaviors(self, process_id, expand=None): """GetProcessBehaviors. - Returns a list of all behaviors in the process. + [Preview API] Returns a list of all behaviors in the process. :param str process_id: The ID of the process :param str expand: :rtype: [ProcessBehavior] @@ -97,18 +97,18 @@ def get_process_behaviors(self, process_id, expand=None): query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') response = self._send(http_method='GET', location_id='d1800200-f184-4e75-a5f2-ad0b04b4373e', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[ProcessBehavior]', self._unwrap_collection(response)) def update_process_behavior(self, behavior_data, process_id, behavior_ref_name): """UpdateProcessBehavior. - Replaces a behavior in the process. - :param :class:` ` behavior_data: + [Preview API] Replaces a behavior in the process. + :param :class:` ` behavior_data: :param str process_id: The ID of the process :param str behavior_ref_name: The reference name of the behavior - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if process_id is not None: @@ -118,19 +118,19 @@ def update_process_behavior(self, behavior_data, process_id, behavior_ref_name): content = self._serialize.body(behavior_data, 'ProcessBehaviorUpdateRequest') response = self._send(http_method='PUT', location_id='d1800200-f184-4e75-a5f2-ad0b04b4373e', - version='7.0', + version='7.2-preview.2', route_values=route_values, content=content) return self._deserialize('ProcessBehavior', response) def create_control_in_group(self, control, process_id, wit_ref_name, group_id): """CreateControlInGroup. - Creates a control in a group. - :param :class:` ` control: The control. + [Preview API] Creates a control in a group. + :param :class:` ` control: The control. :param str process_id: The ID of the process. :param str wit_ref_name: The reference name of the work item type. :param str group_id: The ID of the group to add the control to. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if process_id is not None: @@ -142,21 +142,21 @@ def create_control_in_group(self, control, process_id, wit_ref_name, group_id): content = self._serialize.body(control, 'Control') response = self._send(http_method='POST', location_id='1f59b363-a2d0-4b7e-9bc6-eb9f5f3f0e58', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('Control', response) def move_control_to_group(self, control, process_id, wit_ref_name, group_id, control_id, remove_from_group_id=None): """MoveControlToGroup. - Moves a control to a specified group. - :param :class:` ` control: The control. + [Preview API] Moves a control to a specified group. + :param :class:` ` control: The control. :param str process_id: The ID of the process. :param str wit_ref_name: The reference name of the work item type. :param str group_id: The ID of the group to move the control to. :param str control_id: The ID of the control. :param str remove_from_group_id: The group ID to remove the control from. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if process_id is not None: @@ -173,7 +173,7 @@ def move_control_to_group(self, control, process_id, wit_ref_name, group_id, con content = self._serialize.body(control, 'Control') response = self._send(http_method='PUT', location_id='1f59b363-a2d0-4b7e-9bc6-eb9f5f3f0e58', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters, content=content) @@ -181,7 +181,7 @@ def move_control_to_group(self, control, process_id, wit_ref_name, group_id, con def remove_control_from_group(self, process_id, wit_ref_name, group_id, control_id): """RemoveControlFromGroup. - Removes a control from the work item form. + [Preview API] Removes a control from the work item form. :param str process_id: The ID of the process. :param str wit_ref_name: The reference name of the work item type. :param str group_id: The ID of the group. @@ -198,18 +198,18 @@ def remove_control_from_group(self, process_id, wit_ref_name, group_id, control_ route_values['controlId'] = self._serialize.url('control_id', control_id, 'str') self._send(http_method='DELETE', location_id='1f59b363-a2d0-4b7e-9bc6-eb9f5f3f0e58', - version='7.0', + version='7.2-preview.1', route_values=route_values) def update_control(self, control, process_id, wit_ref_name, group_id, control_id): """UpdateControl. - Updates a control on the work item form. - :param :class:` ` control: The updated control. + [Preview API] Updates a control on the work item form. + :param :class:` ` control: The updated control. :param str process_id: The ID of the process. :param str wit_ref_name: The reference name of the work item type. :param str group_id: The ID of the group. :param str control_id: The ID of the control. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if process_id is not None: @@ -223,18 +223,18 @@ def update_control(self, control, process_id, wit_ref_name, group_id, control_id content = self._serialize.body(control, 'Control') response = self._send(http_method='PATCH', location_id='1f59b363-a2d0-4b7e-9bc6-eb9f5f3f0e58', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('Control', response) def add_field_to_work_item_type(self, field, process_id, wit_ref_name): """AddFieldToWorkItemType. - Adds a field to a work item type. - :param :class:` ` field: + [Preview API] Adds a field to a work item type. + :param :class:` ` field: :param str process_id: The ID of the process. :param str wit_ref_name: The reference name of the work item type. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if process_id is not None: @@ -244,14 +244,14 @@ def add_field_to_work_item_type(self, field, process_id, wit_ref_name): content = self._serialize.body(field, 'AddProcessWorkItemTypeFieldRequest') response = self._send(http_method='POST', location_id='bc0ad8dc-e3f3-46b0-b06c-5bf861793196', - version='7.0', + version='7.2-preview.2', route_values=route_values, content=content) return self._deserialize('ProcessWorkItemTypeField', response) def get_all_work_item_type_fields(self, process_id, wit_ref_name): """GetAllWorkItemTypeFields. - Returns a list of all fields in a work item type. + [Preview API] Returns a list of all fields in a work item type. :param str process_id: The ID of the process. :param str wit_ref_name: The reference name of the work item type. :rtype: [ProcessWorkItemTypeField] @@ -263,18 +263,18 @@ def get_all_work_item_type_fields(self, process_id, wit_ref_name): route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') response = self._send(http_method='GET', location_id='bc0ad8dc-e3f3-46b0-b06c-5bf861793196', - version='7.0', + version='7.2-preview.2', route_values=route_values) return self._deserialize('[ProcessWorkItemTypeField]', self._unwrap_collection(response)) def get_work_item_type_field(self, process_id, wit_ref_name, field_ref_name, expand=None): """GetWorkItemTypeField. - Returns a field in a work item type. + [Preview API] Returns a field in a work item type. :param str process_id: The ID of the process. :param str wit_ref_name: The reference name of the work item type. :param str field_ref_name: The reference name of the field. :param str expand: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if process_id is not None: @@ -288,14 +288,14 @@ def get_work_item_type_field(self, process_id, wit_ref_name, field_ref_name, exp query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') response = self._send(http_method='GET', location_id='bc0ad8dc-e3f3-46b0-b06c-5bf861793196', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters) return self._deserialize('ProcessWorkItemTypeField', response) def remove_work_item_type_field(self, process_id, wit_ref_name, field_ref_name): """RemoveWorkItemTypeField. - Removes a field from a work item type. Does not permanently delete the field. + [Preview API] Removes a field from a work item type. Does not permanently delete the field. :param str process_id: The ID of the process. :param str wit_ref_name: The reference name of the work item type. :param str field_ref_name: The reference name of the field. @@ -309,17 +309,17 @@ def remove_work_item_type_field(self, process_id, wit_ref_name, field_ref_name): route_values['fieldRefName'] = self._serialize.url('field_ref_name', field_ref_name, 'str') self._send(http_method='DELETE', location_id='bc0ad8dc-e3f3-46b0-b06c-5bf861793196', - version='7.0', + version='7.2-preview.2', route_values=route_values) def update_work_item_type_field(self, field, process_id, wit_ref_name, field_ref_name): """UpdateWorkItemTypeField. - Updates a field in a work item type. - :param :class:` ` field: + [Preview API] Updates a field in a work item type. + :param :class:` ` field: :param str process_id: The ID of the process. :param str wit_ref_name: The reference name of the work item type. :param str field_ref_name: The reference name of the field. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if process_id is not None: @@ -331,20 +331,20 @@ def update_work_item_type_field(self, field, process_id, wit_ref_name, field_ref content = self._serialize.body(field, 'UpdateProcessWorkItemTypeFieldRequest') response = self._send(http_method='PATCH', location_id='bc0ad8dc-e3f3-46b0-b06c-5bf861793196', - version='7.0', + version='7.2-preview.2', route_values=route_values, content=content) return self._deserialize('ProcessWorkItemTypeField', response) def add_group(self, group, process_id, wit_ref_name, page_id, section_id): """AddGroup. - Adds a group to the work item form. - :param :class:` ` group: The group. + [Preview API] Adds a group to the work item form. + :param :class:` ` group: The group. :param str process_id: The ID of the process. :param str wit_ref_name: The reference name of the work item type. :param str page_id: The ID of the page to add the group to. :param str section_id: The ID of the section to add the group to. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if process_id is not None: @@ -358,15 +358,15 @@ def add_group(self, group, process_id, wit_ref_name, page_id, section_id): content = self._serialize.body(group, 'Group') response = self._send(http_method='POST', location_id='766e44e1-36a8-41d7-9050-c343ff02f7a5', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('Group', response) def move_group_to_page(self, group, process_id, wit_ref_name, page_id, section_id, group_id, remove_from_page_id, remove_from_section_id): """MoveGroupToPage. - Moves a group to a different page and section. - :param :class:` ` group: The updated group. + [Preview API] Moves a group to a different page and section. + :param :class:` ` group: The updated group. :param str process_id: The ID of the process. :param str wit_ref_name: The reference name of the work item type. :param str page_id: The ID of the page the group is in. @@ -374,7 +374,7 @@ def move_group_to_page(self, group, process_id, wit_ref_name, page_id, section_i :param str group_id: The ID of the group. :param str remove_from_page_id: ID of the page to remove the group from. :param str remove_from_section_id: ID of the section to remove the group from. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if process_id is not None: @@ -395,7 +395,7 @@ def move_group_to_page(self, group, process_id, wit_ref_name, page_id, section_i content = self._serialize.body(group, 'Group') response = self._send(http_method='PUT', location_id='766e44e1-36a8-41d7-9050-c343ff02f7a5', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters, content=content) @@ -403,15 +403,15 @@ def move_group_to_page(self, group, process_id, wit_ref_name, page_id, section_i def move_group_to_section(self, group, process_id, wit_ref_name, page_id, section_id, group_id, remove_from_section_id): """MoveGroupToSection. - Moves a group to a different section. - :param :class:` ` group: The updated group. + [Preview API] Moves a group to a different section. + :param :class:` ` group: The updated group. :param str process_id: The ID of the process. :param str wit_ref_name: The reference name of the work item type. :param str page_id: The ID of the page the group is in. :param str section_id: The ID of the section the group is in. :param str group_id: The ID of the group. :param str remove_from_section_id: ID of the section to remove the group from. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if process_id is not None: @@ -430,7 +430,7 @@ def move_group_to_section(self, group, process_id, wit_ref_name, page_id, sectio content = self._serialize.body(group, 'Group') response = self._send(http_method='PUT', location_id='766e44e1-36a8-41d7-9050-c343ff02f7a5', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters, content=content) @@ -438,7 +438,7 @@ def move_group_to_section(self, group, process_id, wit_ref_name, page_id, sectio def remove_group(self, process_id, wit_ref_name, page_id, section_id, group_id): """RemoveGroup. - Removes a group from the work item form. + [Preview API] Removes a group from the work item form. :param str process_id: The ID of the process :param str wit_ref_name: The reference name of the work item type :param str page_id: The ID of the page the group is in @@ -458,19 +458,19 @@ def remove_group(self, process_id, wit_ref_name, page_id, section_id, group_id): route_values['groupId'] = self._serialize.url('group_id', group_id, 'str') self._send(http_method='DELETE', location_id='766e44e1-36a8-41d7-9050-c343ff02f7a5', - version='7.0', + version='7.2-preview.1', route_values=route_values) def update_group(self, group, process_id, wit_ref_name, page_id, section_id, group_id): """UpdateGroup. - Updates a group in the work item form. - :param :class:` ` group: The updated group. + [Preview API] Updates a group in the work item form. + :param :class:` ` group: The updated group. :param str process_id: The ID of the process. :param str wit_ref_name: The reference name of the work item type. :param str page_id: The ID of the page the group is in. :param str section_id: The ID of the section the group is in. :param str group_id: The ID of the group. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if process_id is not None: @@ -486,17 +486,17 @@ def update_group(self, group, process_id, wit_ref_name, page_id, section_id, gro content = self._serialize.body(group, 'Group') response = self._send(http_method='PATCH', location_id='766e44e1-36a8-41d7-9050-c343ff02f7a5', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('Group', response) def get_form_layout(self, process_id, wit_ref_name): """GetFormLayout. - Gets the form layout. + [Preview API] Gets the form layout. :param str process_id: The ID of the process. :param str wit_ref_name: The reference name of the work item type. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if process_id is not None: @@ -505,26 +505,26 @@ def get_form_layout(self, process_id, wit_ref_name): route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') response = self._send(http_method='GET', location_id='fa8646eb-43cd-4b71-9564-40106fd63e40', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('FormLayout', response) def create_list(self, picklist): """CreateList. - Creates a picklist. - :param :class:` ` picklist: Picklist - :rtype: :class:` ` + [Preview API] Creates a picklist. + :param :class:` ` picklist: Picklist + :rtype: :class:` ` """ content = self._serialize.body(picklist, 'PickList') response = self._send(http_method='POST', location_id='01e15468-e27c-4e20-a974-bd957dcccebc', - version='7.0', + version='7.2-preview.1', content=content) return self._deserialize('PickList', response) def delete_list(self, list_id): """DeleteList. - Removes a picklist. + [Preview API] Removes a picklist. :param str list_id: The ID of the list """ route_values = {} @@ -532,40 +532,40 @@ def delete_list(self, list_id): route_values['listId'] = self._serialize.url('list_id', list_id, 'str') self._send(http_method='DELETE', location_id='01e15468-e27c-4e20-a974-bd957dcccebc', - version='7.0', + version='7.2-preview.1', route_values=route_values) def get_list(self, list_id): """GetList. - Returns a picklist. + [Preview API] Returns a picklist. :param str list_id: The ID of the list - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if list_id is not None: route_values['listId'] = self._serialize.url('list_id', list_id, 'str') response = self._send(http_method='GET', location_id='01e15468-e27c-4e20-a974-bd957dcccebc', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('PickList', response) def get_lists_metadata(self): """GetListsMetadata. - Returns meta data of the picklist. + [Preview API] Returns meta data of the picklist. :rtype: [PickListMetadata] """ response = self._send(http_method='GET', location_id='01e15468-e27c-4e20-a974-bd957dcccebc', - version='7.0') + version='7.2-preview.1') return self._deserialize('[PickListMetadata]', self._unwrap_collection(response)) def update_list(self, picklist, list_id): """UpdateList. - Updates a list. - :param :class:` ` picklist: + [Preview API] Updates a list. + :param :class:` ` picklist: :param str list_id: The ID of the list - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if list_id is not None: @@ -573,18 +573,18 @@ def update_list(self, picklist, list_id): content = self._serialize.body(picklist, 'PickList') response = self._send(http_method='PUT', location_id='01e15468-e27c-4e20-a974-bd957dcccebc', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('PickList', response) def add_page(self, page, process_id, wit_ref_name): """AddPage. - Adds a page to the work item form. - :param :class:` ` page: The page. + [Preview API] Adds a page to the work item form. + :param :class:` ` page: The page. :param str process_id: The ID of the process. :param str wit_ref_name: The reference name of the work item type. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if process_id is not None: @@ -594,14 +594,14 @@ def add_page(self, page, process_id, wit_ref_name): content = self._serialize.body(page, 'Page') response = self._send(http_method='POST', location_id='1cc7b29f-6697-4d9d-b0a1-2650d3e1d584', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('Page', response) def remove_page(self, process_id, wit_ref_name, page_id): """RemovePage. - Removes a page from the work item form + [Preview API] Removes a page from the work item form :param str process_id: The ID of the process :param str wit_ref_name: The reference name of the work item type :param str page_id: The ID of the page @@ -615,16 +615,16 @@ def remove_page(self, process_id, wit_ref_name, page_id): route_values['pageId'] = self._serialize.url('page_id', page_id, 'str') self._send(http_method='DELETE', location_id='1cc7b29f-6697-4d9d-b0a1-2650d3e1d584', - version='7.0', + version='7.2-preview.1', route_values=route_values) def update_page(self, page, process_id, wit_ref_name): """UpdatePage. - Updates a page on the work item form - :param :class:` ` page: The page + [Preview API] Updates a page on the work item form + :param :class:` ` page: The page :param str process_id: The ID of the process :param str wit_ref_name: The reference name of the work item type - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if process_id is not None: @@ -634,27 +634,27 @@ def update_page(self, page, process_id, wit_ref_name): content = self._serialize.body(page, 'Page') response = self._send(http_method='PATCH', location_id='1cc7b29f-6697-4d9d-b0a1-2650d3e1d584', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('Page', response) def create_new_process(self, create_request): """CreateNewProcess. - Creates a process. - :param :class:` ` create_request: CreateProcessModel. - :rtype: :class:` ` + [Preview API] Creates a process. + :param :class:` ` create_request: CreateProcessModel. + :rtype: :class:` ` """ content = self._serialize.body(create_request, 'CreateProcessModel') response = self._send(http_method='POST', location_id='02cc6a73-5cfb-427d-8c8e-b49fb086e8af', - version='7.0', + version='7.2-preview.2', content=content) return self._deserialize('ProcessInfo', response) def delete_process_by_id(self, process_type_id): """DeleteProcessById. - Removes a process of a specific ID. + [Preview API] Removes a process of a specific ID. :param str process_type_id: """ route_values = {} @@ -662,15 +662,15 @@ def delete_process_by_id(self, process_type_id): route_values['processTypeId'] = self._serialize.url('process_type_id', process_type_id, 'str') self._send(http_method='DELETE', location_id='02cc6a73-5cfb-427d-8c8e-b49fb086e8af', - version='7.0', + version='7.2-preview.2', route_values=route_values) def edit_process(self, update_request, process_type_id): """EditProcess. - Edit a process of a specific ID. - :param :class:` ` update_request: + [Preview API] Edit a process of a specific ID. + :param :class:` ` update_request: :param str process_type_id: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if process_type_id is not None: @@ -678,14 +678,14 @@ def edit_process(self, update_request, process_type_id): content = self._serialize.body(update_request, 'UpdateProcessModel') response = self._send(http_method='PATCH', location_id='02cc6a73-5cfb-427d-8c8e-b49fb086e8af', - version='7.0', + version='7.2-preview.2', route_values=route_values, content=content) return self._deserialize('ProcessInfo', response) def get_list_of_processes(self, expand=None): """GetListOfProcesses. - Get list of all processes including system and inherited. + [Preview API] Get list of all processes including system and inherited. :param str expand: :rtype: [ProcessInfo] """ @@ -694,16 +694,16 @@ def get_list_of_processes(self, expand=None): query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') response = self._send(http_method='GET', location_id='02cc6a73-5cfb-427d-8c8e-b49fb086e8af', - version='7.0', + version='7.2-preview.2', query_parameters=query_parameters) return self._deserialize('[ProcessInfo]', self._unwrap_collection(response)) def get_process_by_its_id(self, process_type_id, expand=None): """GetProcessByItsId. - Get a single process of a specified ID. + [Preview API] Get a single process of a specified ID. :param str process_type_id: :param str expand: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if process_type_id is not None: @@ -713,18 +713,18 @@ def get_process_by_its_id(self, process_type_id, expand=None): query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') response = self._send(http_method='GET', location_id='02cc6a73-5cfb-427d-8c8e-b49fb086e8af', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters) return self._deserialize('ProcessInfo', response) def add_process_work_item_type_rule(self, process_rule_create, process_id, wit_ref_name): """AddProcessWorkItemTypeRule. - Adds a rule to work item type in the process. - :param :class:` ` process_rule_create: + [Preview API] Adds a rule to work item type in the process. + :param :class:` ` process_rule_create: :param str process_id: The ID of the process :param str wit_ref_name: The reference name of the work item type - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if process_id is not None: @@ -734,14 +734,14 @@ def add_process_work_item_type_rule(self, process_rule_create, process_id, wit_r content = self._serialize.body(process_rule_create, 'CreateProcessRuleRequest') response = self._send(http_method='POST', location_id='76fe3432-d825-479d-a5f6-983bbb78b4f3', - version='7.0', + version='7.2-preview.2', route_values=route_values, content=content) return self._deserialize('ProcessRule', response) def delete_process_work_item_type_rule(self, process_id, wit_ref_name, rule_id): """DeleteProcessWorkItemTypeRule. - Removes a rule from the work item type in the process. + [Preview API] Removes a rule from the work item type in the process. :param str process_id: The ID of the process :param str wit_ref_name: The reference name of the work item type :param str rule_id: The ID of the rule @@ -755,16 +755,16 @@ def delete_process_work_item_type_rule(self, process_id, wit_ref_name, rule_id): route_values['ruleId'] = self._serialize.url('rule_id', rule_id, 'str') self._send(http_method='DELETE', location_id='76fe3432-d825-479d-a5f6-983bbb78b4f3', - version='7.0', + version='7.2-preview.2', route_values=route_values) def get_process_work_item_type_rule(self, process_id, wit_ref_name, rule_id): """GetProcessWorkItemTypeRule. - Returns a single rule in the work item type of the process. + [Preview API] Returns a single rule in the work item type of the process. :param str process_id: The ID of the process :param str wit_ref_name: The reference name of the work item type :param str rule_id: The ID of the rule - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if process_id is not None: @@ -775,13 +775,13 @@ def get_process_work_item_type_rule(self, process_id, wit_ref_name, rule_id): route_values['ruleId'] = self._serialize.url('rule_id', rule_id, 'str') response = self._send(http_method='GET', location_id='76fe3432-d825-479d-a5f6-983bbb78b4f3', - version='7.0', + version='7.2-preview.2', route_values=route_values) return self._deserialize('ProcessRule', response) def get_process_work_item_type_rules(self, process_id, wit_ref_name): """GetProcessWorkItemTypeRules. - Returns a list of all rules in the work item type of the process. + [Preview API] Returns a list of all rules in the work item type of the process. :param str process_id: The ID of the process :param str wit_ref_name: The reference name of the work item type :rtype: [ProcessRule] @@ -793,18 +793,18 @@ def get_process_work_item_type_rules(self, process_id, wit_ref_name): route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') response = self._send(http_method='GET', location_id='76fe3432-d825-479d-a5f6-983bbb78b4f3', - version='7.0', + version='7.2-preview.2', route_values=route_values) return self._deserialize('[ProcessRule]', self._unwrap_collection(response)) def update_process_work_item_type_rule(self, process_rule, process_id, wit_ref_name, rule_id): """UpdateProcessWorkItemTypeRule. - Updates a rule in the work item type of the process. - :param :class:` ` process_rule: + [Preview API] Updates a rule in the work item type of the process. + :param :class:` ` process_rule: :param str process_id: The ID of the process :param str wit_ref_name: The reference name of the work item type :param str rule_id: The ID of the rule - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if process_id is not None: @@ -816,18 +816,18 @@ def update_process_work_item_type_rule(self, process_rule, process_id, wit_ref_n content = self._serialize.body(process_rule, 'UpdateProcessRuleRequest') response = self._send(http_method='PUT', location_id='76fe3432-d825-479d-a5f6-983bbb78b4f3', - version='7.0', + version='7.2-preview.2', route_values=route_values, content=content) return self._deserialize('ProcessRule', response) def create_state_definition(self, state_model, process_id, wit_ref_name): """CreateStateDefinition. - Creates a state definition in the work item type of the process. - :param :class:` ` state_model: + [Preview API] Creates a state definition in the work item type of the process. + :param :class:` ` state_model: :param str process_id: The ID of the process :param str wit_ref_name: The reference name of the work item type - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if process_id is not None: @@ -837,14 +837,14 @@ def create_state_definition(self, state_model, process_id, wit_ref_name): content = self._serialize.body(state_model, 'WorkItemStateInputModel') response = self._send(http_method='POST', location_id='31015d57-2dff-4a46-adb3-2fb4ee3dcec9', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('WorkItemStateResultModel', response) def delete_state_definition(self, process_id, wit_ref_name, state_id): """DeleteStateDefinition. - Removes a state definition in the work item type of the process. + [Preview API] Removes a state definition in the work item type of the process. :param str process_id: ID of the process :param str wit_ref_name: The reference name of the work item type :param str state_id: ID of the state @@ -858,16 +858,16 @@ def delete_state_definition(self, process_id, wit_ref_name, state_id): route_values['stateId'] = self._serialize.url('state_id', state_id, 'str') self._send(http_method='DELETE', location_id='31015d57-2dff-4a46-adb3-2fb4ee3dcec9', - version='7.0', + version='7.2-preview.1', route_values=route_values) def get_state_definition(self, process_id, wit_ref_name, state_id): """GetStateDefinition. - Returns a single state definition in a work item type of the process. + [Preview API] Returns a single state definition in a work item type of the process. :param str process_id: The ID of the process :param str wit_ref_name: The reference name of the work item type :param str state_id: The ID of the state - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if process_id is not None: @@ -878,13 +878,13 @@ def get_state_definition(self, process_id, wit_ref_name, state_id): route_values['stateId'] = self._serialize.url('state_id', state_id, 'str') response = self._send(http_method='GET', location_id='31015d57-2dff-4a46-adb3-2fb4ee3dcec9', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('WorkItemStateResultModel', response) def get_state_definitions(self, process_id, wit_ref_name): """GetStateDefinitions. - Returns a list of all state definitions in a work item type of the process. + [Preview API] Returns a list of all state definitions in a work item type of the process. :param str process_id: The ID of the process :param str wit_ref_name: The reference name of the work item type :rtype: [WorkItemStateResultModel] @@ -896,18 +896,18 @@ def get_state_definitions(self, process_id, wit_ref_name): route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') response = self._send(http_method='GET', location_id='31015d57-2dff-4a46-adb3-2fb4ee3dcec9', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('[WorkItemStateResultModel]', self._unwrap_collection(response)) def hide_state_definition(self, hide_state_model, process_id, wit_ref_name, state_id): """HideStateDefinition. - Hides a state definition in the work item type of the process.Only states with customizationType:System can be hidden. - :param :class:` ` hide_state_model: + [Preview API] Hides a state definition in the work item type of the process.Only states with customizationType:System can be hidden. + :param :class:` ` hide_state_model: :param str process_id: The ID of the process :param str wit_ref_name: The reference name of the work item type :param str state_id: The ID of the state - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if process_id is not None: @@ -919,19 +919,19 @@ def hide_state_definition(self, hide_state_model, process_id, wit_ref_name, stat content = self._serialize.body(hide_state_model, 'HideStateModel') response = self._send(http_method='PUT', location_id='31015d57-2dff-4a46-adb3-2fb4ee3dcec9', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('WorkItemStateResultModel', response) def update_state_definition(self, state_model, process_id, wit_ref_name, state_id): """UpdateStateDefinition. - Updates a given state definition in the work item type of the process. - :param :class:` ` state_model: + [Preview API] Updates a given state definition in the work item type of the process. + :param :class:` ` state_model: :param str process_id: ID of the process :param str wit_ref_name: The reference name of the work item type :param str state_id: ID of the state - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if process_id is not None: @@ -943,14 +943,14 @@ def update_state_definition(self, state_model, process_id, wit_ref_name, state_i content = self._serialize.body(state_model, 'WorkItemStateInputModel') response = self._send(http_method='PATCH', location_id='31015d57-2dff-4a46-adb3-2fb4ee3dcec9', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('WorkItemStateResultModel', response) def delete_system_control(self, process_id, wit_ref_name, control_id): """DeleteSystemControl. - Deletes a system control modification on the work item form. + [Preview API] Deletes a system control modification on the work item form. :param str process_id: The ID of the process. :param str wit_ref_name: The reference name of the work item type. :param str control_id: The ID of the control. @@ -965,13 +965,13 @@ def delete_system_control(self, process_id, wit_ref_name, control_id): route_values['controlId'] = self._serialize.url('control_id', control_id, 'str') response = self._send(http_method='DELETE', location_id='ff9a3d2c-32b7-4c6c-991c-d5a251fb9098', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('[Control]', self._unwrap_collection(response)) def get_system_controls(self, process_id, wit_ref_name): """GetSystemControls. - Gets edited system controls for a work item type in a process. To get all system controls (base + edited) use layout API(s) + [Preview API] Gets edited system controls for a work item type in a process. To get all system controls (base + edited) use layout API(s) :param str process_id: The ID of the process. :param str wit_ref_name: The reference name of the work item type. :rtype: [Control] @@ -983,18 +983,18 @@ def get_system_controls(self, process_id, wit_ref_name): route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') response = self._send(http_method='GET', location_id='ff9a3d2c-32b7-4c6c-991c-d5a251fb9098', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('[Control]', self._unwrap_collection(response)) def update_system_control(self, control, process_id, wit_ref_name, control_id): """UpdateSystemControl. - Updates/adds a system control on the work item form. - :param :class:` ` control: + [Preview API] Updates/adds a system control on the work item form. + :param :class:` ` control: :param str process_id: The ID of the process. :param str wit_ref_name: The reference name of the work item type. :param str control_id: The ID of the control. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if process_id is not None: @@ -1006,17 +1006,17 @@ def update_system_control(self, control, process_id, wit_ref_name, control_id): content = self._serialize.body(control, 'Control') response = self._send(http_method='PATCH', location_id='ff9a3d2c-32b7-4c6c-991c-d5a251fb9098', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('Control', response) def create_process_work_item_type(self, work_item_type, process_id): """CreateProcessWorkItemType. - Creates a work item type in the process. - :param :class:` ` work_item_type: + [Preview API] Creates a work item type in the process. + :param :class:` ` work_item_type: :param str process_id: The ID of the process on which to create work item type. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if process_id is not None: @@ -1024,14 +1024,14 @@ def create_process_work_item_type(self, work_item_type, process_id): content = self._serialize.body(work_item_type, 'CreateProcessWorkItemTypeRequest') response = self._send(http_method='POST', location_id='e2e9d1a6-432d-4062-8870-bfcb8c324ad7', - version='7.0', + version='7.2-preview.2', route_values=route_values, content=content) return self._deserialize('ProcessWorkItemType', response) def delete_process_work_item_type(self, process_id, wit_ref_name): """DeleteProcessWorkItemType. - Removes a work itewm type in the process. + [Preview API] Removes a work item type in the process. :param str process_id: The ID of the process. :param str wit_ref_name: The reference name of the work item type. """ @@ -1042,16 +1042,16 @@ def delete_process_work_item_type(self, process_id, wit_ref_name): route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') self._send(http_method='DELETE', location_id='e2e9d1a6-432d-4062-8870-bfcb8c324ad7', - version='7.0', + version='7.2-preview.2', route_values=route_values) def get_process_work_item_type(self, process_id, wit_ref_name, expand=None): """GetProcessWorkItemType. - Returns a single work item type in a process. + [Preview API] Returns a single work item type in a process. :param str process_id: The ID of the process :param str wit_ref_name: The reference name of the work item type :param str expand: Flag to determine what properties of work item type to return - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if process_id is not None: @@ -1063,14 +1063,14 @@ def get_process_work_item_type(self, process_id, wit_ref_name, expand=None): query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') response = self._send(http_method='GET', location_id='e2e9d1a6-432d-4062-8870-bfcb8c324ad7', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters) return self._deserialize('ProcessWorkItemType', response) def get_process_work_item_types(self, process_id, expand=None): """GetProcessWorkItemTypes. - Returns a list of all work item types in a process. + [Preview API] Returns a list of all work item types in a process. :param str process_id: The ID of the process :param str expand: Flag to determine what properties of work item type to return :rtype: [ProcessWorkItemType] @@ -1083,18 +1083,18 @@ def get_process_work_item_types(self, process_id, expand=None): query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') response = self._send(http_method='GET', location_id='e2e9d1a6-432d-4062-8870-bfcb8c324ad7', - version='7.0', + version='7.2-preview.2', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[ProcessWorkItemType]', self._unwrap_collection(response)) def update_process_work_item_type(self, work_item_type_update, process_id, wit_ref_name): """UpdateProcessWorkItemType. - Updates a work item type of the process. - :param :class:` ` work_item_type_update: + [Preview API] Updates a work item type of the process. + :param :class:` ` work_item_type_update: :param str process_id: The ID of the process :param str wit_ref_name: The reference name of the work item type - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if process_id is not None: @@ -1104,18 +1104,18 @@ def update_process_work_item_type(self, work_item_type_update, process_id, wit_r content = self._serialize.body(work_item_type_update, 'UpdateProcessWorkItemTypeRequest') response = self._send(http_method='PATCH', location_id='e2e9d1a6-432d-4062-8870-bfcb8c324ad7', - version='7.0', + version='7.2-preview.2', route_values=route_values, content=content) return self._deserialize('ProcessWorkItemType', response) def add_behavior_to_work_item_type(self, behavior, process_id, wit_ref_name_for_behaviors): """AddBehaviorToWorkItemType. - Adds a behavior to the work item type of the process. - :param :class:` ` behavior: + [Preview API] Adds a behavior to the work item type of the process. + :param :class:` ` behavior: :param str process_id: The ID of the process :param str wit_ref_name_for_behaviors: Work item type reference name for the behavior - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if process_id is not None: @@ -1125,18 +1125,18 @@ def add_behavior_to_work_item_type(self, behavior, process_id, wit_ref_name_for_ content = self._serialize.body(behavior, 'WorkItemTypeBehavior') response = self._send(http_method='POST', location_id='6d765a2e-4e1b-4b11-be93-f953be676024', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('WorkItemTypeBehavior', response) def get_behavior_for_work_item_type(self, process_id, wit_ref_name_for_behaviors, behavior_ref_name): """GetBehaviorForWorkItemType. - Returns a behavior for the work item type of the process. + [Preview API] Returns a behavior for the work item type of the process. :param str process_id: The ID of the process :param str wit_ref_name_for_behaviors: Work item type reference name for the behavior :param str behavior_ref_name: The reference name of the behavior - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if process_id is not None: @@ -1147,13 +1147,13 @@ def get_behavior_for_work_item_type(self, process_id, wit_ref_name_for_behaviors route_values['behaviorRefName'] = self._serialize.url('behavior_ref_name', behavior_ref_name, 'str') response = self._send(http_method='GET', location_id='6d765a2e-4e1b-4b11-be93-f953be676024', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('WorkItemTypeBehavior', response) def get_behaviors_for_work_item_type(self, process_id, wit_ref_name_for_behaviors): """GetBehaviorsForWorkItemType. - Returns a list of all behaviors for the work item type of the process. + [Preview API] Returns a list of all behaviors for the work item type of the process. :param str process_id: The ID of the process :param str wit_ref_name_for_behaviors: Work item type reference name for the behavior :rtype: [WorkItemTypeBehavior] @@ -1165,13 +1165,13 @@ def get_behaviors_for_work_item_type(self, process_id, wit_ref_name_for_behavior route_values['witRefNameForBehaviors'] = self._serialize.url('wit_ref_name_for_behaviors', wit_ref_name_for_behaviors, 'str') response = self._send(http_method='GET', location_id='6d765a2e-4e1b-4b11-be93-f953be676024', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('[WorkItemTypeBehavior]', self._unwrap_collection(response)) def remove_behavior_from_work_item_type(self, process_id, wit_ref_name_for_behaviors, behavior_ref_name): """RemoveBehaviorFromWorkItemType. - Removes a behavior for the work item type of the process. + [Preview API] Removes a behavior for the work item type of the process. :param str process_id: The ID of the process :param str wit_ref_name_for_behaviors: Work item type reference name for the behavior :param str behavior_ref_name: The reference name of the behavior @@ -1185,16 +1185,16 @@ def remove_behavior_from_work_item_type(self, process_id, wit_ref_name_for_behav route_values['behaviorRefName'] = self._serialize.url('behavior_ref_name', behavior_ref_name, 'str') self._send(http_method='DELETE', location_id='6d765a2e-4e1b-4b11-be93-f953be676024', - version='7.0', + version='7.2-preview.1', route_values=route_values) def update_behavior_to_work_item_type(self, behavior, process_id, wit_ref_name_for_behaviors): """UpdateBehaviorToWorkItemType. - Updates a behavior for the work item type of the process. - :param :class:` ` behavior: + [Preview API] Updates a behavior for the work item type of the process. + :param :class:` ` behavior: :param str process_id: The ID of the process :param str wit_ref_name_for_behaviors: Work item type reference name for the behavior - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if process_id is not None: @@ -1204,7 +1204,7 @@ def update_behavior_to_work_item_type(self, behavior, process_id, wit_ref_name_f content = self._serialize.body(behavior, 'WorkItemTypeBehavior') response = self._send(http_method='PATCH', location_id='6d765a2e-4e1b-4b11-be93-f953be676024', - version='7.0', + version='7.2-preview.1', route_values=route_values, content=content) return self._deserialize('WorkItemTypeBehavior', response) diff --git a/azure-devops/azure/devops/v7_0/work_item_tracking_process_template/__init__.py b/azure-devops/azure/devops/v7_2/work_item_tracking_process_template/__init__.py similarity index 100% rename from azure-devops/azure/devops/v7_0/work_item_tracking_process_template/__init__.py rename to azure-devops/azure/devops/v7_2/work_item_tracking_process_template/__init__.py diff --git a/azure-devops/azure/devops/v7_0/work_item_tracking_process_template/models.py b/azure-devops/azure/devops/v7_2/work_item_tracking_process_template/models.py similarity index 97% rename from azure-devops/azure/devops/v7_0/work_item_tracking_process_template/models.py rename to azure-devops/azure/devops/v7_2/work_item_tracking_process_template/models.py index 4d2edd0d..496bc21a 100644 --- a/azure-devops/azure/devops/v7_0/work_item_tracking_process_template/models.py +++ b/azure-devops/azure/devops/v7_2/work_item_tracking_process_template/models.py @@ -22,7 +22,7 @@ class AdminBehavior(Model): :param description: The description of the behavior. :type description: str :param fields: List of behavior fields. - :type fields: list of :class:`AdminBehaviorField ` + :type fields: list of :class:`AdminBehaviorField ` :param id: Behavior ID. :type id: str :param inherits: Parent behavior reference. @@ -120,10 +120,10 @@ class ProcessImportResult(Model): """ Describes the result of a Process Import request. + :param check_existence_result: Check template existence result. + :type check_existence_result: :class:`CheckTemplateExistenceResult ` :param help_url: Help URL. :type help_url: str - :param check_existence_result: Check template existence result. - :type check_existence_result: :class:`CheckTemplateExistenceResult ` :param id: ID of the import operation. :type id: str :param is_new: Whether this imported process is new. @@ -131,22 +131,22 @@ class ProcessImportResult(Model): :param promote_job_id: The promote job identifier. :type promote_job_id: str :param validation_results: The list of validation results. - :type validation_results: list of :class:`ValidationIssue ` + :type validation_results: list of :class:`ValidationIssue ` """ _attribute_map = { - 'help_url': {'key': 'helpUrl', 'type': 'str'}, 'check_existence_result': {'key': 'checkExistenceResult', 'type': 'CheckTemplateExistenceResult'}, + 'help_url': {'key': 'helpUrl', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, 'is_new': {'key': 'isNew', 'type': 'bool'}, 'promote_job_id': {'key': 'promoteJobId', 'type': 'str'}, 'validation_results': {'key': 'validationResults', 'type': '[ValidationIssue]'} } - def __init__(self, help_url=None, check_existence_result=None, id=None, is_new=None, promote_job_id=None, validation_results=None): + def __init__(self, check_existence_result=None, help_url=None, id=None, is_new=None, promote_job_id=None, validation_results=None): super(ProcessImportResult, self).__init__() - self.help_url = help_url self.check_existence_result = check_existence_result + self.help_url = help_url self.id = id self.is_new = is_new self.promote_job_id = promote_job_id diff --git a/azure-devops/azure/devops/v7_0/work_item_tracking_process_template/work_item_tracking_process_template_client.py b/azure-devops/azure/devops/v7_2/work_item_tracking_process_template/work_item_tracking_process_template_client.py similarity index 87% rename from azure-devops/azure/devops/v7_0/work_item_tracking_process_template/work_item_tracking_process_template_client.py rename to azure-devops/azure/devops/v7_2/work_item_tracking_process_template/work_item_tracking_process_template_client.py index c482fc29..55da4815 100644 --- a/azure-devops/azure/devops/v7_0/work_item_tracking_process_template/work_item_tracking_process_template_client.py +++ b/azure-devops/azure/devops/v7_2/work_item_tracking_process_template/work_item_tracking_process_template_client.py @@ -27,10 +27,10 @@ def __init__(self, base_url=None, creds=None): def get_behavior(self, process_id, behavior_ref_name): """GetBehavior. - Returns a behavior for the process. + [Preview API] Returns a behavior for the process. :param str process_id: The ID of the process :param str behavior_ref_name: The reference name of the behavior - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if process_id is not None: @@ -40,14 +40,14 @@ def get_behavior(self, process_id, behavior_ref_name): query_parameters['behaviorRefName'] = self._serialize.query('behavior_ref_name', behavior_ref_name, 'str') response = self._send(http_method='GET', location_id='90bf9317-3571-487b-bc8c-a523ba0e05d7', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('AdminBehavior', response) def get_behaviors(self, process_id): """GetBehaviors. - Returns a list of behaviors for the process. + [Preview API] Returns a list of behaviors for the process. :param str process_id: The ID of the process :rtype: [AdminBehavior] """ @@ -56,13 +56,13 @@ def get_behaviors(self, process_id): route_values['processId'] = self._serialize.url('process_id', process_id, 'str') response = self._send(http_method='GET', location_id='90bf9317-3571-487b-bc8c-a523ba0e05d7', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('[AdminBehavior]', self._unwrap_collection(response)) def export_process_template(self, id, **kwargs): """ExportProcessTemplate. - Returns requested process template. + [Preview API] Returns requested process template. :param str id: The ID of the process :rtype: object """ @@ -72,7 +72,7 @@ def export_process_template(self, id, **kwargs): route_values['action'] = 'Export' response = self._send(http_method='GET', location_id='29e1f38d-9e9c-4358-86a5-cdf9896a5759', - version='7.0', + version='7.2-preview.1', route_values=route_values, accept_media_type='application/zip') if "callback" in kwargs: @@ -83,11 +83,11 @@ def export_process_template(self, id, **kwargs): def import_process_template(self, upload_stream, ignore_warnings=None, replace_existing_template=None, **kwargs): """ImportProcessTemplate. - Imports a process from zip file. + [Preview API] Imports a process from zip file. :param object upload_stream: Stream to upload :param bool ignore_warnings: Ignores validation warnings. Default value is false. :param bool replace_existing_template: Replaces the existing template. Default value is true. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} route_values['action'] = 'Import' @@ -103,7 +103,7 @@ def import_process_template(self, upload_stream, ignore_warnings=None, replace_e content = self._client.stream_upload(upload_stream, callback=callback) response = self._send(http_method='POST', location_id='29e1f38d-9e9c-4358-86a5-cdf9896a5759', - version='7.0', + version='7.2-preview.1', route_values=route_values, query_parameters=query_parameters, content=content, @@ -112,9 +112,9 @@ def import_process_template(self, upload_stream, ignore_warnings=None, replace_e def import_process_template_status(self, id): """ImportProcessTemplateStatus. - Tells whether promote has completed for the specified promote job ID. + [Preview API] Tells whether promote has completed for the specified promote job ID. :param str id: The ID of the promote job operation - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if id is not None: @@ -122,7 +122,7 @@ def import_process_template_status(self, id): route_values['action'] = 'Status' response = self._send(http_method='GET', location_id='29e1f38d-9e9c-4358-86a5-cdf9896a5759', - version='7.0', + version='7.2-preview.1', route_values=route_values) return self._deserialize('ProcessPromoteStatus', response) diff --git a/azure-devops/azure/devops/version.py b/azure-devops/azure/devops/version.py index dd168d57..8b6cf990 100644 --- a/azure-devops/azure/devops/version.py +++ b/azure-devops/azure/devops/version.py @@ -3,4 +3,4 @@ # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- -VERSION = "7.1.0b4" +VERSION = "7.2.0b1" diff --git a/azure-devops/setup.py b/azure-devops/setup.py index ad66d697..8e2c4d97 100644 --- a/azure-devops/setup.py +++ b/azure-devops/setup.py @@ -6,7 +6,7 @@ from setuptools import setup, find_namespace_packages NAME = "azure-devops" -VERSION = "7.1.0b4" +VERSION = "7.2.0b1" # To install the library, run the following #