diff --git a/README.md b/README.md index a5fa1a4f..be97f157 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ for project in projects: ## API documentation -This Python library provides a thin wrapper around the Azure DevOps REST APIs. See the [Azure DevOps REST API reference](https://docs.microsoft.com/en-us/rest/api/vsts/?view=vsts-rest-5.0) for details on calling different APIs. +This Python library provides a thin wrapper around the Azure DevOps REST APIs. See the [Azure DevOps REST API reference](https://docs.microsoft.com/en-us/rest/api/azure/devops/?view=azure-devops-rest-5.1) for details on calling different APIs. ## Samples diff --git a/azure-devops/azure/devops/released/accounts/__init__.py b/azure-devops/azure/devops/released/accounts/__init__.py index a657e6e5..fdc7c5d3 100644 --- a/azure-devops/azure/devops/released/accounts/__init__.py +++ b/azure-devops/azure/devops/released/accounts/__init__.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------------------------- -from ...v5_0.accounts.models import * +from ...v5_1.accounts.models import * from .accounts_client import AccountsClient __all__ = [ diff --git a/azure-devops/azure/devops/released/accounts/accounts_client.py b/azure-devops/azure/devops/released/accounts/accounts_client.py index e6b429b9..8376bf68 100644 --- a/azure-devops/azure/devops/released/accounts/accounts_client.py +++ b/azure-devops/azure/devops/released/accounts/accounts_client.py @@ -8,7 +8,7 @@ from msrest import Serializer, Deserializer from ...client import Client -from ...v5_0.accounts import models +from ...v5_1.accounts import models class AccountsClient(Client): @@ -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='5.0', + version='5.1', query_parameters=query_parameters) return self._deserialize('[Account]', self._unwrap_collection(response)) diff --git a/azure-devops/azure/devops/released/build/__init__.py b/azure-devops/azure/devops/released/build/__init__.py index e3d9ecc6..c1f92f41 100644 --- a/azure-devops/azure/devops/released/build/__init__.py +++ b/azure-devops/azure/devops/released/build/__init__.py @@ -6,11 +6,12 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------------------------- -from ...v5_0.build.models import * +from ...v5_1.build.models import * from .build_client import BuildClient __all__ = [ 'AgentPoolQueue', + 'AgentSpecification', 'AggregatedResultsAnalysis', 'AggregatedResultsByOutcome', 'AggregatedResultsDifference', diff --git a/azure-devops/azure/devops/released/build/build_client.py b/azure-devops/azure/devops/released/build/build_client.py index c1994a6c..3258073c 100644 --- a/azure-devops/azure/devops/released/build/build_client.py +++ b/azure-devops/azure/devops/released/build/build_client.py @@ -8,7 +8,7 @@ from msrest import Serializer, Deserializer from ...client import Client -from ...v5_0.build import models +from ...v5_1.build import models class BuildClient(Client): @@ -28,10 +28,10 @@ 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. + :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,7 +41,7 @@ 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='5.0', + version='5.1', route_values=route_values, content=content) return self._deserialize('BuildArtifact', response) @@ -52,7 +52,7 @@ def get_artifact(self, project, build_id, artifact_name): :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,7 +64,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('BuildArtifact', response) @@ -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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters, accept_media_type='application/zip') @@ -111,7 +111,7 @@ 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='5.0', + version='5.1', route_values=route_values) return self._deserialize('[BuildArtifact]', self._unwrap_collection(response)) @@ -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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters, accept_media_type='application/octet-stream') @@ -162,7 +162,7 @@ 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='5.0', + version='5.1', route_values=route_values) def get_build(self, project, build_id, property_filters=None): @@ -171,7 +171,7 @@ def get_build(self, project, build_id, property_filters=None): :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: @@ -183,7 +183,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('Build', response) @@ -265,7 +265,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[Build]', self._unwrap_collection(response)) @@ -273,12 +273,12 @@ def get_builds(self, project, definitions=None, queues=None, build_number=None, def queue_build(self, build, project, ignore_warnings=None, check_in_ticket=None, source_build_id=None): """QueueBuild. Queues a build - :param :class:` ` 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: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -293,7 +293,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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters, content=content) @@ -302,11 +302,11 @@ 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. + :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: @@ -319,7 +319,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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters, content=content) @@ -338,7 +338,7 @@ 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='5.0', + version='5.1', route_values=route_values, content=content) return self._deserialize('[Build]', self._unwrap_collection(response)) @@ -367,7 +367,7 @@ def get_build_changes(self, project, build_id, continuation_token=None, top=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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[Change]', self._unwrap_collection(response)) @@ -376,14 +376,14 @@ def get_build_controller(self, controller_id): """GetBuildController. 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='5.0', + version='5.1', route_values=route_values) return self._deserialize('BuildController', response) @@ -398,18 +398,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='5.0', + version='5.1', 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. + :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: @@ -422,7 +422,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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters, content=content) @@ -441,7 +441,7 @@ 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='5.0', + version='5.1', route_values=route_values) def get_definition(self, project, definition_id, revision=None, min_metrics_time=None, property_filters=None, include_latest_builds=None): @@ -453,7 +453,7 @@ def get_definition(self, project, definition_id, revision=None, min_metrics_time :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: @@ -472,7 +472,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('BuildDefinition', response) @@ -538,7 +538,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[BuildDefinitionReference]', self._unwrap_collection(response)) @@ -549,7 +549,7 @@ def restore_definition(self, project, definition_id, deleted): :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: @@ -561,7 +561,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('BuildDefinition', response) @@ -569,12 +569,12 @@ def restore_definition(self, project, definition_id, deleted): def update_definition(self, definition, project, definition_id, secrets_source_definition_id=None, secrets_source_definition_revision=None): """UpdateDefinition. Updates an existing definition. - :param :class:` ` definition: The new version of the defintion. + :param :class:` ` definition: The new version of the defintion. :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: @@ -589,7 +589,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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters, content=content) @@ -619,7 +619,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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters, accept_media_type='text/plain') @@ -653,7 +653,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[str]', self._unwrap_collection(response)) @@ -672,7 +672,7 @@ 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='5.0', + version='5.1', route_values=route_values) return self._deserialize('[BuildLog]', self._unwrap_collection(response)) @@ -690,7 +690,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='5.0', + version='5.1', route_values=route_values, accept_media_type='application/zip') if "callback" in kwargs: @@ -723,7 +723,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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters, accept_media_type='application/zip') @@ -744,7 +744,7 @@ 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='5.0', + version='5.1', route_values=route_values) return self._deserialize('[BuildOptionDefinition]', self._unwrap_collection(response)) @@ -762,7 +762,7 @@ 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='5.0', + version='5.1', route_values=route_values) return self._deserialize('[BuildDefinitionRevision]', self._unwrap_collection(response)) @@ -770,23 +770,23 @@ def get_build_settings(self, project=None): """GetBuildSettings. 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='5.0', + version='5.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. + :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: @@ -794,7 +794,7 @@ 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='5.0', + version='5.1', route_values=route_values, content=content) return self._deserialize('BuildSettings', response) @@ -816,7 +816,7 @@ 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='5.0', + version='5.1', route_values=route_values) return self._deserialize('[str]', self._unwrap_collection(response)) @@ -836,7 +836,7 @@ 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='5.0', + version='5.1', route_values=route_values, content=content) return self._deserialize('[str]', self._unwrap_collection(response)) @@ -858,7 +858,7 @@ 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='5.0', + version='5.1', route_values=route_values) return self._deserialize('[str]', self._unwrap_collection(response)) @@ -876,7 +876,7 @@ 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='5.0', + version='5.1', route_values=route_values) return self._deserialize('[str]', self._unwrap_collection(response)) @@ -891,7 +891,7 @@ 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='5.0', + version='5.1', route_values=route_values) return self._deserialize('[str]', self._unwrap_collection(response)) @@ -908,7 +908,7 @@ 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='5.0', + version='5.1', route_values=route_values) def get_template(self, project, template_id): @@ -916,7 +916,7 @@ def get_template(self, project, template_id): 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: @@ -925,7 +925,7 @@ 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='5.0', + version='5.1', route_values=route_values) return self._deserialize('BuildDefinitionTemplate', response) @@ -940,17 +940,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='5.0', + version='5.1', 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. + :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: @@ -960,7 +960,7 @@ 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='5.0', + version='5.1', route_values=route_values, content=content) return self._deserialize('BuildDefinitionTemplate', response) @@ -973,7 +973,7 @@ def get_build_timeline(self, project, build_id, timeline_id=None, change_id=None :param str timeline_id: :param int change_id: :param str plan_id: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -989,7 +989,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('Timeline', response) @@ -1012,7 +1012,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[ResourceRef]', self._unwrap_collection(response)) @@ -1037,7 +1037,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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters, content=content) diff --git a/azure-devops/azure/devops/released/client_factory.py b/azure-devops/azure/devops/released/client_factory.py index f1bd1210..3940d35b 100644 --- a/azure-devops/azure/devops/released/client_factory.py +++ b/azure-devops/azure/devops/released/client_factory.py @@ -9,7 +9,7 @@ class ClientFactory(object): """ClientFactory. - A factory class to get the 5.0 released clients. + A factory class to get the 5.1 released clients. """ def __init__(self, connection): @@ -17,133 +17,154 @@ def __init__(self, connection): def get_accounts_client(self): """get_accounts_client. - Gets the 5.0 version of the AccountsClient + Gets the 5.1 version of the AccountsClient :rtype: :class:` ` """ return self._connection.get_client('azure.devops.released.accounts.accounts_client.AccountsClient') def get_build_client(self): """get_build_client. - Gets the 5.0 version of the BuildClient + Gets the 5.1 version of the BuildClient :rtype: :class:` ` """ return self._connection.get_client('azure.devops.released.build.build_client.BuildClient') def get_cloud_load_test_client(self): """get_cloud_load_test_client. - Gets the 5.0 version of the CloudLoadTestClient + Gets the 5.1 version of the CloudLoadTestClient :rtype: :class:` ` """ return self._connection.get_client('azure.devops.released.cloud_load_test.cloud_load_test_client.CloudLoadTestClient') def get_core_client(self): """get_core_client. - Gets the 5.0 version of the CoreClient + Gets the 5.1 version of the CoreClient :rtype: :class:` ` """ return self._connection.get_client('azure.devops.released.core.core_client.CoreClient') def get_git_client(self): """get_git_client. - Gets the 5.0 version of the GitClient + Gets the 5.1 version of the GitClient :rtype: :class:` ` """ return self._connection.get_client('azure.devops.released.git.git_client.GitClient') def get_identity_client(self): """get_identity_client. - Gets the 5.0 version of the IdentityClient + Gets the 5.1 version of the IdentityClient :rtype: :class:` ` """ return self._connection.get_client('azure.devops.released.identity.identity_client.IdentityClient') + def get_notification_client(self): + """get_notification_client. + Gets the 5.1 version of the NotificationClient + :rtype: :class:` ` + """ + return self._connection.get_client('azure.devops.released.notification.notification_client.NotificationClient') + def get_operations_client(self): """get_operations_client. - Gets the 5.0 version of the OperationsClient + Gets the 5.1 version of the OperationsClient :rtype: :class:` ` """ return self._connection.get_client('azure.devops.released.operations.operations_client.OperationsClient') def get_policy_client(self): """get_policy_client. - Gets the 5.0 version of the PolicyClient + Gets the 5.1 version of the PolicyClient :rtype: :class:` ` """ return self._connection.get_client('azure.devops.released.policy.policy_client.PolicyClient') def get_profile_client(self): """get_profile_client. - Gets the 5.0 version of the ProfileClient + Gets the 5.1 version of the ProfileClient :rtype: :class:` ` """ return self._connection.get_client('azure.devops.released.profile.profile_client.ProfileClient') def get_release_client(self): """get_release_client. - Gets the 5.0 version of the ReleaseClient + Gets the 5.1 version of the ReleaseClient :rtype: :class:` ` """ return self._connection.get_client('azure.devops.released.release.release_client.ReleaseClient') def get_security_client(self): """get_security_client. - Gets the 5.0 version of the SecurityClient + Gets the 5.1 version of the SecurityClient :rtype: :class:` ` """ return self._connection.get_client('azure.devops.released.security.security_client.SecurityClient') def get_service_hooks_client(self): """get_service_hooks_client. - Gets the 5.0 version of the ServiceHooksClient + Gets the 5.1 version of the ServiceHooksClient :rtype: :class:` ` """ return self._connection.get_client('azure.devops.released.service_hooks.service_hooks_client.ServiceHooksClient') def get_task_client(self): """get_task_client. - Gets the 5.0 version of the TaskClient + Gets the 5.1 version of the TaskClient :rtype: :class:` ` """ return self._connection.get_client('azure.devops.released.task.task_client.TaskClient') def get_task_agent_client(self): """get_task_agent_client. - Gets the 5.0 version of the TaskAgentClient + Gets the 5.1 version of the TaskAgentClient :rtype: :class:` ` """ return self._connection.get_client('azure.devops.released.task_agent.task_agent_client.TaskAgentClient') def get_test_client(self): """get_test_client. - Gets the 5.0 version of the TestClient + Gets the 5.1 version of the TestClient :rtype: :class:` ` """ return self._connection.get_client('azure.devops.released.test.test_client.TestClient') + def get_test_plan_client(self): + """get_test_plan_client. + Gets the 5.1 version of the TestPlanClient + :rtype: :class:` ` + """ + return self._connection.get_client('azure.devops.released.test_plan.test_plan_client.TestPlanClient') + + def get_test_results_client(self): + """get_test_results_client. + Gets the 5.1 version of the TestResultsClient + :rtype: :class:` ` + """ + return self._connection.get_client('azure.devops.released.test_results.test_results_client.TestResultsClient') + def get_tfvc_client(self): """get_tfvc_client. - Gets the 5.0 version of the TfvcClient + Gets the 5.1 version of the TfvcClient :rtype: :class:` ` """ return self._connection.get_client('azure.devops.released.tfvc.tfvc_client.TfvcClient') def get_wiki_client(self): """get_wiki_client. - Gets the 5.0 version of the WikiClient + Gets the 5.1 version of the WikiClient :rtype: :class:` ` """ return self._connection.get_client('azure.devops.released.wiki.wiki_client.WikiClient') def get_work_client(self): """get_work_client. - Gets the 5.0 version of the WorkClient + Gets the 5.1 version of the WorkClient :rtype: :class:` ` """ return self._connection.get_client('azure.devops.released.work.work_client.WorkClient') def get_work_item_tracking_client(self): """get_work_item_tracking_client. - Gets the 5.0 version of the WorkItemTrackingClient + Gets the 5.1 version of the WorkItemTrackingClient :rtype: :class:` ` """ return self._connection.get_client('azure.devops.released.work_item_tracking.work_item_tracking_client.WorkItemTrackingClient') diff --git a/azure-devops/azure/devops/released/cloud_load_test/__init__.py b/azure-devops/azure/devops/released/cloud_load_test/__init__.py index f33e9d1d..0f19b61e 100644 --- a/azure-devops/azure/devops/released/cloud_load_test/__init__.py +++ b/azure-devops/azure/devops/released/cloud_load_test/__init__.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------------------------- -from ...v5_0.cloud_load_test.models import * +from ...v5_1.cloud_load_test.models import * from .cloud_load_test_client import CloudLoadTestClient __all__ = [ @@ -25,6 +25,8 @@ 'Diagnostics', 'DropAccessData', 'ErrorDetails', + 'GraphSubjectBase', + 'IdentityRef', 'LoadGenerationGeoLocation', 'LoadTest', 'LoadTestDefinition', @@ -33,6 +35,7 @@ 'LoadTestRunSettings', 'OverridableRunSettings', 'PageSummary', + 'ReferenceLinks', 'RequestSummary', 'ScenarioSummary', 'StaticAgentRunSetting', diff --git a/azure-devops/azure/devops/released/cloud_load_test/cloud_load_test_client.py b/azure-devops/azure/devops/released/cloud_load_test/cloud_load_test_client.py index 2a2cec49..acb82100 100644 --- a/azure-devops/azure/devops/released/cloud_load_test/cloud_load_test_client.py +++ b/azure-devops/azure/devops/released/cloud_load_test/cloud_load_test_client.py @@ -8,7 +8,7 @@ from msrest import Serializer, Deserializer from ...client import Client -from ...v5_0.cloud_load_test import models +from ...v5_1.cloud_load_test import models class CloudLoadTestClient(Client): @@ -27,13 +27,13 @@ def __init__(self, base_url=None, creds=None): def create_agent_group(self, group): """CreateAgentGroup. - :param :class:` ` group: Agent group to be created - :rtype: :class:` ` + :param :class:` ` group: Agent group to be created + :rtype: :class:` ` """ content = self._serialize.body(group, 'AgentGroup') response = self._send(http_method='POST', location_id='ab8d91c1-12d9-4ec5-874d-1ddb23e17720', - version='5.0', + version='5.1', content=content) return self._deserialize('AgentGroup', response) @@ -60,7 +60,7 @@ def get_agent_groups(self, agent_group_id=None, machine_setup_input=None, machin query_parameters['agentGroupName'] = self._serialize.query('agent_group_name', agent_group_name, 'str') response = self._send(http_method='GET', location_id='ab8d91c1-12d9-4ec5-874d-1ddb23e17720', - version='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('object', response) @@ -79,7 +79,7 @@ def delete_static_agent(self, agent_group_id, agent_name): query_parameters['agentName'] = self._serialize.query('agent_name', agent_name, 'str') response = self._send(http_method='DELETE', location_id='87e4b63d-7142-4b50-801e-72ba9ff8ee9b', - version='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('str', response) @@ -98,7 +98,7 @@ def get_static_agents(self, agent_group_id, agent_name=None): query_parameters['agentName'] = self._serialize.query('agent_name', agent_name, 'str') response = self._send(http_method='GET', location_id='87e4b63d-7142-4b50-801e-72ba9ff8ee9b', - version='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('object', response) @@ -106,14 +106,14 @@ def get_static_agents(self, agent_group_id, agent_name=None): def get_application(self, application_id): """GetApplication. :param str application_id: Filter by APM application identifier. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if application_id is not None: route_values['applicationId'] = self._serialize.url('application_id', application_id, 'str') response = self._send(http_method='GET', location_id='2c986dce-8e8d-4142-b541-d016d5aff764', - version='5.0', + version='5.1', route_values=route_values) return self._deserialize('Application', response) @@ -127,7 +127,7 @@ def get_applications(self, type=None): query_parameters['type'] = self._serialize.query('type', type, 'str') response = self._send(http_method='GET', location_id='2c986dce-8e8d-4142-b541-d016d5aff764', - version='5.0', + version='5.1', query_parameters=query_parameters) return self._deserialize('[Application]', self._unwrap_collection(response)) @@ -148,7 +148,7 @@ def get_counters(self, test_run_id, group_names, include_summary=None): query_parameters['includeSummary'] = self._serialize.query('include_summary', include_summary, 'bool') response = self._send(http_method='GET', location_id='29265ea4-b5a5-4b2e-b054-47f5f6f00183', - version='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TestRunCounterInstance]', self._unwrap_collection(response)) @@ -166,15 +166,15 @@ def get_application_counters(self, application_id=None, plugintype=None): query_parameters['plugintype'] = self._serialize.query('plugintype', plugintype, 'str') response = self._send(http_method='GET', location_id='c1275ce9-6d26-4bc6-926b-b846502e812d', - version='5.0', + version='5.1', query_parameters=query_parameters) return self._deserialize('[ApplicationCounters]', self._unwrap_collection(response)) def get_counter_samples(self, counter_sample_query_details, test_run_id): """GetCounterSamples. - :param :class:` ` counter_sample_query_details: + :param :class:` ` counter_sample_query_details: :param str test_run_id: The test run identifier - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if test_run_id is not None: @@ -182,7 +182,7 @@ def get_counter_samples(self, counter_sample_query_details, test_run_id): content = self._serialize.body(counter_sample_query_details, 'VssJsonCollectionWrapper') response = self._send(http_method='POST', location_id='bad18480-7193-4518-992a-37289c5bb92d', - version='5.0', + version='5.1', route_values=route_values, content=content) return self._deserialize('CounterSamplesResult', response) @@ -193,7 +193,7 @@ def get_load_test_run_errors(self, test_run_id, type=None, sub_type=None, detail :param str type: Filter for the particular type of errors. :param str sub_type: Filter for a particular subtype of errors. You should not provide error subtype without error type. :param bool detailed: To include the details of test errors such as messagetext, request, stacktrace, testcasename, scenarioname, and lasterrordate. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if test_run_id is not None: @@ -207,7 +207,7 @@ def get_load_test_run_errors(self, test_run_id, type=None, sub_type=None, detail query_parameters['detailed'] = self._serialize.query('detailed', detailed, 'bool') response = self._send(http_method='GET', location_id='b52025a7-3fb4-4283-8825-7079e75bd402', - version='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('LoadTestErrors', response) @@ -222,21 +222,21 @@ def get_test_run_messages(self, test_run_id): route_values['testRunId'] = self._serialize.url('test_run_id', test_run_id, 'str') response = self._send(http_method='GET', location_id='2e7ba122-f522-4205-845b-2d270e59850a', - version='5.0', + version='5.1', route_values=route_values) return self._deserialize('[TestRunMessage]', self._unwrap_collection(response)) def get_plugin(self, type): """GetPlugin. :param str type: Currently ApplicationInsights is the only available plugin type. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if type is not None: route_values['type'] = self._serialize.url('type', type, 'str') response = self._send(http_method='GET', location_id='7dcb0bb2-42d5-4729-9958-c0401d5e7693', - version='5.0', + version='5.1', route_values=route_values) return self._deserialize('ApplicationType', response) @@ -246,46 +246,46 @@ def get_plugins(self): """ response = self._send(http_method='GET', location_id='7dcb0bb2-42d5-4729-9958-c0401d5e7693', - version='5.0') + version='5.1') return self._deserialize('[ApplicationType]', self._unwrap_collection(response)) def get_load_test_result(self, test_run_id): """GetLoadTestResult. :param str test_run_id: The test run identifier - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if test_run_id is not None: route_values['testRunId'] = self._serialize.url('test_run_id', test_run_id, 'str') response = self._send(http_method='GET', location_id='5ed69bd8-4557-4cec-9b75-1ad67d0c257b', - version='5.0', + version='5.1', route_values=route_values) return self._deserialize('TestResults', response) def create_test_definition(self, test_definition): """CreateTestDefinition. - :param :class:` ` test_definition: Test definition to be created - :rtype: :class:` ` + :param :class:` ` test_definition: Test definition to be created + :rtype: :class:` ` """ content = self._serialize.body(test_definition, 'TestDefinition') response = self._send(http_method='POST', location_id='a8f9b135-f604-41ea-9d74-d9a5fd32fcd8', - version='5.0', + version='5.1', content=content) return self._deserialize('TestDefinition', response) def get_test_definition(self, test_definition_id): """GetTestDefinition. :param str test_definition_id: The test definition identifier - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if test_definition_id is not None: route_values['testDefinitionId'] = self._serialize.url('test_definition_id', test_definition_id, 'str') response = self._send(http_method='GET', location_id='a8f9b135-f604-41ea-9d74-d9a5fd32fcd8', - version='5.0', + version='5.1', route_values=route_values) return self._deserialize('TestDefinition', response) @@ -305,71 +305,71 @@ def get_test_definitions(self, from_date=None, to_date=None, top=None): query_parameters['top'] = self._serialize.query('top', top, 'int') response = self._send(http_method='GET', location_id='a8f9b135-f604-41ea-9d74-d9a5fd32fcd8', - version='5.0', + version='5.1', query_parameters=query_parameters) return self._deserialize('[TestDefinitionBasic]', self._unwrap_collection(response)) def update_test_definition(self, test_definition): """UpdateTestDefinition. - :param :class:` ` test_definition: - :rtype: :class:` ` + :param :class:` ` test_definition: + :rtype: :class:` ` """ content = self._serialize.body(test_definition, 'TestDefinition') response = self._send(http_method='PUT', location_id='a8f9b135-f604-41ea-9d74-d9a5fd32fcd8', - version='5.0', + version='5.1', content=content) return self._deserialize('TestDefinition', response) def create_test_drop(self, web_test_drop): """CreateTestDrop. - :param :class:` ` web_test_drop: Test drop to be created - :rtype: :class:` ` + :param :class:` ` web_test_drop: Test drop to be created + :rtype: :class:` ` """ content = self._serialize.body(web_test_drop, 'TestDrop') response = self._send(http_method='POST', location_id='d89d0e08-505c-4357-96f6-9729311ce8ad', - version='5.0', + version='5.1', content=content) return self._deserialize('TestDrop', response) def get_test_drop(self, test_drop_id): """GetTestDrop. :param str test_drop_id: The test drop identifier - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if test_drop_id is not None: route_values['testDropId'] = self._serialize.url('test_drop_id', test_drop_id, 'str') response = self._send(http_method='GET', location_id='d89d0e08-505c-4357-96f6-9729311ce8ad', - version='5.0', + version='5.1', route_values=route_values) return self._deserialize('TestDrop', response) def create_test_run(self, web_test_run): """CreateTestRun. - :param :class:` ` web_test_run: - :rtype: :class:` ` + :param :class:` ` web_test_run: + :rtype: :class:` ` """ content = self._serialize.body(web_test_run, 'TestRun') response = self._send(http_method='POST', location_id='b41a84ff-ff03-4ac1-b76e-e7ea25c92aba', - version='5.0', + version='5.1', content=content) return self._deserialize('TestRun', response) def get_test_run(self, test_run_id): """GetTestRun. :param str test_run_id: Unique ID of the test run - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if test_run_id is not None: route_values['testRunId'] = self._serialize.url('test_run_id', test_run_id, 'str') response = self._send(http_method='GET', location_id='b41a84ff-ff03-4ac1-b76e-e7ea25c92aba', - version='5.0', + version='5.1', route_values=route_values) return self._deserialize('TestRun', response) @@ -411,13 +411,13 @@ def get_test_runs(self, name=None, requested_by=None, status=None, run_type=None query_parameters['retentionState'] = self._serialize.query('retention_state', retention_state, 'str') response = self._send(http_method='GET', location_id='b41a84ff-ff03-4ac1-b76e-e7ea25c92aba', - version='5.0', + version='5.1', query_parameters=query_parameters) return self._deserialize('object', response) def update_test_run(self, web_test_run, test_run_id): """UpdateTestRun. - :param :class:` ` web_test_run: + :param :class:` ` web_test_run: :param str test_run_id: """ route_values = {} @@ -426,7 +426,7 @@ def update_test_run(self, web_test_run, test_run_id): content = self._serialize.body(web_test_run, 'TestRun') self._send(http_method='PATCH', location_id='b41a84ff-ff03-4ac1-b76e-e7ea25c92aba', - version='5.0', + version='5.1', route_values=route_values, content=content) diff --git a/azure-devops/azure/devops/released/core/__init__.py b/azure-devops/azure/devops/released/core/__init__.py index 0f7aa297..193a2d3c 100644 --- a/azure-devops/azure/devops/released/core/__init__.py +++ b/azure-devops/azure/devops/released/core/__init__.py @@ -6,18 +6,22 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------------------------- -from ...v5_0.core.models import * +from ...v5_1.core.models import * from .core_client import CoreClient __all__ = [ 'GraphSubjectBase', + 'Identity', + 'IdentityBase', 'IdentityData', 'IdentityRef', 'JsonPatchOperation', 'OperationReference', 'Process', 'ProcessReference', + 'ProjectAvatar', 'ProjectInfo', + 'ProjectProperties', 'ProjectProperty', 'Proxy', 'ProxyAuthorization', diff --git a/azure-devops/azure/devops/released/core/core_client.py b/azure-devops/azure/devops/released/core/core_client.py index 75e03b57..2eb1ee1c 100644 --- a/azure-devops/azure/devops/released/core/core_client.py +++ b/azure-devops/azure/devops/released/core/core_client.py @@ -8,7 +8,7 @@ from msrest import Serializer, Deserializer from ...client import Client -from ...v5_0.core import models +from ...v5_1.core import models class CoreClient(Client): @@ -46,7 +46,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TeamMember]', self._unwrap_collection(response)) @@ -55,14 +55,14 @@ def get_process_by_id(self, process_id): """GetProcessById. 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='5.0', + version='5.1', route_values=route_values) return self._deserialize('Process', response) @@ -73,21 +73,21 @@ def get_processes(self): """ response = self._send(http_method='GET', location_id='93878975-88c5-4e6a-8abb-7ddd77a8a7d8', - version='5.0') + version='5.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. :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='5.0', + version='5.1', route_values=route_values) return self._deserialize('TeamProjectCollection', response) @@ -105,7 +105,7 @@ 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='5.0', + version='5.1', query_parameters=query_parameters) return self._deserialize('[TeamProjectCollectionReference]', self._unwrap_collection(response)) @@ -115,7 +115,7 @@ def get_project(self, project_id, include_capabilities=None, include_history=Non :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: @@ -127,7 +127,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('TeamProject', response) @@ -155,20 +155,20 @@ def get_projects(self, state_filter=None, top=None, skip=None, continuation_toke 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='5.0', + version='5.1', 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:` ` + :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='5.0', + version='5.1', content=content) return self._deserialize('OperationReference', response) @@ -176,23 +176,23 @@ 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. :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='5.0', + version='5.1', 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, or description. - :param :class:` ` project_update: The updates for the project. + 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: @@ -200,7 +200,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='5.0', + version='5.1', route_values=route_values, content=content) return self._deserialize('OperationReference', response) @@ -208,9 +208,9 @@ def update_project(self, project_update, project_id): 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. + :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: @@ -218,7 +218,7 @@ 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='5.0', + version='5.1', route_values=route_values, content=content) return self._deserialize('WebApiTeam', response) @@ -227,7 +227,7 @@ def delete_team(self, project_id, team_id): """DeleteTeam. 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 of ID of the team to delete. + :param str team_id: The name or ID of the team to delete. """ route_values = {} if project_id is not None: @@ -236,34 +236,40 @@ 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='5.0', + version='5.1', route_values=route_values) - def get_team(self, project_id, team_id): + def get_team(self, project_id, team_id, expand_identity=None): """GetTeam. 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. - :rtype: :class:` ` + :param bool expand_identity: A value indicating whether or not to expand Identity information in the result WebApiTeam object. + :rtype: :class:` ` """ route_values = {} if project_id is not None: route_values['projectId'] = self._serialize.url('project_id', project_id, 'str') if team_id is not None: route_values['teamId'] = self._serialize.url('team_id', team_id, 'str') + query_parameters = {} + 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='d30a3dd1-f8ba-442a-b86a-bd0c0c383e59', - version='5.0', - route_values=route_values) + version='5.1', + 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): + def get_teams(self, project_id, mine=None, top=None, skip=None, expand_identity=None): """GetTeams. 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 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. :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] """ route_values = {} @@ -276,9 +282,11 @@ def get_teams(self, project_id, mine=None, top=None, skip=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='d30a3dd1-f8ba-442a-b86a-bd0c0c383e59', - version='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[WebApiTeam]', self._unwrap_collection(response)) @@ -286,10 +294,10 @@ def get_teams(self, project_id, mine=None, top=None, skip=None): def update_team(self, team_data, project_id, team_id): """UpdateTeam. Update a team's name and/or description. - :param :class:` ` team_data: + :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: @@ -299,7 +307,7 @@ 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='5.0', + version='5.1', route_values=route_values, content=content) return self._deserialize('WebApiTeam', response) diff --git a/azure-devops/azure/devops/released/git/__init__.py b/azure-devops/azure/devops/released/git/__init__.py index 991c8785..581a92e4 100644 --- a/azure-devops/azure/devops/released/git/__init__.py +++ b/azure-devops/azure/devops/released/git/__init__.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------------------------- -from ...v5_0.git.models import * +from ...v5_1.git.models import * from .git_client import GitClient __all__ = [ @@ -56,6 +56,7 @@ 'GitMergeOriginRef', 'GitMergeParameters', 'GitObject', + 'GitPolicyConfigurationResponse', 'GitPullRequest', 'GitPullRequestChange', 'GitPullRequestCommentThread', diff --git a/azure-devops/azure/devops/released/git/git_client_base.py b/azure-devops/azure/devops/released/git/git_client_base.py index 8964ba39..4707746e 100644 --- a/azure-devops/azure/devops/released/git/git_client_base.py +++ b/azure-devops/azure/devops/released/git/git_client_base.py @@ -8,7 +8,7 @@ from msrest import Serializer, Deserializer from ...client import Client -from ...v5_0.git import models +from ...v5_1.git import models class GitClientBase(Client): @@ -34,7 +34,7 @@ def get_blob(self, repository_id, sha1, project=None, download=None, file_name=N :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: @@ -52,7 +52,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('GitBlobRef', response) @@ -84,7 +84,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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters, accept_media_type='application/octet-stream') @@ -114,7 +114,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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters, content=content, @@ -152,7 +152,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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters, accept_media_type='application/zip') @@ -168,8 +168,8 @@ def get_branch(self, repository_id, name, project=None, base_version_descriptor= :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: @@ -188,7 +188,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('GitBranchStats', response) @@ -198,7 +198,7 @@ def get_branches(self, repository_id, project=None, base_version_descriptor=None 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 = {} @@ -216,7 +216,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[GitBranchStats]', self._unwrap_collection(response)) @@ -229,7 +229,7 @@ def get_changes(self, commit_id, repository_id, project=None, top=None, skip=Non :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:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -245,7 +245,7 @@ def get_changes(self, commit_id, repository_id, project=None, top=None, skip=Non query_parameters['skip'] = self._serialize.query('skip', skip, 'int') response = self._send(http_method='GET', location_id='5bf884f5-3e07-42e9-afb8-1b872267bf16', - version='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('GitCommitChanges', response) @@ -258,9 +258,9 @@ def get_commit_diffs(self, repository_id, project=None, diff_common_commit=None, :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: @@ -290,7 +290,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('GitCommitDiffs', response) @@ -302,7 +302,7 @@ def get_commit(self, commit_id, repository_id, project=None, change_count=None): :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: @@ -316,7 +316,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('GitCommit', response) @@ -325,7 +325,7 @@ def get_commits(self, repository_id, search_criteria, project=None, skip=None, t """GetCommits. 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: @@ -390,7 +390,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[GitCommitRef]', self._unwrap_collection(response)) @@ -422,7 +422,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[GitCommitRef]', self._unwrap_collection(response)) @@ -430,7 +430,7 @@ def get_push_commits(self, repository_id, push_id, project=None, top=None, skip= 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 + :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. @@ -453,7 +453,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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters, content=content) @@ -468,12 +468,12 @@ def get_item(self, repository_id, path, project=None, scope_path=None, recursion :param str scope_path: The path scope. The default is null. :param str recursion_level: The recursion level of this request. The default is 'none', no 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 lastest changes. 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 null. + :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. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -506,7 +506,7 @@ def get_item(self, repository_id, path, project=None, scope_path=None, recursion query_parameters['resolveLfs'] = self._serialize.query('resolve_lfs', resolve_lfs, 'bool') response = self._send(http_method='GET', location_id='fb93c0db-47ed-4a31-8c20-47552878fb44', - version='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('GitItem', response) @@ -520,9 +520,9 @@ def get_item_content(self, repository_id, path, project=None, scope_path=None, r :param str scope_path: The path scope. The default is null. :param str recursion_level: The recursion level of this request. The default is 'none', no 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 lastest changes. 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 null. + :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. :rtype: object @@ -558,7 +558,7 @@ def get_item_content(self, repository_id, path, project=None, scope_path=None, r query_parameters['resolveLfs'] = self._serialize.query('resolve_lfs', resolve_lfs, 'bool') response = self._send(http_method='GET', location_id='fb93c0db-47ed-4a31-8c20-47552878fb44', - version='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters, accept_media_type='application/octet-stream') @@ -576,10 +576,10 @@ def get_items(self, repository_id, project=None, scope_path=None, recursion_leve :param str scope_path: The path scope. The default is null. :param str recursion_level: The recursion level of this request. The default is 'none', no 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 lastest changes. 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 bool include_links: Set to true to include links to items. Default is false. - :param :class:` ` version_descriptor: Version descriptor. Default is null. + :param :class:` ` version_descriptor: Version descriptor. Default is the default branch for the repository. :rtype: [GitItem] """ route_values = {} @@ -609,7 +609,7 @@ def get_items(self, repository_id, project=None, scope_path=None, recursion_leve query_parameters['versionDescriptor.versionOptions'] = version_descriptor.version_options response = self._send(http_method='GET', location_id='fb93c0db-47ed-4a31-8c20-47552878fb44', - version='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[GitItem]', self._unwrap_collection(response)) @@ -623,9 +623,9 @@ def get_item_text(self, repository_id, path, project=None, scope_path=None, recu :param str scope_path: The path scope. The default is null. :param str recursion_level: The recursion level of this request. The default is 'none', no 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 lastest changes. 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 null. + :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. :rtype: object @@ -661,7 +661,7 @@ def get_item_text(self, repository_id, path, project=None, scope_path=None, recu query_parameters['resolveLfs'] = self._serialize.query('resolve_lfs', resolve_lfs, 'bool') response = self._send(http_method='GET', location_id='fb93c0db-47ed-4a31-8c20-47552878fb44', - version='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters, accept_media_type='text/plain') @@ -680,9 +680,9 @@ def get_item_zip(self, repository_id, path, project=None, scope_path=None, recur :param str scope_path: The path scope. The default is null. :param str recursion_level: The recursion level of this request. The default is 'none', no 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 lastest changes. 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 null. + :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. :rtype: object @@ -718,7 +718,7 @@ def get_item_zip(self, repository_id, path, project=None, scope_path=None, recur query_parameters['resolveLfs'] = self._serialize.query('resolve_lfs', resolve_lfs, 'bool') response = self._send(http_method='GET', location_id='fb93c0db-47ed-4a31-8c20-47552878fb44', - version='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters, accept_media_type='application/zip') @@ -731,7 +731,7 @@ 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. + :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]] @@ -744,18 +744,20 @@ 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='5.0', + version='5.1', route_values=route_values, content=content) return self._deserialize('[[GitItem]]', self._unwrap_collection(response)) - def get_pull_request_iteration_commits(self, repository_id, pull_request_id, iteration_id, project=None): + 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. :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. :param str project: Project ID or project name + :param int top: Maximum number of commits to return. The maximum number of commits that can be returned per batch is 500. + :param int skip: Number of commits to skip. :rtype: [GitCommitRef] """ route_values = {} @@ -767,10 +769,16 @@ def get_pull_request_iteration_commits(self, repository_id, pull_request_id, ite route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') if iteration_id is not None: route_values['iterationId'] = self._serialize.url('iteration_id', iteration_id, 'int') + 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='e7ea0883-095f-4926-b5fb-f24691c26fb9', - version='5.0', - route_values=route_values) + version='5.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): @@ -790,7 +798,7 @@ def get_pull_request_commits(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='52823034-34a8-4576-922c-8d8b77e9e4c4', - version='5.0', + version='5.1', route_values=route_values) return self._deserialize('[GitCommitRef]', self._unwrap_collection(response)) @@ -804,7 +812,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: @@ -824,7 +832,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('GitPullRequestIterationChanges', response) @@ -836,7 +844,7 @@ def get_pull_request_iteration(self, repository_id, pull_request_id, iteration_i :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: @@ -849,7 +857,7 @@ 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='5.0', + version='5.1', route_values=route_values) return self._deserialize('GitPullRequestIteration', response) @@ -874,7 +882,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[GitPullRequestIteration]', self._unwrap_collection(response)) @@ -882,10 +890,10 @@ def get_pull_request_iterations(self, repository_id, pull_request_id, project=No 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. + :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: @@ -895,7 +903,7 @@ 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='5.0', + version='5.1', route_values=route_values, content=content) return self._deserialize('GitPullRequestQuery', response) @@ -903,12 +911,12 @@ def get_pull_request_query(self, queries, repository_id, project=None): 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. + :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: @@ -922,7 +930,7 @@ 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='5.0', + version='5.1', route_values=route_values, content=content) return self._deserialize('IdentityRefWithVote', response) @@ -946,7 +954,7 @@ 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='5.0', + version='5.1', route_values=route_values, content=content) return self._deserialize('[IdentityRefWithVote]', self._unwrap_collection(response)) @@ -970,7 +978,7 @@ 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='5.0', + version='5.1', route_values=route_values) def get_pull_request_reviewer(self, repository_id, pull_request_id, reviewer_id, project=None): @@ -980,7 +988,7 @@ def get_pull_request_reviewer(self, repository_id, pull_request_id, reviewer_id, :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: @@ -993,7 +1001,7 @@ 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='5.0', + version='5.1', route_values=route_values) return self._deserialize('IdentityRefWithVote', response) @@ -1014,7 +1022,7 @@ 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='5.0', + version='5.1', route_values=route_values) return self._deserialize('[IdentityRefWithVote]', self._unwrap_collection(response)) @@ -1036,7 +1044,7 @@ 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='5.0', + version='5.1', route_values=route_values, content=content) @@ -1045,7 +1053,7 @@ def get_pull_request_by_id(self, pull_request_id, project=None): 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: @@ -1054,7 +1062,7 @@ 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='5.0', + version='5.1', route_values=route_values) return self._deserialize('GitPullRequest', response) @@ -1062,7 +1070,7 @@ def get_pull_requests_by_project(self, project, search_criteria, max_comment_len """GetPullRequestsByProject. 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. @@ -1097,7 +1105,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[GitPullRequest]', self._unwrap_collection(response)) @@ -1105,11 +1113,11 @@ def get_pull_requests_by_project(self, project, search_criteria, max_comment_len 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. + :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: @@ -1122,7 +1130,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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters, content=content) @@ -1139,7 +1147,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: @@ -1161,7 +1169,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('GitPullRequest', response) @@ -1170,7 +1178,7 @@ def get_pull_requests(self, repository_id, search_criteria, project=None, max_co """GetPullRequests. 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. @@ -1208,19 +1216,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='5.0', + version='5.1', 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 to update. + 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: The ID of the pull request to retrieve. + :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: @@ -1232,20 +1240,20 @@ 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='5.0', + version='5.1', route_values=route_values, content=content) return self._deserialize('GitPullRequest', response) 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. - :param :class:` ` comment: The comment to create. + 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: @@ -1259,7 +1267,7 @@ 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='5.0', + version='5.1', route_values=route_values, content=content) return self._deserialize('Comment', response) @@ -1286,7 +1294,7 @@ 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='5.0', + version='5.1', route_values=route_values) def get_comment(self, repository_id, pull_request_id, thread_id, comment_id, project=None): @@ -1297,7 +1305,7 @@ def get_comment(self, repository_id, pull_request_id, thread_id, comment_id, pro :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: @@ -1312,7 +1320,7 @@ 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='5.0', + version='5.1', route_values=route_values) return self._deserialize('Comment', response) @@ -1336,20 +1344,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='5.0', + version='5.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. + :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: @@ -1365,7 +1373,7 @@ 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='5.0', + version='5.1', route_values=route_values, content=content) return self._deserialize('Comment', response) @@ -1373,11 +1381,11 @@ def update_comment(self, comment, repository_id, pull_request_id, thread_id, com 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. + :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: @@ -1389,7 +1397,7 @@ 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='5.0', + version='5.1', route_values=route_values, content=content) return self._deserialize('GitPullRequestCommentThread', response) @@ -1403,7 +1411,7 @@ def get_pull_request_thread(self, repository_id, pull_request_id, thread_id, pro :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: @@ -1421,7 +1429,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('GitPullRequestCommentThread', response) @@ -1450,7 +1458,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[GitPullRequestCommentThread]', self._unwrap_collection(response)) @@ -1458,12 +1466,12 @@ def get_threads(self, repository_id, pull_request_id, project=None, iteration=No 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. + :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: @@ -1477,7 +1485,7 @@ 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='5.0', + version='5.1', route_values=route_values, content=content) return self._deserialize('GitPullRequestCommentThread', response) @@ -1499,17 +1507,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='5.0', + version='5.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: + :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: @@ -1519,7 +1527,7 @@ 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='5.0', + version='5.1', route_values=route_values, content=content) return self._deserialize('GitPush', response) @@ -1532,7 +1540,7 @@ def get_push(self, repository_id, push_id, project=None, include_commits=None, i :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: @@ -1548,7 +1556,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('GitPush', response) @@ -1560,7 +1568,7 @@ def get_pushes(self, repository_id, project=None, skip=None, top=None, search_cr :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 = {} @@ -1588,7 +1596,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[GitPush]', self._unwrap_collection(response)) @@ -1629,7 +1637,7 @@ def get_refs(self, repository_id, project=None, filter=None, include_links=None, query_parameters['filterContains'] = self._serialize.query('filter_contains', filter_contains, 'str') response = self._send(http_method='GET', location_id='2d874a60-a811-4f62-9c9f-963a6ea0a55b', - version='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[GitRef]', self._unwrap_collection(response)) @@ -1637,12 +1645,12 @@ def get_refs(self, repository_id, project=None, filter=None, include_links=None, 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 + :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: @@ -1657,7 +1665,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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters, content=content) @@ -1683,7 +1691,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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters, content=content) @@ -1692,10 +1700,10 @@ def update_refs(self, ref_updates, repository_id, project=None, project_id=None) 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 ommitted from gitRepositoryToCreate if the request is project-scoped (i.e., includes project Id). + :param :class:` ` git_repository_to_create: Specify the repo name, team project and/or parent repository. Team project information can be ommitted 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: @@ -1706,7 +1714,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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters, content=content) @@ -1725,7 +1733,7 @@ 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='5.0', + version='5.1', route_values=route_values) def get_repositories(self, project=None, include_links=None, include_all_urls=None, include_hidden=None): @@ -1749,7 +1757,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[GitRepository]', self._unwrap_collection(response)) @@ -1759,7 +1767,7 @@ def get_repository(self, repository_id, project=None): 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: @@ -1768,7 +1776,7 @@ 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='5.0', + version='5.1', route_values=route_values) return self._deserialize('GitRepository', response) @@ -1778,7 +1786,7 @@ def get_repository_with_parent(self, repository_id, include_parent, project=None :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: @@ -1790,7 +1798,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('GitRepository', response) @@ -1798,10 +1806,10 @@ def get_repository_with_parent(self, repository_id, include_parent, project=None 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 + :param :class:` ` new_repository_info: Specify a new repo name or a new default branch of the 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: @@ -1811,7 +1819,7 @@ 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='5.0', + version='5.1', route_values=route_values, content=content) return self._deserialize('GitRepository', response) @@ -1819,11 +1827,11 @@ def update_repository(self, new_repository_info, repository_id, project=None): 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. + :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: @@ -1835,7 +1843,7 @@ 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='5.0', + version='5.1', route_values=route_values, content=content) return self._deserialize('GitStatus', response) @@ -1867,7 +1875,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[GitStatus]', self._unwrap_collection(response)) @@ -1881,7 +1889,7 @@ def get_tree(self, repository_id, sha1, project=None, project_id=None, recursive :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: @@ -1899,7 +1907,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('GitTreeRef', response) @@ -1931,7 +1939,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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters, accept_media_type='application/zip') diff --git a/azure-devops/azure/devops/released/identity/__init__.py b/azure-devops/azure/devops/released/identity/__init__.py index 4f6b82f8..5cedcefb 100644 --- a/azure-devops/azure/devops/released/identity/__init__.py +++ b/azure-devops/azure/devops/released/identity/__init__.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------------------------- -from ...v5_0.identity.models import * +from ...v5_1.identity.models import * from .identity_client import IdentityClient __all__ = [ diff --git a/azure-devops/azure/devops/released/identity/identity_client.py b/azure-devops/azure/devops/released/identity/identity_client.py index 3b07810f..fe0745b1 100644 --- a/azure-devops/azure/devops/released/identity/identity_client.py +++ b/azure-devops/azure/devops/released/identity/identity_client.py @@ -8,7 +8,7 @@ from msrest import Serializer, Deserializer from ...client import Client -from ...v5_0.identity import models +from ...v5_1.identity import models class IdentityClient(Client): @@ -27,13 +27,13 @@ def __init__(self, base_url=None, creds=None): def create_groups(self, container): """CreateGroups. - :param :class:` ` container: + :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='5.0', + version='5.1', content=content) return self._deserialize('[Identity]', self._unwrap_collection(response)) @@ -46,7 +46,7 @@ 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='5.0', + version='5.1', route_values=route_values) def list_groups(self, scope_ids=None, recurse=None, deleted=None, properties=None): @@ -68,7 +68,7 @@ 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='5.0', + version='5.1', query_parameters=query_parameters) return self._deserialize('[Identity]', self._unwrap_collection(response)) @@ -79,7 +79,7 @@ def get_identity_changes(self, identity_sequence_id, group_sequence_id, organiza :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: @@ -94,7 +94,7 @@ 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='5.0', + version='5.1', query_parameters=query_parameters) return self._deserialize('ChangedIdentities', response) @@ -108,15 +108,16 @@ 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='5.0', + version='5.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, search_filter=None, filter_value=None, query_membership=None, properties=None, include_restricted_visibility=None, options=None): + 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. :param str descriptors: :param str identity_ids: :param str subject_descriptors: + :param str social_descriptors: :param str search_filter: :param str filter_value: :param str query_membership: @@ -132,6 +133,8 @@ def read_identities(self, descriptors=None, identity_ids=None, subject_descripto query_parameters['identityIds'] = self._serialize.query('identity_ids', identity_ids, 'str') if subject_descriptors is not None: query_parameters['subjectDescriptors'] = self._serialize.query('subject_descriptors', subject_descriptors, 'str') + if social_descriptors is not None: + query_parameters['socialDescriptors'] = self._serialize.query('social_descriptors', social_descriptors, 'str') if search_filter is not None: query_parameters['searchFilter'] = self._serialize.query('search_filter', search_filter, 'str') if filter_value is not None: @@ -146,7 +149,7 @@ 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='5.0', + version='5.1', query_parameters=query_parameters) return self._deserialize('[Identity]', self._unwrap_collection(response)) @@ -166,7 +169,7 @@ 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='5.0', + version='5.1', query_parameters=query_parameters) return self._deserialize('[Identity]', self._unwrap_collection(response)) @@ -175,7 +178,7 @@ def read_identity(self, identity_id, query_membership=None, properties=None): :param str identity_id: :param str query_membership: :param str properties: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if identity_id is not None: @@ -187,26 +190,26 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('Identity', response) def update_identities(self, identities): """UpdateIdentities. - :param :class:` ` identities: + :param :class:` ` identities: :rtype: [IdentityUpdateData] """ content = self._serialize.body(identities, 'VssJsonCollectionWrapper') response = self._send(http_method='PUT', location_id='28010c54-d0c0-4c89-a5b0-1c9e188b9fb7', - version='5.0', + version='5.1', content=content) return self._deserialize('[IdentityUpdateData]', self._unwrap_collection(response)) def update_identity(self, identity, identity_id): """UpdateIdentity. - :param :class:` ` identity: + :param :class:` ` identity: :param str identity_id: """ route_values = {} @@ -215,19 +218,19 @@ 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='5.0', + version='5.1', route_values=route_values, content=content) def create_identity(self, framework_identity_info): """CreateIdentity. - :param :class:` ` framework_identity_info: - :rtype: :class:` ` + :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='5.0', + version='5.1', content=content) return self._deserialize('Identity', response) @@ -238,16 +241,16 @@ def get_max_sequence_id(self): """ response = self._send(http_method='GET', location_id='e4a70778-cb2c-4e85-b7cc-3f3c7ae2d408', - version='5.0') + version='5.1') return self._deserialize('long', response) def get_self(self): """GetSelf. Read identity of the home tenant request user. - :rtype: :class:` ` + :rtype: :class:` ` """ response = self._send(http_method='GET', location_id='4bb02b5b-c120-4be2-b68e-21f7c50a4b82', - version='5.0') + version='5.1') return self._deserialize('IdentitySelf', response) diff --git a/azure-devops/azure/devops/released/operations/__init__.py b/azure-devops/azure/devops/released/operations/__init__.py index 3080c5c2..3f90db75 100644 --- a/azure-devops/azure/devops/released/operations/__init__.py +++ b/azure-devops/azure/devops/released/operations/__init__.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------------------------- -from ...v5_0.operations.models import * +from ...v5_1.operations.models import * from .operations_client import OperationsClient __all__ = [ diff --git a/azure-devops/azure/devops/released/operations/operations_client.py b/azure-devops/azure/devops/released/operations/operations_client.py index b724eebe..257a8de2 100644 --- a/azure-devops/azure/devops/released/operations/operations_client.py +++ b/azure-devops/azure/devops/released/operations/operations_client.py @@ -8,7 +8,7 @@ from msrest import Serializer, Deserializer from ...client import Client -from ...v5_0.operations import models +from ...v5_1.operations import models class OperationsClient(Client): @@ -30,7 +30,7 @@ def get_operation(self, operation_id, plugin_id=None): Gets an operation from the 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('Operation', response) diff --git a/azure-devops/azure/devops/released/policy/__init__.py b/azure-devops/azure/devops/released/policy/__init__.py index ca1f721b..4e5b9b52 100644 --- a/azure-devops/azure/devops/released/policy/__init__.py +++ b/azure-devops/azure/devops/released/policy/__init__.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------------------------- -from ...v5_0.policy.models import * +from ...v5_1.policy.models import * from .policy_client import PolicyClient __all__ = [ diff --git a/azure-devops/azure/devops/released/policy/policy_client.py b/azure-devops/azure/devops/released/policy/policy_client.py index 72e73b65..e401994f 100644 --- a/azure-devops/azure/devops/released/policy/policy_client.py +++ b/azure-devops/azure/devops/released/policy/policy_client.py @@ -8,7 +8,7 @@ from msrest import Serializer, Deserializer from ...client import Client -from ...v5_0.policy import models +from ...v5_1.policy import models class PolicyClient(Client): @@ -28,10 +28,10 @@ def __init__(self, base_url=None, creds=None): def create_policy_configuration(self, configuration, project, configuration_id=None): """CreatePolicyConfiguration. Create a policy configuration of a given policy type. - :param :class:` ` configuration: The policy configuration to create. + :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: @@ -41,7 +41,7 @@ def create_policy_configuration(self, configuration, project, configuration_id=N content = self._serialize.body(configuration, 'PolicyConfiguration') response = self._send(http_method='POST', location_id='dad91cbe-d183-45f8-9c6e-9c1164472121', - version='5.0', + version='5.1', route_values=route_values, content=content) return self._deserialize('PolicyConfiguration', response) @@ -59,7 +59,7 @@ 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='5.0', + version='5.1', route_values=route_values) def get_policy_configuration(self, project, configuration_id): @@ -67,7 +67,7 @@ def get_policy_configuration(self, project, configuration_id): 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,7 +76,7 @@ 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='5.0', + version='5.1', route_values=route_values) return self._deserialize('PolicyConfiguration', response) @@ -98,7 +98,7 @@ def get_policy_configurations(self, project, scope=None, policy_type=None): 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[PolicyConfiguration]', self._unwrap_collection(response)) @@ -106,10 +106,10 @@ def get_policy_configurations(self, project, scope=None, policy_type=None): 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. + :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: @@ -119,7 +119,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='5.0', + version='5.1', route_values=route_values, content=content) return self._deserialize('PolicyConfiguration', response) @@ -130,7 +130,7 @@ def get_policy_configuration_revision(self, project, configuration_id, revision_ :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: @@ -141,7 +141,7 @@ 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='5.0', + version='5.1', route_values=route_values) return self._deserialize('PolicyConfiguration', response) @@ -166,7 +166,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[PolicyConfiguration]', self._unwrap_collection(response)) @@ -176,7 +176,7 @@ def get_policy_type(self, project, type_id): 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: @@ -185,7 +185,7 @@ 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='5.0', + version='5.1', route_values=route_values) return self._deserialize('PolicyType', response) @@ -200,7 +200,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='5.0', + version='5.1', route_values=route_values) return self._deserialize('[PolicyType]', self._unwrap_collection(response)) diff --git a/azure-devops/azure/devops/released/profile/__init__.py b/azure-devops/azure/devops/released/profile/__init__.py index 3544763e..fc3a3f65 100644 --- a/azure-devops/azure/devops/released/profile/__init__.py +++ b/azure-devops/azure/devops/released/profile/__init__.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------------------------- -from ...v5_0.profile.models import * +from ...v5_1.profile.models import * from .profile_client import ProfileClient __all__ = [ @@ -21,6 +21,5 @@ 'ProfileAttributeBase', 'ProfileRegion', 'ProfileRegions', - 'RemoteProfile', 'ProfileClient' ] diff --git a/azure-devops/azure/devops/released/profile/profile_client.py b/azure-devops/azure/devops/released/profile/profile_client.py index 8f2f1522..40c7e3f0 100644 --- a/azure-devops/azure/devops/released/profile/profile_client.py +++ b/azure-devops/azure/devops/released/profile/profile_client.py @@ -8,7 +8,7 @@ from msrest import Serializer, Deserializer from ...client import Client -from ...v5_0.profile import models +from ...v5_1.profile import models class ProfileClient(Client): @@ -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. - Get my profile. - :param str id: - :param bool details: - :param bool with_attributes: - :param str partition: - :param str core_attributes: - :param bool force_refresh: - :rtype: :class:` ` + 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:` ` """ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('Profile', response) diff --git a/azure-devops/azure/devops/released/release/__init__.py b/azure-devops/azure/devops/released/release/__init__.py index 33764565..24436a3f 100644 --- a/azure-devops/azure/devops/released/release/__init__.py +++ b/azure-devops/azure/devops/released/release/__init__.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------------------------- -from ...v5_0.release.models import * +from ...v5_1.release.models import * from .release_client import ReleaseClient __all__ = [ @@ -23,6 +23,7 @@ 'AutoTriggerIssue', 'BuildVersion', 'Change', + 'ComplianceSettings', 'Condition', 'ConfigurationVariableValue', 'DataSourceBindingBase', diff --git a/azure-devops/azure/devops/released/release/release_client.py b/azure-devops/azure/devops/released/release/release_client.py index 9a4aaaf1..b80f65d6 100644 --- a/azure-devops/azure/devops/released/release/release_client.py +++ b/azure-devops/azure/devops/released/release/release_client.py @@ -8,7 +8,7 @@ from msrest import Serializer, Deserializer from ...client import Client -from ...v5_0.release import models +from ...v5_1.release import models class ReleaseClient(Client): @@ -62,7 +62,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[ReleaseApproval]', self._unwrap_collection(response)) @@ -70,10 +70,10 @@ def get_approvals(self, project, assigned_to_filter=None, status_filter=None, re 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. + :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,7 +83,7 @@ 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='5.0', + version='5.1', route_values=route_values, content=content) return self._deserialize('ReleaseApproval', response) @@ -91,9 +91,9 @@ def update_release_approval(self, approval, project, approval_id): def create_release_definition(self, release_definition, project): """CreateReleaseDefinition. Create a release definition - :param :class:` ` release_definition: release definition object to create. + :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: @@ -101,7 +101,7 @@ 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='5.0', + version='5.1', route_values=route_values, content=content) return self._deserialize('ReleaseDefinition', response) @@ -126,7 +126,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) @@ -136,7 +136,7 @@ def get_release_definition(self, project, definition_id, property_filters=None): :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: @@ -149,12 +149,12 @@ 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='5.0', + version='5.1', 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): + 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. :param str project: Project ID or project name @@ -171,6 +171,7 @@ def get_release_definitions(self, project, search_text=None, expand=None, artifa :param [str] property_filters: A comma-delimited list of extended properties to be retrieved. If set, the returned Release Definitions 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 Definition from results irrespective of whether it has property set or not. :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: [ReleaseDefinition] """ route_values = {} @@ -206,9 +207,11 @@ def get_release_definitions(self, project, search_text=None, expand=None, artifa query_parameters['definitionIdFilter'] = self._serialize.query('definition_id_filter', definition_id_filter, 'str') if is_deleted is not None: query_parameters['isDeleted'] = self._serialize.query('is_deleted', is_deleted, 'bool') + if search_text_contains_folder_name is not None: + 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[ReleaseDefinition]', self._unwrap_collection(response)) @@ -216,9 +219,9 @@ def get_release_definitions(self, project, search_text=None, expand=None, artifa def update_release_definition(self, release_definition, project): """UpdateReleaseDefinition. Update a release definition. - :param :class:` ` release_definition: Release definition object to update. + :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: @@ -226,7 +229,7 @@ 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='5.0', + version='5.1', route_values=route_values, content=content) return self._deserialize('ReleaseDefinition', response) @@ -287,7 +290,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[Deployment]', self._unwrap_collection(response)) @@ -298,7 +301,7 @@ def get_manual_intervention(self, project, release_id, 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: @@ -309,7 +312,7 @@ 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='5.0', + version='5.1', route_values=route_values) return self._deserialize('ManualIntervention', response) @@ -327,18 +330,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='5.0', + version='5.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. + :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: @@ -350,12 +353,12 @@ 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='5.0', + version='5.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): + 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 :param str project: Project ID or project name @@ -379,6 +382,7 @@ def get_releases(self, project=None, definition_id=None, definition_environment_ :param [str] tag_filter: A comma-delimited list of tags. Only releases with these tags will be returned. :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: [Release] """ route_values = {} @@ -428,9 +432,11 @@ def get_releases(self, project=None, definition_id=None, definition_environment_ if release_id_filter is not None: release_id_filter = ",".join(map(str, release_id_filter)) query_parameters['releaseIdFilter'] = self._serialize.query('release_id_filter', release_id_filter, 'str') + if path is not None: + query_parameters['path'] = self._serialize.query('path', path, 'str') response = self._send(http_method='GET', location_id='a166fde7-27ad-408e-ba75-703c2cc9d500', - version='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[Release]', self._unwrap_collection(response)) @@ -438,9 +444,9 @@ def get_releases(self, project=None, definition_id=None, definition_environment_ def create_release(self, release_start_metadata, project): """CreateRelease. Create a release. - :param :class:` ` release_start_metadata: Metadata to 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: @@ -448,7 +454,7 @@ 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='5.0', + version='5.1', route_values=route_values, content=content) return self._deserialize('Release', response) @@ -462,7 +468,7 @@ def get_release(self, project, release_id, approval_filters=None, property_filte :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: @@ -481,7 +487,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('Release', response) @@ -504,7 +510,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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters, accept_media_type='text/plain') @@ -517,10 +523,10 @@ 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. + :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: @@ -530,7 +536,7 @@ 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='5.0', + version='5.1', route_values=route_values, content=content) return self._deserialize('Release', response) @@ -538,10 +544,10 @@ def update_release(self, release, project, release_id): 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. + :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: @@ -551,7 +557,7 @@ 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='5.0', + version='5.1', route_values=route_values, content=content) return self._deserialize('Release', response) diff --git a/azure-devops/azure/devops/released/security/__init__.py b/azure-devops/azure/devops/released/security/__init__.py index 211d1fbc..90e045e2 100644 --- a/azure-devops/azure/devops/released/security/__init__.py +++ b/azure-devops/azure/devops/released/security/__init__.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------------------------- -from ...v5_0.security.models import * +from ...v5_1.security.models import * from .security_client import SecurityClient __all__ = [ diff --git a/azure-devops/azure/devops/released/security/security_client.py b/azure-devops/azure/devops/released/security/security_client.py index 5b3e8782..e380a4ba 100644 --- a/azure-devops/azure/devops/released/security/security_client.py +++ b/azure-devops/azure/devops/released/security/security_client.py @@ -8,7 +8,7 @@ from msrest import Serializer, Deserializer from ...client import Client -from ...v5_0.security import models +from ...v5_1.security import models class SecurityClient(Client): @@ -43,7 +43,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('bool', response) @@ -51,7 +51,7 @@ def remove_access_control_entries(self, security_namespace_id, token=None, descr 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: + :param :class:` ` container: :param str security_namespace_id: Security namespace identifier. :rtype: [AccessControlEntry] """ @@ -61,7 +61,7 @@ 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='5.0', + version='5.1', route_values=route_values, content=content) return self._deserialize('[AccessControlEntry]', self._unwrap_collection(response)) @@ -90,7 +90,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[AccessControlList]', self._unwrap_collection(response)) @@ -113,7 +113,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('bool', response) @@ -121,7 +121,7 @@ def remove_access_control_lists(self, security_namespace_id, tokens=None, recurs 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. + :param :class:` ` access_control_lists: A list of ACLs to create or update. :param str security_namespace_id: Security namespace identifier. """ route_values = {} @@ -130,20 +130,20 @@ 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='5.0', + version='5.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:` ` + :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='5.0', + version='5.1', content=content) return self._deserialize('PermissionEvaluationBatch', response) @@ -171,7 +171,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[bool]', self._unwrap_collection(response)) @@ -183,7 +183,7 @@ def remove_permission(self, security_namespace_id, descriptor, permissions=None, :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,7 +197,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('AccessControlEntry', response) @@ -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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[SecurityNamespaceDescription]', self._unwrap_collection(response)) diff --git a/azure-devops/azure/devops/released/service_hooks/__init__.py b/azure-devops/azure/devops/released/service_hooks/__init__.py index 57497803..043375c0 100644 --- a/azure-devops/azure/devops/released/service_hooks/__init__.py +++ b/azure-devops/azure/devops/released/service_hooks/__init__.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------------------------- -from ...v5_0.service_hooks.models import * +from ...v5_1.service_hooks.models import * from .service_hooks_client import ServiceHooksClient __all__ = [ @@ -39,6 +39,7 @@ 'SessionToken', 'Subscription', 'SubscriptionDiagnostics', + 'SubscriptionInputValuesQuery', 'SubscriptionsQuery', 'SubscriptionTracing', 'UpdateSubscripitonDiagnosticsParameters', diff --git a/azure-devops/azure/devops/released/service_hooks/service_hooks_client.py b/azure-devops/azure/devops/released/service_hooks/service_hooks_client.py index 79fd49d2..b6849b6c 100644 --- a/azure-devops/azure/devops/released/service_hooks/service_hooks_client.py +++ b/azure-devops/azure/devops/released/service_hooks/service_hooks_client.py @@ -8,7 +8,7 @@ from msrest import Serializer, Deserializer from ...client import Client -from ...v5_0.service_hooks import models +from ...v5_1.service_hooks import models class ServiceHooksClient(Client): @@ -31,7 +31,7 @@ def get_consumer_action(self, consumer_id, consumer_action_id, publisher_id=None :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,7 +43,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('ConsumerAction', response) @@ -63,7 +63,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[ConsumerAction]', self._unwrap_collection(response)) @@ -73,7 +73,7 @@ def get_consumer(self, consumer_id, publisher_id=None): 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,7 +83,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('Consumer', response) @@ -99,7 +99,7 @@ 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='5.0', + version='5.1', query_parameters=query_parameters) return self._deserialize('[Consumer]', self._unwrap_collection(response)) @@ -108,7 +108,7 @@ def get_event_type(self, publisher_id, event_type_id): 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: @@ -117,7 +117,7 @@ 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='5.0', + version='5.1', route_values=route_values) return self._deserialize('EventTypeDescriptor', response) @@ -132,7 +132,7 @@ 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='5.0', + version='5.1', route_values=route_values) return self._deserialize('[EventTypeDescriptor]', self._unwrap_collection(response)) @@ -141,7 +141,7 @@ def get_notification(self, subscription_id, notification_id): 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: @@ -150,7 +150,7 @@ 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='5.0', + version='5.1', route_values=route_values) return self._deserialize('Notification', response) @@ -175,7 +175,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[Notification]', self._unwrap_collection(response)) @@ -183,21 +183,21 @@ def get_notifications(self, subscription_id, max_results=None, status=None, resu 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:` ` + :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='5.0', + version='5.1', content=content) return self._deserialize('NotificationsQuery', response) def query_input_values(self, input_values_query, publisher_id): """QueryInputValues. - :param :class:` ` input_values_query: + :param :class:` ` input_values_query: :param str publisher_id: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if publisher_id is not None: @@ -205,7 +205,7 @@ 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='5.0', + version='5.1', route_values=route_values, content=content) return self._deserialize('InputValuesQuery', response) @@ -214,14 +214,14 @@ def get_publisher(self, publisher_id): """GetPublisher. 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='5.0', + version='5.1', route_values=route_values) return self._deserialize('Publisher', response) @@ -232,32 +232,32 @@ def list_publishers(self): """ response = self._send(http_method='GET', location_id='1e83a210-5b53-43bc-90f0-d476a4e5d731', - version='5.0') + version='5.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:` ` + :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='5.0', + version='5.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:` ` + :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='5.0', + version='5.1', content=content) return self._deserialize('Subscription', response) @@ -271,21 +271,21 @@ 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='5.0', + version='5.1', route_values=route_values) def get_subscription(self, subscription_id): """GetSubscription. 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='5.0', + version='5.1', route_values=route_values) return self._deserialize('Subscription', response) @@ -293,7 +293,7 @@ def list_subscriptions(self, publisher_id=None, event_type=None, consumer_id=Non """ListSubscriptions. Get a list of subscriptions. :param str publisher_id: ID for a subscription. - :param str event_type: Maximum number of notifications to return. Default is 100. + :param str event_type: The event type to filter on (if any). :param str consumer_id: ID for a consumer. :param str consumer_action_id: ID for a consumerActionId. :rtype: [Subscription] @@ -309,16 +309,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='5.0', + version='5.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: + :param :class:` ` subscription: :param str subscription_id: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if subscription_id is not None: @@ -326,7 +326,7 @@ 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='5.0', + version='5.1', route_values=route_values, content=content) return self._deserialize('Subscription', response) @@ -334,22 +334,22 @@ def replace_subscription(self, subscription, subscription_id=None): def create_subscriptions_query(self, query): """CreateSubscriptionsQuery. Query for service hook subscriptions. - :param :class:` ` query: - :rtype: :class:` ` + :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='5.0', + version='5.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: + :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: @@ -357,7 +357,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='5.0', + version='5.1', query_parameters=query_parameters, content=content) return self._deserialize('Notification', response) diff --git a/azure-devops/azure/devops/released/task/__init__.py b/azure-devops/azure/devops/released/task/__init__.py index 8408e56d..5c3ad971 100644 --- a/azure-devops/azure/devops/released/task/__init__.py +++ b/azure-devops/azure/devops/released/task/__init__.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------------------------- -from ...v5_0.task.models import * +from ...v5_1.task.models import * from .task_client import TaskClient __all__ = [ @@ -16,6 +16,10 @@ 'PlanEnvironment', 'ProjectReference', 'ReferenceLinks', + 'TaskAgentJob', + 'TaskAgentJobStep', + 'TaskAgentJobTask', + 'TaskAgentJobVariable', 'TaskAttachment', 'TaskLog', 'TaskLogReference', diff --git a/azure-devops/azure/devops/released/task/task_client.py b/azure-devops/azure/devops/released/task/task_client.py index f6380ebe..000ea769 100644 --- a/azure-devops/azure/devops/released/task/task_client.py +++ b/azure-devops/azure/devops/released/task/task_client.py @@ -8,7 +8,7 @@ from msrest import Serializer, Deserializer from ...client import Client -from ...v5_0.task import models +from ...v5_1.task import models class TaskClient(Client): @@ -32,7 +32,7 @@ def append_log_content(self, upload_stream, scope_identifier, hub_name, plan_id, :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:` ` + :rtype: :class:` ` """ route_values = {} if scope_identifier is not None: @@ -50,7 +50,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='5.0', + version='5.1', route_values=route_values, content=content, media_type='application/octet-stream') @@ -58,11 +58,11 @@ def append_log_content(self, upload_stream, scope_identifier, hub_name, plan_id, def create_log(self, log, scope_identifier, hub_name, plan_id): """CreateLog. - :param :class:` ` log: + :param :class:` ` log: :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:` ` + :rtype: :class:` ` """ route_values = {} if scope_identifier is not None: @@ -74,7 +74,7 @@ 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='5.0', + version='5.1', route_values=route_values, content=content) return self._deserialize('TaskLog', response) @@ -105,7 +105,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[str]', self._unwrap_collection(response)) @@ -126,7 +126,7 @@ 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='5.0', + version='5.1', route_values=route_values) return self._deserialize('[TaskLog]', self._unwrap_collection(response)) @@ -153,14 +153,14 @@ 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='5.0', + version='5.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: + :param :class:` ` records: :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: @@ -179,18 +179,18 @@ 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='5.0', + version='5.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: + :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 plan_id: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if scope_identifier is not None: @@ -202,7 +202,7 @@ 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='5.0', + version='5.1', route_values=route_values, content=content) return self._deserialize('Timeline', response) @@ -225,7 +225,7 @@ 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='5.0', + version='5.1', route_values=route_values) def get_timeline(self, scope_identifier, hub_name, plan_id, timeline_id, change_id=None, include_records=None): @@ -236,7 +236,7 @@ def get_timeline(self, scope_identifier, hub_name, plan_id, timeline_id, change_ :param str timeline_id: :param int change_id: :param bool include_records: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if scope_identifier is not None: @@ -254,7 +254,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('Timeline', response) @@ -275,7 +275,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='5.0', + version='5.1', route_values=route_values) return self._deserialize('[Timeline]', self._unwrap_collection(response)) diff --git a/azure-devops/azure/devops/released/task_agent/__init__.py b/azure-devops/azure/devops/released/task_agent/__init__.py index b05dfe7a..3fd6378d 100644 --- a/azure-devops/azure/devops/released/task_agent/__init__.py +++ b/azure-devops/azure/devops/released/task_agent/__init__.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------------------------- -from ...v5_0.task_agent.models import * +from ...v5_1.task_agent.models import * from .task_agent_client import TaskAgentClient __all__ = [ @@ -39,9 +39,12 @@ 'DeploymentTargetUpdateParameter', 'EndpointAuthorization', 'EndpointUrl', - 'Environment', 'EnvironmentCreateParameter', + 'EnvironmentDeploymentExecutionRecord', + 'EnvironmentInstance', 'EnvironmentReference', + 'EnvironmentResource', + 'EnvironmentResourceReference', 'EnvironmentUpdateParameter', 'GraphSubjectBase', 'HelpLink', @@ -52,8 +55,8 @@ 'InputValue', 'InputValues', 'InputValuesError', - 'KubernetesServiceGroup', - 'KubernetesServiceGroupCreateParameters', + 'KubernetesResource', + 'KubernetesResourceCreateParameters', 'MarketplacePurchasedLicense', 'MetricsColumnMetaData', 'MetricsColumnsHeader', @@ -76,8 +79,6 @@ 'ServiceEndpointRequest', 'ServiceEndpointRequestResult', 'ServiceEndpointType', - 'ServiceGroup', - 'ServiceGroupReference', 'TaskAgent', 'TaskAgentAuthorization', 'TaskAgentCloud', @@ -127,5 +128,8 @@ 'VariableGroupParameters', 'VariableGroupProviderData', 'VariableValue', + 'VirtualMachine', + 'VirtualMachineGroup', + 'VirtualMachineGroupCreateParameters', 'TaskAgentClient' ] diff --git a/azure-devops/azure/devops/released/task_agent/task_agent_client.py b/azure-devops/azure/devops/released/task_agent/task_agent_client.py index de626cda..4550fde4 100644 --- a/azure-devops/azure/devops/released/task_agent/task_agent_client.py +++ b/azure-devops/azure/devops/released/task_agent/task_agent_client.py @@ -8,7 +8,7 @@ from msrest import Serializer, Deserializer from ...client import Client -from ...v5_0.task_agent import models +from ...v5_1.task_agent import models class TaskAgentClient(Client): @@ -25,3 +25,270 @@ def __init__(self, base_url=None, creds=None): resource_area_identifier = 'a85b8835-c1a1-4aac-ae97-1c3d0ba72dbd' + 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 + :param int pool_id: The agent pool in which to add the agent + :rtype: :class:` ` + """ + route_values = {} + if pool_id is not None: + route_values['poolId'] = self._serialize.url('pool_id', pool_id, 'int') + content = self._serialize.body(agent, 'TaskAgent') + response = self._send(http_method='POST', + location_id='e298ef32-5878-4cab-993c-043836571f42', + version='5.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. + :param int pool_id: The pool ID to remove the agent from + :param int agent_id: The agent ID to remove + """ + route_values = {} + if pool_id is not None: + route_values['poolId'] = self._serialize.url('pool_id', pool_id, 'int') + if agent_id is not None: + route_values['agentId'] = self._serialize.url('agent_id', agent_id, 'int') + self._send(http_method='DELETE', + location_id='e298ef32-5878-4cab-993c-043836571f42', + version='5.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. + :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:` ` + """ + route_values = {} + if pool_id is not None: + route_values['poolId'] = self._serialize.url('pool_id', pool_id, 'int') + if agent_id is not None: + route_values['agentId'] = self._serialize.url('agent_id', agent_id, 'int') + query_parameters = {} + if include_capabilities is not None: + query_parameters['includeCapabilities'] = self._serialize.query('include_capabilities', include_capabilities, 'bool') + if include_assigned_request is not None: + query_parameters['includeAssignedRequest'] = self._serialize.query('include_assigned_request', include_assigned_request, 'bool') + if include_last_completed_request is not None: + query_parameters['includeLastCompletedRequest'] = self._serialize.query('include_last_completed_request', include_last_completed_request, 'bool') + if property_filters is not None: + property_filters = ",".join(property_filters) + 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='5.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. + :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 + :param bool include_assigned_request: Whether to include details about the agents' 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 + :param [str] demands: Filter by demands the agents can satisfy + :rtype: [TaskAgent] + """ + route_values = {} + if pool_id is not None: + route_values['poolId'] = self._serialize.url('pool_id', pool_id, 'int') + query_parameters = {} + if agent_name is not None: + query_parameters['agentName'] = self._serialize.query('agent_name', agent_name, 'str') + if include_capabilities is not None: + query_parameters['includeCapabilities'] = self._serialize.query('include_capabilities', include_capabilities, 'bool') + if include_assigned_request is not None: + query_parameters['includeAssignedRequest'] = self._serialize.query('include_assigned_request', include_assigned_request, 'bool') + if include_last_completed_request is not None: + query_parameters['includeLastCompletedRequest'] = self._serialize.query('include_last_completed_request', include_last_completed_request, 'bool') + if property_filters is not None: + property_filters = ",".join(property_filters) + query_parameters['propertyFilters'] = self._serialize.query('property_filters', property_filters, 'str') + if demands is not None: + demands = ",".join(demands) + query_parameters['demands'] = self._serialize.query('demands', demands, 'str') + response = self._send(http_method='GET', + location_id='e298ef32-5878-4cab-993c-043836571f42', + version='5.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 + :param int pool_id: The agent pool to use + :param int agent_id: The agent to replace + :rtype: :class:` ` + """ + route_values = {} + if pool_id is not None: + route_values['poolId'] = self._serialize.url('pool_id', pool_id, 'int') + if agent_id is not None: + route_values['agentId'] = self._serialize.url('agent_id', agent_id, 'int') + content = self._serialize.body(agent, 'TaskAgent') + response = self._send(http_method='PUT', + location_id='e298ef32-5878-4cab-993c-043836571f42', + version='5.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 + :param int pool_id: The agent pool to use + :param int agent_id: The agent to update + :rtype: :class:` ` + """ + route_values = {} + if pool_id is not None: + route_values['poolId'] = self._serialize.url('pool_id', pool_id, 'int') + if agent_id is not None: + route_values['agentId'] = self._serialize.url('agent_id', agent_id, 'int') + content = self._serialize.body(agent, 'TaskAgent') + response = self._send(http_method='PATCH', + location_id='e298ef32-5878-4cab-993c-043836571f42', + version='5.1', + route_values=route_values, + content=content) + return self._deserialize('TaskAgent', response) + + def add_agent_pool(self, pool): + """AddAgentPool. + 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='5.1', + content=content) + return self._deserialize('TaskAgentPool', response) + + def delete_agent_pool(self, pool_id): + """DeleteAgentPool. + Delete an agent pool. + :param int pool_id: ID of the agent pool to delete + """ + route_values = {} + if pool_id is not None: + route_values['poolId'] = self._serialize.url('pool_id', pool_id, 'int') + self._send(http_method='DELETE', + location_id='a8c47e17-4d56-4a56-92bb-de7ea7dc65be', + version='5.1', + route_values=route_values) + + def get_agent_pool(self, pool_id, properties=None, action_filter=None): + """GetAgentPool. + 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:` ` + """ + route_values = {} + if pool_id is not None: + route_values['poolId'] = self._serialize.url('pool_id', pool_id, 'int') + query_parameters = {} + if properties is not None: + properties = ",".join(properties) + query_parameters['properties'] = self._serialize.query('properties', properties, 'str') + 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='a8c47e17-4d56-4a56-92bb-de7ea7dc65be', + version='5.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. + :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 + :param str action_filter: Filter by whether the calling user has use or manage permissions + :rtype: [TaskAgentPool] + """ + query_parameters = {} + if pool_name is not None: + query_parameters['poolName'] = self._serialize.query('pool_name', pool_name, 'str') + if properties is not None: + properties = ",".join(properties) + query_parameters['properties'] = self._serialize.query('properties', properties, 'str') + if pool_type is not None: + query_parameters['poolType'] = self._serialize.query('pool_type', pool_type, 'str') + 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='a8c47e17-4d56-4a56-92bb-de7ea7dc65be', + version='5.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. + :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] + """ + query_parameters = {} + if pool_ids is not None: + pool_ids = ",".join(map(str, pool_ids)) + query_parameters['poolIds'] = self._serialize.query('pool_ids', pool_ids, 'str') + 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='a8c47e17-4d56-4a56-92bb-de7ea7dc65be', + version='5.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 + :param int pool_id: The agent pool to update + :rtype: :class:` ` + """ + route_values = {} + if pool_id is not None: + route_values['poolId'] = self._serialize.url('pool_id', pool_id, 'int') + content = self._serialize.body(pool, 'TaskAgentPool') + response = self._send(http_method='PATCH', + location_id='a8c47e17-4d56-4a56-92bb-de7ea7dc65be', + version='5.1', + route_values=route_values, + content=content) + return self._deserialize('TaskAgentPool', response) + + def get_yaml_schema(self): + """GetYamlSchema. + :rtype: object + """ + response = self._send(http_method='GET', + location_id='1f9990b9-1dba-441f-9c2e-6485888c42b6', + version='5.1') + return self._deserialize('object', response) + diff --git a/azure-devops/azure/devops/released/test/__init__.py b/azure-devops/azure/devops/released/test/__init__.py index 5d6f4158..d333f47f 100644 --- a/azure-devops/azure/devops/released/test/__init__.py +++ b/azure-devops/azure/devops/released/test/__init__.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------------------------- -from ...v5_0.test.models import * +from ...v5_1.test.models import * from .test_client import TestClient __all__ = [ @@ -34,11 +34,14 @@ 'FunctionCoverage', 'GraphSubjectBase', 'IdentityRef', + 'JobReference', 'LastResultDetails', 'LinkedWorkItemsQuery', 'LinkedWorkItemsQueryResult', 'ModuleCoverage', 'NameValuePair', + 'PhaseReference', + 'PipelineReference', 'PlanUpdateModel', 'PointAssignment', 'PointsFilter', @@ -53,10 +56,12 @@ 'RunCreateModel', 'RunFilter', 'RunStatistic', + 'RunSummaryModel', 'RunUpdateModel', 'ShallowReference', 'ShallowTestCaseResult', 'SharedStepModel', + 'StageReference', 'SuiteCreateModel', 'SuiteEntry', 'SuiteEntryUpdateModel', @@ -77,6 +82,7 @@ 'TestEnvironment', 'TestFailureDetails', 'TestFailuresAnalysis', + 'TestFlakyIdentifier', 'TestHistoryQuery', 'TestIterationDetailsModel', 'TestMessageLogDetails', @@ -114,6 +120,7 @@ 'TestSuite', 'TestSuiteCloneRequest', 'TestSummaryForWorkItem', + 'TestTag', 'TestToWorkItemLinks', 'TestVariable', 'WorkItemReference', diff --git a/azure-devops/azure/devops/released/test/test_client.py b/azure-devops/azure/devops/released/test/test_client.py index a0d94fc8..5ffde6da 100644 --- a/azure-devops/azure/devops/released/test/test_client.py +++ b/azure-devops/azure/devops/released/test/test_client.py @@ -8,7 +8,7 @@ from msrest import Serializer, Deserializer from ...client import Client -from ...v5_0.test import models +from ...v5_1.test import models class TestClient(Client): @@ -48,7 +48,7 @@ def get_action_results(self, project, run_id, test_case_result_id, iteration_id, route_values['actionPath'] = self._serialize.url('action_path', action_path, 'str') response = self._send(http_method='GET', location_id='eaf40c31-ff84-4062-aafd-d5664be11a37', - version='5.0', + version='5.1', route_values=route_values) return self._deserialize('[TestActionResultModel]', self._unwrap_collection(response)) @@ -60,7 +60,7 @@ def get_test_iteration(self, project, run_id, test_case_result_id, iteration_id, :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: @@ -76,7 +76,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('TestIterationDetailsModel', response) @@ -102,7 +102,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TestIterationDetailsModel]', self._unwrap_collection(response)) @@ -131,116 +131,11 @@ def get_result_parameters(self, project, run_id, test_case_result_id, iteration_ query_parameters['paramName'] = self._serialize.query('param_name', param_name, 'str') response = self._send(http_method='GET', location_id='7c69810d-3354-4af3-844a-180bd25db08a', - version='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TestResultParameterModel]', self._unwrap_collection(response)) - def create_test_plan(self, test_plan, project): - """CreateTestPlan. - Create a test plan. - :param :class:` ` test_plan: A test plan object. - :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_plan, 'PlanUpdateModel') - response = self._send(http_method='POST', - location_id='51712106-7278-4208-8563-1c96f40cf5e4', - version='5.0', - route_values=route_values, - content=content) - return self._deserialize('TestPlan', response) - - def delete_test_plan(self, project, plan_id): - """DeleteTestPlan. - Delete a test plan. - :param str project: Project ID or project name - :param int plan_id: ID of the test plan to be deleted. - """ - route_values = {} - if project is not None: - route_values['project'] = self._serialize.url('project', project, 'str') - if plan_id is not None: - route_values['planId'] = self._serialize.url('plan_id', plan_id, 'int') - self._send(http_method='DELETE', - location_id='51712106-7278-4208-8563-1c96f40cf5e4', - version='5.0', - route_values=route_values) - - def get_plan_by_id(self, project, plan_id): - """GetPlanById. - Get test plan by ID. - :param str project: Project ID or project name - :param int plan_id: ID of the test plan to return. - :rtype: :class:` ` - """ - route_values = {} - if project is not None: - route_values['project'] = self._serialize.url('project', project, 'str') - if plan_id is not None: - route_values['planId'] = self._serialize.url('plan_id', plan_id, 'int') - response = self._send(http_method='GET', - location_id='51712106-7278-4208-8563-1c96f40cf5e4', - version='5.0', - route_values=route_values) - return self._deserialize('TestPlan', response) - - def get_plans(self, project, owner=None, skip=None, top=None, include_plan_details=None, filter_active_plans=None): - """GetPlans. - 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 int skip: Number of test plans to skip. - :param int top: Number of test plans to return. - :param bool include_plan_details: Get all properties of the test plan. - :param bool filter_active_plans: Get just the active plans. - :rtype: [TestPlan] - """ - route_values = {} - if project is not None: - route_values['project'] = self._serialize.url('project', project, 'str') - query_parameters = {} - if owner is not None: - query_parameters['owner'] = self._serialize.query('owner', owner, '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 include_plan_details is not None: - query_parameters['includePlanDetails'] = self._serialize.query('include_plan_details', include_plan_details, 'bool') - if filter_active_plans is not None: - query_parameters['filterActivePlans'] = self._serialize.query('filter_active_plans', filter_active_plans, 'bool') - response = self._send(http_method='GET', - location_id='51712106-7278-4208-8563-1c96f40cf5e4', - version='5.0', - route_values=route_values, - query_parameters=query_parameters) - return self._deserialize('[TestPlan]', self._unwrap_collection(response)) - - def update_test_plan(self, plan_update_model, project, plan_id): - """UpdateTestPlan. - Update a test plan. - :param :class:` ` plan_update_model: - :param str project: Project ID or project name - :param int plan_id: ID of the test plan to be updated. - :rtype: :class:` ` - """ - route_values = {} - if project is not None: - route_values['project'] = self._serialize.url('project', project, 'str') - if plan_id is not None: - route_values['planId'] = self._serialize.url('plan_id', plan_id, 'int') - content = self._serialize.body(plan_update_model, 'PlanUpdateModel') - response = self._send(http_method='PATCH', - location_id='51712106-7278-4208-8563-1c96f40cf5e4', - version='5.0', - route_values=route_values, - content=content) - return self._deserialize('TestPlan', response) - def get_point(self, project, plan_id, suite_id, point_ids, wit_fields=None): """GetPoint. Get a test point. @@ -249,7 +144,7 @@ def get_point(self, project, plan_id, suite_id, point_ids, wit_fields=None): :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: @@ -265,7 +160,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('TestPoint', response) @@ -309,7 +204,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TestPoint]', self._unwrap_collection(response)) @@ -317,7 +212,7 @@ def get_points(self, project, plan_id, suite_id, wit_fields=None, configuration_ 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. + :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. @@ -336,7 +231,7 @@ 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='5.0', + version='5.1', route_values=route_values, content=content) return self._deserialize('[TestPoint]', self._unwrap_collection(response)) @@ -357,7 +252,7 @@ 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='5.0', + version='5.1', route_values=route_values, content=content) return self._deserialize('[TestCaseResult]', self._unwrap_collection(response)) @@ -369,7 +264,7 @@ def get_test_result_by_id(self, project, run_id, test_case_result_id, details_to :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: @@ -383,7 +278,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('TestCaseResult', response) @@ -416,7 +311,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TestCaseResult]', self._unwrap_collection(response)) @@ -437,17 +332,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='5.0', + version='5.1', 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 + 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: @@ -456,16 +351,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='5.0', + version='5.1', 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 + :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: @@ -473,7 +368,7 @@ 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='5.0', + version='5.1', route_values=route_values, content=content) return self._deserialize('TestRun', response) @@ -491,7 +386,7 @@ 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='5.0', + version='5.1', route_values=route_values) def get_test_run_by_id(self, project, run_id, include_details=None): @@ -500,7 +395,7 @@ def get_test_run_by_id(self, project, run_id, include_details=None): :param str project: Project ID or project name :param int run_id: ID of the run to get. :param bool include_details: Defualt value is true. It includes details like run statistics,release,build,Test enviornment,Post process state and more - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -512,7 +407,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('TestRun', response) @@ -553,7 +448,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TestRun]', self._unwrap_collection(response)) @@ -625,7 +520,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TestRun]', self._unwrap_collection(response)) @@ -633,10 +528,10 @@ def query_test_runs(self, project, min_last_updated_date, max_last_updated_date, 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 + :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: @@ -646,7 +541,7 @@ 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='5.0', + version='5.1', route_values=route_values, content=content) return self._deserialize('TestRun', response) @@ -672,7 +567,7 @@ 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='5.0', + version='5.1', route_values=route_values) return self._deserialize('[SuiteTestCase]', self._unwrap_collection(response)) @@ -683,7 +578,7 @@ def get_test_case_by_id(self, project, plan_id, suite_id, test_case_ids): :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: @@ -697,7 +592,7 @@ 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='5.0', + version='5.1', route_values=route_values) return self._deserialize('SuiteTestCase', response) @@ -719,7 +614,7 @@ 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='5.0', + version='5.1', route_values=route_values) return self._deserialize('[SuiteTestCase]', self._unwrap_collection(response)) @@ -743,13 +638,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='5.0', + version='5.1', 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. + :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. @@ -769,148 +664,8 @@ 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='5.0', + version='5.1', route_values=route_values, content=content) return self._deserialize('[SuiteTestCase]', self._unwrap_collection(response)) - def create_test_suite(self, test_suite, project, plan_id, suite_id): - """CreateTestSuite. - Create a test suite. - :param :class:` ` test_suite: Test suite data. - :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 parent suite. - :rtype: [TestSuite] - """ - route_values = {} - if project is not None: - route_values['project'] = self._serialize.url('project', project, 'str') - if plan_id is not None: - route_values['planId'] = self._serialize.url('plan_id', plan_id, 'int') - if suite_id is not None: - route_values['suiteId'] = self._serialize.url('suite_id', suite_id, 'int') - content = self._serialize.body(test_suite, 'SuiteCreateModel') - response = self._send(http_method='POST', - location_id='7b7619a0-cb54-4ab3-bf22-194056f45dd1', - version='5.0', - route_values=route_values, - content=content) - return self._deserialize('[TestSuite]', self._unwrap_collection(response)) - - def delete_test_suite(self, project, plan_id, suite_id): - """DeleteTestSuite. - 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. - """ - route_values = {} - if project is not None: - route_values['project'] = self._serialize.url('project', project, 'str') - if plan_id is not None: - route_values['planId'] = self._serialize.url('plan_id', plan_id, 'int') - if suite_id is not None: - route_values['suiteId'] = self._serialize.url('suite_id', suite_id, 'int') - self._send(http_method='DELETE', - location_id='7b7619a0-cb54-4ab3-bf22-194056f45dd1', - version='5.0', - 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. - :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 int expand: Include the children suites and testers details - :rtype: :class:` ` - """ - route_values = {} - if project is not None: - route_values['project'] = self._serialize.url('project', project, 'str') - if plan_id is not None: - route_values['planId'] = self._serialize.url('plan_id', plan_id, 'int') - if suite_id is not None: - route_values['suiteId'] = self._serialize.url('suite_id', suite_id, 'int') - query_parameters = {} - if expand is not None: - query_parameters['$expand'] = self._serialize.query('expand', expand, 'int') - response = self._send(http_method='GET', - location_id='7b7619a0-cb54-4ab3-bf22-194056f45dd1', - version='5.0', - 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, skip=None, top=None, as_tree_view=None): - """GetTestSuitesForPlan. - 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 int expand: Include the children suites and testers details. - :param int skip: Number of suites to skip from the result. - :param int top: Number of Suites to be return after skipping the suites from the result. - :param bool as_tree_view: If the suites returned should be in a tree structure. - :rtype: [TestSuite] - """ - route_values = {} - if project is not None: - route_values['project'] = self._serialize.url('project', project, 'str') - if plan_id is not None: - route_values['planId'] = self._serialize.url('plan_id', plan_id, 'int') - query_parameters = {} - if expand is not None: - query_parameters['$expand'] = self._serialize.query('expand', expand, 'int') - 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 as_tree_view is not None: - query_parameters['$asTreeView'] = self._serialize.query('as_tree_view', as_tree_view, 'bool') - response = self._send(http_method='GET', - location_id='7b7619a0-cb54-4ab3-bf22-194056f45dd1', - version='5.0', - route_values=route_values, - query_parameters=query_parameters) - return self._deserialize('[TestSuite]', self._unwrap_collection(response)) - - def update_test_suite(self, suite_update_model, project, plan_id, suite_id): - """UpdateTestSuite. - Update a test suite. - :param :class:` ` suite_update_model: Suite Model to update - :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 update. - :rtype: :class:` ` - """ - route_values = {} - if project is not None: - route_values['project'] = self._serialize.url('project', project, 'str') - if plan_id is not None: - route_values['planId'] = self._serialize.url('plan_id', plan_id, 'int') - if suite_id is not None: - route_values['suiteId'] = self._serialize.url('suite_id', suite_id, 'int') - content = self._serialize.body(suite_update_model, 'SuiteUpdateModel') - response = self._send(http_method='PATCH', - location_id='7b7619a0-cb54-4ab3-bf22-194056f45dd1', - version='5.0', - 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. - :param int test_case_id: ID of the test case for which suites need to be fetched. - :rtype: [TestSuite] - """ - query_parameters = {} - if test_case_id is not None: - query_parameters['testCaseId'] = self._serialize.query('test_case_id', test_case_id, 'int') - response = self._send(http_method='GET', - location_id='09a6167b-e969-4775-9247-b94cf3819caf', - version='5.0', - query_parameters=query_parameters) - return self._deserialize('[TestSuite]', self._unwrap_collection(response)) - diff --git a/azure-devops/azure/devops/released/tfvc/__init__.py b/azure-devops/azure/devops/released/tfvc/__init__.py index 8b2df064..34f51057 100644 --- a/azure-devops/azure/devops/released/tfvc/__init__.py +++ b/azure-devops/azure/devops/released/tfvc/__init__.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------------------------- -from ...v5_0.tfvc.models import * +from ...v5_1.tfvc.models import * from .tfvc_client import TfvcClient __all__ = [ diff --git a/azure-devops/azure/devops/released/tfvc/tfvc_client.py b/azure-devops/azure/devops/released/tfvc/tfvc_client.py index 2ac9a132..3751dfbc 100644 --- a/azure-devops/azure/devops/released/tfvc/tfvc_client.py +++ b/azure-devops/azure/devops/released/tfvc/tfvc_client.py @@ -8,7 +8,7 @@ from msrest import Serializer, Deserializer from ...client import Client -from ...v5_0.tfvc import models +from ...v5_1.tfvc import models class TfvcClient(Client): @@ -32,7 +32,7 @@ def get_branch(self, path, project=None, include_parent=None, include_children=N :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,7 +46,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('TfvcBranch', response) @@ -75,7 +75,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TfvcBranch]', self._unwrap_collection(response)) @@ -101,7 +101,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TfvcBranchRef]', self._unwrap_collection(response)) @@ -124,7 +124,7 @@ def get_changeset_changes(self, id=None, skip=None, top=None): query_parameters['$top'] = self._serialize.query('top', top, 'int') response = self._send(http_method='GET', location_id='f32b86f2-15b9-4fe6-81b1-6f8938617ee5', - version='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TfvcChange]', self._unwrap_collection(response)) @@ -132,9 +132,9 @@ def get_changeset_changes(self, id=None, skip=None, top=None): def create_changeset(self, changeset, project=None): """CreateChangeset. Create a new changeset. - :param :class:` ` changeset: + :param :class:` ` changeset: :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -142,7 +142,7 @@ 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='5.0', + version='5.1', route_values=route_values, content=content) return self._deserialize('TfvcChangesetRef', response) @@ -160,8 +160,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: @@ -206,7 +206,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('TfvcChangeset', response) @@ -219,7 +219,7 @@ def get_changesets(self, project=None, max_comment_length=None, skip=None, top=N :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 = {} @@ -255,7 +255,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TfvcChangesetRef]', self._unwrap_collection(response)) @@ -263,13 +263,13 @@ def get_changesets(self, project=None, max_comment_length=None, skip=None, top=N 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. + :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='5.0', + version='5.1', content=content) return self._deserialize('[TfvcChangesetRef]', self._unwrap_collection(response)) @@ -284,14 +284,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='5.0', + version='5.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: + :param :class:` ` item_request_data: :param str project: Project ID or project name :rtype: [[TfvcItem]] """ @@ -301,7 +301,7 @@ 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='5.0', + version='5.1', route_values=route_values, content=content) return self._deserialize('[[TfvcItem]]', self._unwrap_collection(response)) @@ -309,7 +309,7 @@ def get_items_batch(self, item_request_data, project=None): 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: + :param :class:` ` item_request_data: :param str project: Project ID or project name :rtype: object """ @@ -319,7 +319,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='5.0', + version='5.1', route_values=route_values, content=content, accept_media_type='application/zip') @@ -338,9 +338,9 @@ def get_item(self, path, project=None, file_name=None, download=None, scope_path :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: @@ -367,7 +367,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('TfvcItem', response) @@ -381,7 +381,7 @@ def get_item_content(self, path, project=None, file_name=None, download=None, sc :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 """ @@ -410,7 +410,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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters, accept_media_type='application/octet-stream') @@ -427,7 +427,7 @@ def get_items(self, project=None, scope_path=None, recursion_level=None, include :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 = {} @@ -449,7 +449,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TfvcItem]', self._unwrap_collection(response)) @@ -463,7 +463,7 @@ def get_item_text(self, path, project=None, file_name=None, download=None, scope :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 """ @@ -492,7 +492,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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters, accept_media_type='text/plain') @@ -511,7 +511,7 @@ def get_item_zip(self, path, project=None, file_name=None, download=None, scope_ :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 """ @@ -540,7 +540,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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters, accept_media_type='application/zip') @@ -568,7 +568,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TfvcItem]', self._unwrap_collection(response)) @@ -577,9 +577,9 @@ def get_label(self, label_id, request_data, project=None): """GetLabel. 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: @@ -602,7 +602,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('TfvcLabel', response) @@ -610,7 +610,7 @@ def get_label(self, label_id, request_data, project=None): 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 + :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 :param int skip: Number of labels to skip @@ -639,7 +639,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TfvcLabelRef]', self._unwrap_collection(response)) @@ -661,7 +661,7 @@ 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='5.0', + version='5.1', query_parameters=query_parameters) return self._deserialize('[TfvcChange]', self._unwrap_collection(response)) @@ -669,8 +669,8 @@ def get_shelveset(self, shelveset_id, request_data=None): """GetShelveset. 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: @@ -692,14 +692,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='5.0', + version='5.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 + :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] @@ -726,7 +726,7 @@ 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='5.0', + version='5.1', query_parameters=query_parameters) return self._deserialize('[TfvcShelvesetRef]', self._unwrap_collection(response)) @@ -741,7 +741,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='5.0', + version='5.1', query_parameters=query_parameters) return self._deserialize('[AssociatedWorkItem]', self._unwrap_collection(response)) diff --git a/azure-devops/azure/devops/released/wiki/__init__.py b/azure-devops/azure/devops/released/wiki/__init__.py index 349b1020..c75bf8e3 100644 --- a/azure-devops/azure/devops/released/wiki/__init__.py +++ b/azure-devops/azure/devops/released/wiki/__init__.py @@ -6,13 +6,16 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------------------------- -from ...v5_0.wiki.models import * +from ...v5_1.wiki.models import * from .wiki_client import WikiClient __all__ = [ 'GitRepository', 'GitRepositoryRef', 'GitVersionDescriptor', + 'ReferenceLinks', + 'TeamProjectCollectionReference', + 'TeamProjectReference', 'WikiAttachment', 'WikiAttachmentResponse', 'WikiCreateBaseParameters', diff --git a/azure-devops/azure/devops/released/wiki/wiki_client.py b/azure-devops/azure/devops/released/wiki/wiki_client.py index 362c794e..92cf8916 100644 --- a/azure-devops/azure/devops/released/wiki/wiki_client.py +++ b/azure-devops/azure/devops/released/wiki/wiki_client.py @@ -8,7 +8,7 @@ from msrest import Serializer, Deserializer from ...client import Client -from ...v5_0.wiki import models +from ...v5_1.wiki import models class WikiClient(Client): @@ -25,14 +25,15 @@ def __init__(self, base_url=None, creds=None): resource_area_identifier = 'bf7d82a0-8aa5-4613-94ef-6172a5ea01f3' - def create_attachment(self, upload_stream, project, wiki_identifier, name, **kwargs): + def create_attachment(self, upload_stream, project, wiki_identifier, name, version_descriptor=None, **kwargs): """CreateAttachment. 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 name. :param str name: Wiki attachment name. - :rtype: :class:` ` + :param :class:` ` version_descriptor: GitVersionDescriptor for the page. (Optional in case of ProjectWiki). + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -42,6 +43,13 @@ def create_attachment(self, upload_stream, project, wiki_identifier, name, **kwa query_parameters = {} if name is not None: query_parameters['name'] = self._serialize.query('name', name, 'str') + if version_descriptor is not None: + if version_descriptor.version_type is not None: + query_parameters['versionDescriptor.versionType'] = version_descriptor.version_type + if version_descriptor.version is not None: + query_parameters['versionDescriptor.version'] = version_descriptor.version + if version_descriptor.version_options is not None: + query_parameters['versionDescriptor.versionOptions'] = version_descriptor.version_options if "callback" in kwargs: callback = kwargs["callback"] else: @@ -49,7 +57,7 @@ def create_attachment(self, upload_stream, project, wiki_identifier, name, **kwa content = self._client.stream_upload(upload_stream, callback=callback) response = self._send(http_method='PUT', location_id='c4382d8d-fefc-40e0-92c5-49852e9e17c0', - version='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters, content=content, @@ -59,14 +67,15 @@ def create_attachment(self, upload_stream, project, wiki_identifier, name, **kwa response_object.eTag = response.headers.get('ETag') return response_object - def create_page_move(self, page_move_parameters, project, wiki_identifier, comment=None): + 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. + :param :class:` ` page_move_parameters: Page more operation parameters. :param str project: Project ID or project name :param str wiki_identifier: Wiki Id or name. :param str comment: Comment that is to be associated with this page move. - :rtype: :class:` ` + :param :class:` ` version_descriptor: GitVersionDescriptor for the page. (Optional in case of ProjectWiki). + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -76,10 +85,17 @@ def create_page_move(self, page_move_parameters, project, wiki_identifier, comme query_parameters = {} if comment is not None: query_parameters['comment'] = self._serialize.query('comment', comment, 'str') + if version_descriptor is not None: + if version_descriptor.version_type is not None: + query_parameters['versionDescriptor.versionType'] = version_descriptor.version_type + if version_descriptor.version is not None: + query_parameters['versionDescriptor.version'] = version_descriptor.version + if version_descriptor.version_options is not None: + query_parameters['versionDescriptor.versionOptions'] = version_descriptor.version_options content = self._serialize.body(page_move_parameters, 'WikiPageMoveParameters') response = self._send(http_method='POST', location_id='e37bbe71-cbae-49e5-9a4e-949143b9d910', - version='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters, content=content) @@ -88,16 +104,17 @@ def create_page_move(self, page_move_parameters, project, wiki_identifier, comme response_object.eTag = response.headers.get('ETag') return response_object - def create_or_update_page(self, parameters, project, wiki_identifier, path, version, comment=None): + 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. + :param :class:` ` parameters: Wiki create or update operation parameters. :param str project: Project ID or project name :param str wiki_identifier: Wiki Id or 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. - :rtype: :class:` ` + :param :class:` ` version_descriptor: GitVersionDescriptor for the page. (Optional in case of ProjectWiki). + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -109,13 +126,20 @@ def create_or_update_page(self, parameters, project, wiki_identifier, path, vers query_parameters['path'] = self._serialize.query('path', path, 'str') if comment is not None: query_parameters['comment'] = self._serialize.query('comment', comment, 'str') + if version_descriptor is not None: + if version_descriptor.version_type is not None: + query_parameters['versionDescriptor.versionType'] = version_descriptor.version_type + if version_descriptor.version is not None: + query_parameters['versionDescriptor.version'] = version_descriptor.version + if version_descriptor.version_options is not None: + query_parameters['versionDescriptor.versionOptions'] = version_descriptor.version_options additional_headers = {} if version is not None: additional_headers['If-Match'] = version content = self._serialize.body(parameters, 'WikiPageCreateOrUpdateParameters') response = self._send(http_method='PUT', location_id='25d3fbc7-fe3d-46cb-b5a5-0b6f79caf27b', - version='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters, additional_headers=additional_headers, @@ -125,14 +149,15 @@ def create_or_update_page(self, parameters, project, wiki_identifier, path, vers response_object.eTag = response.headers.get('ETag') return response_object - def delete_page(self, project, wiki_identifier, path, comment=None): + def delete_page(self, project, wiki_identifier, path, comment=None, version_descriptor=None): """DeletePage. Deletes a wiki page. :param str project: Project ID or project name :param str wiki_identifier: Wiki Id or name. :param str path: Wiki page path. :param str comment: Comment to be associated with this page delete. - :rtype: :class:` ` + :param :class:` ` version_descriptor: GitVersionDescriptor for the page. (Optional in case of ProjectWiki). + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -144,9 +169,16 @@ def delete_page(self, project, wiki_identifier, path, comment=None): query_parameters['path'] = self._serialize.query('path', path, 'str') if comment is not None: query_parameters['comment'] = self._serialize.query('comment', comment, 'str') + if version_descriptor is not None: + if version_descriptor.version_type is not None: + query_parameters['versionDescriptor.versionType'] = version_descriptor.version_type + if version_descriptor.version is not None: + query_parameters['versionDescriptor.version'] = version_descriptor.version + if version_descriptor.version_options is not None: + query_parameters['versionDescriptor.versionOptions'] = version_descriptor.version_options response = self._send(http_method='DELETE', location_id='25d3fbc7-fe3d-46cb-b5a5-0b6f79caf27b', - version='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) response_object = models.WikiPageResponse() @@ -161,9 +193,9 @@ def get_page(self, project, wiki_identifier, path=None, recursion_level=None, ve :param str wiki_identifier: Wiki Id or 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: @@ -186,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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) response_object = models.WikiPageResponse() @@ -201,7 +233,7 @@ def get_page_text(self, project, wiki_identifier, path=None, recursion_level=Non :param str wiki_identifier: Wiki Id or 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 """ @@ -226,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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters, accept_media_type='text/plain') @@ -243,7 +275,7 @@ def get_page_zip(self, project, wiki_identifier, path=None, recursion_level=None :param str wiki_identifier: Wiki Id or 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 """ @@ -268,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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters, accept_media_type='application/zip') @@ -281,9 +313,9 @@ def get_page_zip(self, project, wiki_identifier, path=None, recursion_level=None def create_wiki(self, wiki_create_params, project=None): """CreateWiki. Creates the wiki resource. - :param :class:` ` wiki_create_params: Parameters for the wiki creation. + :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: @@ -291,7 +323,7 @@ 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='5.0', + version='5.1', route_values=route_values, content=content) return self._deserialize('WikiV2', response) @@ -301,7 +333,7 @@ def delete_wiki(self, wiki_identifier, project=None): Deletes the wiki corresponding to the wiki name or Id provided. :param str wiki_identifier: Wiki name or Id. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -310,7 +342,7 @@ 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='5.0', + version='5.1', route_values=route_values) return self._deserialize('WikiV2', response) @@ -325,7 +357,7 @@ 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='5.0', + version='5.1', route_values=route_values) return self._deserialize('[WikiV2]', self._unwrap_collection(response)) @@ -334,7 +366,7 @@ def get_wiki(self, wiki_identifier, project=None): Gets the wiki corresponding to the wiki name or Id provided. :param str wiki_identifier: Wiki name or id. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -343,17 +375,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='5.0', + version='5.1', 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 name provided using the update parameters. - :param :class:` ` update_parameters: Update parameters. + :param :class:` ` update_parameters: Update parameters. :param str wiki_identifier: Wiki name or Id. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -363,7 +395,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='5.0', + version='5.1', route_values=route_values, content=content) return self._deserialize('WikiV2', response) diff --git a/azure-devops/azure/devops/released/work/__init__.py b/azure-devops/azure/devops/released/work/__init__.py index bd04549f..80fb2ca9 100644 --- a/azure-devops/azure/devops/released/work/__init__.py +++ b/azure-devops/azure/devops/released/work/__init__.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------------------------- -from ...v5_0.work.models import * +from ...v5_1.work.models import * from .work_client import WorkClient __all__ = [ @@ -18,6 +18,7 @@ 'BacklogLevelConfiguration', 'BacklogLevelWorkItems', 'Board', + 'BoardBadge', 'BoardCardRuleSettings', 'BoardCardSettings', 'BoardChart', @@ -28,6 +29,7 @@ 'BoardRow', 'BoardSuggestedValue', 'BoardUserSettings', + 'CapacityContractBase', 'CapacityPatch', 'CategoryConfiguration', 'CreatePlan', @@ -46,6 +48,8 @@ 'PredefinedQuery', 'ProcessConfiguration', 'ReferenceLinks', + 'ReorderOperation', + 'ReorderResult', 'Rule', 'TeamContext', 'TeamFieldValue', @@ -53,6 +57,7 @@ 'TeamFieldValuesPatch', 'TeamIterationAttributes', 'TeamMemberCapacity', + 'TeamMemberCapacityIdentityRef', 'TeamSetting', 'TeamSettingsDataContractBase', 'TeamSettingsDaysOff', @@ -67,6 +72,7 @@ 'UpdatePlan', 'WorkItem', 'WorkItemColor', + 'WorkItemCommentVersionRef', 'WorkItemFieldReference', 'WorkItemLink', 'WorkItemReference', diff --git a/azure-devops/azure/devops/released/work/work_client.py b/azure-devops/azure/devops/released/work/work_client.py index 8689c6a8..bf8bc7af 100644 --- a/azure-devops/azure/devops/released/work/work_client.py +++ b/azure-devops/azure/devops/released/work/work_client.py @@ -8,7 +8,7 @@ from msrest import Serializer, Deserializer from ...client import Client -from ...v5_0.work import models +from ...v5_1.work import models class WorkClient(Client): @@ -28,8 +28,8 @@ 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:` ` + :param :class:` ` team_context: The team context for the operation + :rtype: :class:` ` """ project = None team = None @@ -50,7 +50,7 @@ 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='5.0', + version='5.1', route_values=route_values) return self._deserialize('BacklogConfiguration', response) @@ -65,7 +65,7 @@ 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='5.0', + version='5.1', route_values=route_values) return self._deserialize('[BoardSuggestedValue]', self._unwrap_collection(response)) @@ -80,16 +80,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='5.0', + version='5.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 + :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 @@ -112,14 +112,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='5.0', + version='5.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 + :param :class:` ` team_context: The team context for the operation :rtype: [BoardReference] """ project = None @@ -141,7 +141,7 @@ 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='5.0', + version='5.1', route_values=route_values) return self._deserialize('[BoardReference]', self._unwrap_collection(response)) @@ -149,7 +149,7 @@ def set_board_options(self, options, team_context, id): """SetBoardOptions. 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} """ @@ -175,17 +175,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='5.0', + version='5.1', route_values=route_values, content=content) return self._deserialize('{str}', self._unwrap_collection(response)) - def get_capacities(self, team_context, iteration_id): - """GetCapacities. + def get_capacities_with_identity_ref(self, team_context, iteration_id): + """GetCapacitiesWithIdentityRef. Get a team's capacity - :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: [TeamMemberCapacity] + :rtype: [TeamMemberCapacityIdentityRef] """ project = None team = None @@ -208,17 +208,17 @@ def get_capacities(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='5.0', + version='5.1', route_values=route_values) - return self._deserialize('[TeamMemberCapacity]', self._unwrap_collection(response)) + return self._deserialize('[TeamMemberCapacityIdentityRef]', self._unwrap_collection(response)) - def get_capacity(self, team_context, iteration_id, team_member_id): - """GetCapacity. + 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 + :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 @@ -243,17 +243,17 @@ def get_capacity(self, team_context, iteration_id, team_member_id): 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='5.0', + version='5.1', route_values=route_values) - return self._deserialize('TeamMemberCapacity', response) + return self._deserialize('TeamMemberCapacityIdentityRef', response) - def replace_capacities(self, capacities, team_context, iteration_id): - """ReplaceCapacities. + def replace_capacities_with_identity_ref(self, capacities, team_context, iteration_id): + """ReplaceCapacitiesWithIdentityRef. Replace a team's capacity - :param [TeamMemberCapacity] capacities: Team capacity to replace - :param :class:` ` team_context: The team context for the operation + :param [TeamMemberCapacityIdentityRef] capacities: Team capacity to replace + :param :class:` ` team_context: The team context for the operation :param str iteration_id: ID of the iteration - :rtype: [TeamMemberCapacity] + :rtype: [TeamMemberCapacityIdentityRef] """ project = None team = None @@ -274,22 +274,22 @@ def replace_capacities(self, capacities, team_context, iteration_id): route_values['team'] = self._serialize.url('team', team, 'string') if iteration_id is not None: route_values['iterationId'] = self._serialize.url('iteration_id', iteration_id, 'str') - content = self._serialize.body(capacities, '[TeamMemberCapacity]') + content = self._serialize.body(capacities, '[TeamMemberCapacityIdentityRef]') response = self._send(http_method='PUT', location_id='74412d15-8c1a-4352-a48d-ef1ed5587d57', - version='5.0', + version='5.1', route_values=route_values, content=content) - return self._deserialize('[TeamMemberCapacity]', self._unwrap_collection(response)) + return self._deserialize('[TeamMemberCapacityIdentityRef]', self._unwrap_collection(response)) - def update_capacity(self, patch, team_context, iteration_id, team_member_id): - """UpdateCapacity. + 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 + :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 @@ -315,17 +315,17 @@ def update_capacity(self, patch, team_context, iteration_id, team_member_id): content = self._serialize.body(patch, 'CapacityPatch') response = self._send(http_method='PATCH', location_id='74412d15-8c1a-4352-a48d-ef1ed5587d57', - version='5.0', + version='5.1', route_values=route_values, content=content) - return self._deserialize('TeamMemberCapacity', response) + 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 + :param :class:` ` team_context: The team context for the operation :param str board: - :rtype: :class:` ` + :rtype: :class:` ` """ project = None team = None @@ -348,17 +348,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='5.0', + version='5.1', 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 + :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 @@ -382,7 +382,7 @@ 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='5.0', + version='5.1', route_values=route_values, content=content) return self._deserialize('BoardCardRuleSettings', response) @@ -390,9 +390,9 @@ def update_board_card_rule_settings(self, board_card_rule_settings, team_context 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 + :param :class:` ` team_context: The team context for the operation :param str board: - :rtype: :class:` ` + :rtype: :class:` ` """ project = None team = None @@ -415,17 +415,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='5.0', + version='5.1', 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 + :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 @@ -449,7 +449,7 @@ 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='5.0', + version='5.1', route_values=route_values, content=content) return self._deserialize('BoardCardSettings', response) @@ -457,10 +457,10 @@ def update_board_card_settings(self, board_card_settings_to_save, team_context, def get_board_chart(self, team_context, board, name): """GetBoardChart. Get a board chart - :param :class:` ` team_context: The team context for the operation + :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 @@ -485,14 +485,14 @@ def get_board_chart(self, team_context, board, name): route_values['name'] = self._serialize.url('name', name, 'str') response = self._send(http_method='GET', location_id='45fe888c-239e-49fd-958c-df1a1ab21d97', - version='5.0', + version='5.1', route_values=route_values) 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 :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] """ @@ -517,18 +517,18 @@ def get_board_charts(self, team_context, board): route_values['board'] = self._serialize.url('board', board, 'str') response = self._send(http_method='GET', location_id='45fe888c-239e-49fd-958c-df1a1ab21d97', - version='5.0', + version='5.1', route_values=route_values) return self._deserialize('[BoardChartReference]', 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 :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 @@ -554,7 +554,7 @@ def update_board_chart(self, chart, team_context, board, name): content = self._serialize.body(chart, 'BoardChart') response = self._send(http_method='PATCH', location_id='45fe888c-239e-49fd-958c-df1a1ab21d97', - version='5.0', + version='5.1', route_values=route_values, content=content) return self._deserialize('BoardChart', response) @@ -562,7 +562,7 @@ def update_board_chart(self, chart, team_context, board, name): 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 :class:` ` team_context: The team context for the operation :param str board: Name or ID of the specific board :rtype: [BoardColumn] """ @@ -587,7 +587,7 @@ def get_board_columns(self, team_context, board): route_values['board'] = self._serialize.url('board', board, 'str') response = self._send(http_method='GET', location_id='c555d7ff-84e1-47df-9923-a3fe0cd8751b', - version='5.0', + version='5.1', route_values=route_values) return self._deserialize('[BoardColumn]', self._unwrap_collection(response)) @@ -595,7 +595,7 @@ 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 :class:` ` team_context: The team context for the operation :param str board: Name or ID of the specific board :rtype: [BoardColumn] """ @@ -621,7 +621,7 @@ def update_board_columns(self, board_columns, team_context, board): content = self._serialize.body(board_columns, '[BoardColumn]') response = self._send(http_method='PUT', location_id='c555d7ff-84e1-47df-9923-a3fe0cd8751b', - version='5.0', + version='5.1', route_values=route_values, content=content) return self._deserialize('[BoardColumn]', self._unwrap_collection(response)) @@ -634,7 +634,7 @@ def get_delivery_timeline_data(self, project, id, revision=None, start_date=None :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:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -650,7 +650,7 @@ def get_delivery_timeline_data(self, project, id, revision=None, start_date=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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('DeliveryViewData', response) @@ -658,7 +658,7 @@ def get_delivery_timeline_data(self, project, id, revision=None, start_date=None 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 + :param :class:` ` team_context: The team context for the operation :param str id: ID of the iteration """ project = None @@ -682,15 +682,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='5.0', + version='5.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 + :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 @@ -713,14 +713,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='5.0', + version='5.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 + :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] """ @@ -746,7 +746,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TeamSettingsIteration]', self._unwrap_collection(response)) @@ -754,9 +754,9 @@ def get_team_iterations(self, team_context, timeframe=None): 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:` ` + :param :class:` ` iteration: Iteration to add + :param :class:` ` team_context: The team context for the operation + :rtype: :class:` ` """ project = None team = None @@ -778,7 +778,7 @@ 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='5.0', + version='5.1', route_values=route_values, content=content) return self._deserialize('TeamSettingsIteration', response) @@ -786,9 +786,9 @@ def post_team_iteration(self, iteration, team_context): def create_plan(self, posted_plan, project): """CreatePlan. Add a new plan for the team - :param :class:` ` posted_plan: Plan definition + :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: @@ -796,7 +796,7 @@ 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='5.0', + version='5.1', route_values=route_values, content=content) return self._deserialize('Plan', response) @@ -814,7 +814,7 @@ 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='5.0', + version='5.1', route_values=route_values) def get_plan(self, project, id): @@ -822,7 +822,7 @@ def get_plan(self, project, id): 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: @@ -831,7 +831,7 @@ 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='5.0', + version='5.1', route_values=route_values) return self._deserialize('Plan', response) @@ -846,17 +846,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='5.0', + version='5.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 + :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: @@ -866,7 +866,7 @@ 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='5.0', + version='5.1', route_values=route_values, content=content) return self._deserialize('Plan', response) @@ -874,7 +874,7 @@ def update_plan(self, updated_plan, project, id): def get_board_rows(self, team_context, board): """GetBoardRows. Get rows on a board - :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] """ @@ -899,7 +899,7 @@ 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='5.0', + version='5.1', route_values=route_values) return self._deserialize('[BoardRow]', self._unwrap_collection(response)) @@ -907,7 +907,7 @@ def update_board_rows(self, board_rows, team_context, board): """UpdateBoardRows. 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] """ @@ -933,7 +933,7 @@ 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='5.0', + version='5.1', route_values=route_values, content=content) return self._deserialize('[BoardRow]', self._unwrap_collection(response)) @@ -941,9 +941,9 @@ def update_board_rows(self, board_rows, team_context, board): 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 + :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 @@ -966,17 +966,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='5.0', + version='5.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 containting a list of start and end dates - :param :class:` ` team_context: The team context for the operation + :param :class:` ` days_off_patch: Team's days off patch containting 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 @@ -1000,7 +1000,7 @@ 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='5.0', + version='5.1', route_values=route_values, content=content) return self._deserialize('TeamSettingsDaysOff', response) @@ -1008,8 +1008,8 @@ def update_team_days_off(self, days_off_patch, team_context, iteration_id): 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:` ` + :param :class:` ` team_context: The team context for the operation + :rtype: :class:` ` """ project = None team = None @@ -1030,16 +1030,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='5.0', + version='5.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:` ` + :param :class:` ` patch: + :param :class:` ` team_context: The team context for the operation + :rtype: :class:` ` """ project = None team = None @@ -1061,7 +1061,7 @@ 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='5.0', + version='5.1', route_values=route_values, content=content) return self._deserialize('TeamFieldValues', response) @@ -1069,8 +1069,8 @@ def update_team_field_values(self, patch, team_context): 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:` ` + :param :class:` ` team_context: The team context for the operation + :rtype: :class:` ` """ project = None team = None @@ -1091,16 +1091,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='5.0', + version='5.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:` ` + :param :class:` ` team_settings_patch: TeamSettings changes + :param :class:` ` team_context: The team context for the operation + :rtype: :class:` ` """ project = None team = None @@ -1122,7 +1122,7 @@ 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='5.0', + version='5.1', route_values=route_values, content=content) return self._deserialize('TeamSetting', response) diff --git a/azure-devops/azure/devops/released/work_item_tracking/__init__.py b/azure-devops/azure/devops/released/work_item_tracking/__init__.py index af4ddce9..40999905 100644 --- a/azure-devops/azure/devops/released/work_item_tracking/__init__.py +++ b/azure-devops/azure/devops/released/work_item_tracking/__init__.py @@ -6,17 +6,26 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------------------------- -from ...v5_0.work_item_tracking.models import * +from ...v5_1.work_item_tracking.models import * from .work_item_tracking_client import WorkItemTrackingClient __all__ = [ 'AccountMyWorkResult', 'AccountRecentActivityWorkItemModel', + 'AccountRecentActivityWorkItemModel2', + 'AccountRecentActivityWorkItemModelBase', 'AccountRecentMentionWorkItemModel', 'AccountWorkWorkItemModel', 'ArtifactUriQuery', 'ArtifactUriQueryResult', 'AttachmentReference', + 'Comment', + 'CommentCreate', + 'CommentList', + 'CommentMention', + 'CommentReaction', + 'CommentUpdate', + 'CommentVersion', 'FieldDependentRule', 'FieldsToEvaluate', 'GraphSubjectBase', @@ -42,6 +51,7 @@ 'WorkItemClassificationNode', 'WorkItemComment', 'WorkItemComments', + 'WorkItemCommentVersionRef', 'WorkItemDelete', 'WorkItemDeleteReference', 'WorkItemDeleteShallowReference', diff --git a/azure-devops/azure/devops/released/work_item_tracking/work_item_tracking_client.py b/azure-devops/azure/devops/released/work_item_tracking/work_item_tracking_client.py index 0a41a728..8e2675ce 100644 --- a/azure-devops/azure/devops/released/work_item_tracking/work_item_tracking_client.py +++ b/azure-devops/azure/devops/released/work_item_tracking/work_item_tracking_client.py @@ -8,7 +8,7 @@ from msrest import Serializer, Deserializer from ...client import Client -from ...v5_0.work_item_tracking import models +from ...v5_1.work_item_tracking import models class WorkItemTrackingClient(Client): @@ -33,7 +33,7 @@ def create_attachment(self, upload_stream, project=None, file_name=None, upload_ :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: @@ -52,7 +52,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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters, content=content, @@ -80,7 +80,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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters, accept_media_type='application/octet-stream') @@ -111,7 +111,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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters, accept_media_type='application/zip') @@ -125,7 +125,7 @@ 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. :param str project: Project ID or project name - :param [int] ids: Comma seperated integer classification nodes ids. It's not required, if you want root nodes. + :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. :param str error_policy: Flag to handle errors in getting some nodes. Possible options are Fail and Omit. :rtype: [WorkItemClassificationNode] @@ -143,7 +143,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[WorkItemClassificationNode]', self._unwrap_collection(response)) @@ -163,7 +163,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[WorkItemClassificationNode]', self._unwrap_collection(response)) @@ -171,11 +171,11 @@ def get_root_nodes(self, project, depth=None): 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. + :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: @@ -187,7 +187,7 @@ 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='5.0', + version='5.1', route_values=route_values, content=content) return self._deserialize('WorkItemClassificationNode', response) @@ -212,7 +212,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) @@ -223,7 +223,7 @@ def get_classification_node(self, project, structure_group, path=None, depth=Non :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: @@ -237,7 +237,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('WorkItemClassificationNode', response) @@ -245,11 +245,11 @@ def get_classification_node(self, project, structure_group, path=None, depth=Non 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. + :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: @@ -261,7 +261,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='5.0', + version='5.1', route_values=route_values, content=content) return self._deserialize('WorkItemClassificationNode', response) @@ -269,9 +269,9 @@ def update_classification_node(self, posted_node, project, structure_group, path def create_field(self, work_item_field, project=None): """CreateField. Create a new field. - :param :class:` ` work_item_field: New field definition + :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: @@ -279,7 +279,7 @@ def create_field(self, work_item_field, project=None): content = self._serialize.body(work_item_field, 'WorkItemField') response = self._send(http_method='POST', location_id='b51fd764-e5c2-4b9b-aaf7-3395cf4bdd94', - version='5.0', + version='5.1', route_values=route_values, content=content) return self._deserialize('WorkItemField', response) @@ -297,7 +297,7 @@ 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='5.0', + version='5.1', route_values=route_values) def get_field(self, field_name_or_ref_name, project=None): @@ -305,7 +305,7 @@ def get_field(self, field_name_or_ref_name, project=None): 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: @@ -314,7 +314,7 @@ 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='5.0', + version='5.1', route_values=route_values) return self._deserialize('WorkItemField', response) @@ -333,29 +333,34 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[WorkItemField]', self._unwrap_collection(response)) - def create_query(self, posted_query, project, query): + 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. + :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. - :rtype: :class:` ` + :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:` ` """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') if query is not None: route_values['query'] = self._serialize.url('query', query, 'str') + query_parameters = {} + if validate_wiql_only is not None: + query_parameters['validateWiqlOnly'] = self._serialize.query('validate_wiql_only', validate_wiql_only, 'bool') content = self._serialize.body(posted_query, 'QueryHierarchyItem') response = self._send(http_method='POST', location_id='a67d190c-c41f-424b-814d-0e906f659301', - version='5.0', + version='5.1', route_values=route_values, + query_parameters=query_parameters, content=content) return self._deserialize('QueryHierarchyItem', response) @@ -372,7 +377,7 @@ 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='5.0', + version='5.1', route_values=route_values) def get_queries(self, project, expand=None, depth=None, include_deleted=None): @@ -396,7 +401,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[QueryHierarchyItem]', self._unwrap_collection(response)) @@ -409,7 +414,7 @@ def get_query(self, project, query, expand=None, depth=None, include_deleted=Non :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 - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -425,7 +430,7 @@ def get_query(self, project, query, expand=None, depth=None, include_deleted=Non 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('QueryHierarchyItem', response) @@ -438,7 +443,7 @@ def search_queries(self, project, filter, top=None, expand=None, include_deleted :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: @@ -454,7 +459,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('QueryHierarchyItemsResult', response) @@ -462,11 +467,11 @@ def search_queries(self, project, filter, top=None, expand=None, include_deleted 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. + :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: @@ -479,7 +484,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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters, content=content) @@ -488,7 +493,7 @@ 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: + :param :class:` ` query_get_request: :param str project: Project ID or project name :rtype: [QueryHierarchyItem] """ @@ -498,7 +503,7 @@ 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='5.0', + version='5.1', route_values=route_values, content=content) return self._deserialize('[QueryHierarchyItem]', self._unwrap_collection(response)) @@ -516,7 +521,7 @@ 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='5.0', + version='5.1', route_values=route_values) def get_deleted_work_item(self, id, project=None): @@ -524,7 +529,7 @@ def get_deleted_work_item(self, id, project=None): 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: @@ -533,7 +538,7 @@ 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='5.0', + version='5.1', route_values=route_values) return self._deserialize('WorkItemDelete', response) @@ -553,7 +558,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[WorkItemDeleteReference]', self._unwrap_collection(response)) @@ -569,17 +574,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='5.0', + version='5.1', 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 + :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: @@ -589,7 +594,7 @@ 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='5.0', + version='5.1', route_values=route_values, content=content) return self._deserialize('WorkItemDelete', response) @@ -601,7 +606,7 @@ def get_revision(self, id, revision_number, project=None, expand=None): :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: @@ -615,7 +620,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('WorkItem', response) @@ -644,7 +649,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[WorkItem]', self._unwrap_collection(response)) @@ -655,7 +660,7 @@ def get_update(self, id, update_number, project=None): :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: @@ -666,7 +671,7 @@ 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='5.0', + version='5.1', route_values=route_values) return self._deserialize('WorkItemUpdate', response) @@ -691,7 +696,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[WorkItemUpdate]', self._unwrap_collection(response)) @@ -699,11 +704,11 @@ def get_updates(self, id, project=None, top=None, skip=None): 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 + :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 @@ -730,7 +735,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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters, content=content) @@ -740,7 +745,7 @@ def get_query_result_count(self, id, team_context=None, time_precision=None, top """GetQueryResultCount. 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 @@ -771,7 +776,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('int', response) @@ -780,10 +785,10 @@ 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. :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 @@ -811,11 +816,100 @@ 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='5.0', + version='5.1', 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. + :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:` ` + """ + route_values = {} + if icon is not None: + route_values['icon'] = self._serialize.url('icon', icon, 'str') + query_parameters = {} + if color is not None: + query_parameters['color'] = self._serialize.query('color', color, 'str') + if v is not None: + query_parameters['v'] = self._serialize.query('v', v, 'int') + response = self._send(http_method='GET', + location_id='4e1eb4a5-1970-4228-a682-ec48eb2dca30', + version='5.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. + :rtype: [WorkItemIcon] + """ + response = self._send(http_method='GET', + location_id='4e1eb4a5-1970-4228-a682-ec48eb2dca30', + version='5.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. + :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: object + """ + route_values = {} + if icon is not None: + route_values['icon'] = self._serialize.url('icon', icon, 'str') + query_parameters = {} + if color is not None: + query_parameters['color'] = self._serialize.query('color', color, 'str') + if v is not None: + query_parameters['v'] = self._serialize.query('v', v, 'int') + response = self._send(http_method='GET', + location_id='4e1eb4a5-1970-4228-a682-ec48eb2dca30', + version='5.1', + route_values=route_values, + query_parameters=query_parameters, + accept_media_type='image/svg+xml') + if "callback" in kwargs: + callback = kwargs["callback"] + else: + callback = None + return self._client.stream_download(response, callback=callback) + + 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. + :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: object + """ + route_values = {} + if icon is not None: + route_values['icon'] = self._serialize.url('icon', icon, 'str') + query_parameters = {} + if color is not None: + query_parameters['color'] = self._serialize.query('color', color, 'str') + if v is not None: + query_parameters['v'] = self._serialize.query('v', v, 'int') + response = self._send(http_method='GET', + location_id='4e1eb4a5-1970-4228-a682-ec48eb2dca30', + version='5.1', + route_values=route_values, + query_parameters=query_parameters, + accept_media_type='image/xaml+xml') + if "callback" in kwargs: + callback = kwargs["callback"] + else: + callback = None + return self._client.stream_download(response, callback=callback) + 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 @@ -824,7 +918,7 @@ def get_reporting_links_by_link_type(self, project=None, link_types=None, 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: @@ -842,7 +936,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('ReportingWorkItemLinksBatch', response) @@ -851,14 +945,14 @@ def get_relation_type(self, relation): """GetRelationType. 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='5.0', + version='5.1', route_values=route_values) return self._deserialize('WorkItemRelationType', response) @@ -869,7 +963,7 @@ def get_relation_types(self): """ response = self._send(http_method='GET', location_id='f5d33bc9-5b49-4a3c-a9bd-f3cd46dd2165', - version='5.0') + version='5.1') 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): @@ -887,7 +981,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: @@ -919,7 +1013,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('ReportingWorkItemRevisionsBatch', response) @@ -927,12 +1021,12 @@ def read_reporting_revisions_get(self, project=None, fields=None, types=None, co 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 + :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: @@ -947,22 +1041,23 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters, content=content) return self._deserialize('ReportingWorkItemRevisionsBatch', response) - def create_work_item(self, document, project, type, validate_only=None, bypass_rules=None, suppress_notifications=None): + 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 + :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 - :rtype: :class:` ` + :param str expand: The expand parameters for work item attributes. Possible options are { None, Relations, Fields, Links, All }. + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -976,10 +1071,12 @@ def create_work_item(self, document, project, type, validate_only=None, bypass_r query_parameters['bypassRules'] = self._serialize.query('bypass_rules', bypass_rules, 'bool') if suppress_notifications is not None: query_parameters['suppressNotifications'] = self._serialize.query('suppress_notifications', suppress_notifications, 'bool') + if expand is not None: + query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') content = self._serialize.body(document, '[JsonPatchOperation]') response = self._send(http_method='POST', location_id='62d3d110-0047-428c-ad3c-4fe872c91c74', - version='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters, content=content, @@ -994,7 +1091,7 @@ def get_work_item_template(self, project, type, fields=None, as_of=None, expand= :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: @@ -1010,18 +1107,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='5.0', + version='5.1', 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. + 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 - :rtype: :class:` ` + :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:` ` """ route_values = {} if project is not None: @@ -1033,7 +1130,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('WorkItemDelete', response) @@ -1046,7 +1143,7 @@ def get_work_item(self, id, project=None, fields=None, as_of=None, expand=None): :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: @@ -1063,7 +1160,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('WorkItem', response) @@ -1097,21 +1194,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='5.0', + version='5.1', 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): + 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 + :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 - :rtype: :class:` ` + :param str expand: The expand parameters for work item attributes. Possible options are { None, Relations, Fields, Links, All }. + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -1125,10 +1223,12 @@ def update_work_item(self, document, id, project=None, validate_only=None, bypas query_parameters['bypassRules'] = self._serialize.query('bypass_rules', bypass_rules, 'bool') if suppress_notifications is not None: query_parameters['suppressNotifications'] = self._serialize.query('suppress_notifications', suppress_notifications, 'bool') + if expand is not None: + query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') content = self._serialize.body(document, '[JsonPatchOperation]') response = self._send(http_method='PATCH', location_id='72c7ddf8-2cdc-4f60-90cd-ab71c14a399b', - version='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters, content=content, @@ -1138,7 +1238,7 @@ 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: + :param :class:` ` work_item_get_request: :param str project: Project ID or project name :rtype: [WorkItem] """ @@ -1148,7 +1248,7 @@ 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='5.0', + version='5.1', route_values=route_values, content=content) return self._deserialize('[WorkItem]', self._unwrap_collection(response)) @@ -1164,7 +1264,7 @@ 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='5.0', + version='5.1', route_values=route_values) return self._deserialize('[WorkItemTypeCategory]', self._unwrap_collection(response)) @@ -1173,7 +1273,7 @@ def get_work_item_type_category(self, project, category): 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: @@ -1182,7 +1282,7 @@ 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='5.0', + version='5.1', route_values=route_values) return self._deserialize('WorkItemTypeCategory', response) @@ -1191,7 +1291,7 @@ def get_work_item_type(self, project, type): 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: @@ -1200,7 +1300,7 @@ 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='5.0', + version='5.1', route_values=route_values) return self._deserialize('WorkItemType', response) @@ -1215,7 +1315,7 @@ 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='5.0', + version='5.1', route_values=route_values) return self._deserialize('[WorkItemType]', self._unwrap_collection(response)) @@ -1237,7 +1337,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[WorkItemTypeFieldWithReferences]', self._unwrap_collection(response)) @@ -1249,7 +1349,7 @@ def get_work_item_type_field_with_references(self, project, type, field, expand= :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: @@ -1263,7 +1363,7 @@ 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='5.0', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('WorkItemTypeFieldWithReferences', response) diff --git a/azure-devops/azure/devops/v5_1/accounts/accounts_client.py b/azure-devops/azure/devops/v5_1/accounts/accounts_client.py index 67403960..bf218aae 100644 --- a/azure-devops/azure/devops/v5_1/accounts/accounts_client.py +++ b/azure-devops/azure/devops/v5_1/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. - [Preview API] Get a list of accounts for a specific owner or a specific member. + Get a list of accounts for a specific owner or a specific member. :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='5.1-preview.1', + version='5.1', query_parameters=query_parameters) return self._deserialize('[Account]', self._unwrap_collection(response)) diff --git a/azure-devops/azure/devops/v5_1/build/build_client.py b/azure-devops/azure/devops/v5_1/build/build_client.py index 9df2a3d5..199a340d 100644 --- a/azure-devops/azure/devops/v5_1/build/build_client.py +++ b/azure-devops/azure/devops/v5_1/build/build_client.py @@ -27,7 +27,7 @@ def __init__(self, base_url=None, creds=None): def create_artifact(self, artifact, project, build_id): """CreateArtifact. - [Preview API] Associates an artifact with a build. + 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. @@ -41,14 +41,14 @@ 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='5.1-preview.5', + version='5.1', route_values=route_values, content=content) return self._deserialize('BuildArtifact', response) def get_artifact(self, project, build_id, artifact_name): """GetArtifact. - [Preview API] Gets a specific artifact for a build. + 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. @@ -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='5.1-preview.5', + version='5.1', 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. - [Preview API] Gets a specific artifact for a build. + 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='5.1-preview.5', + version='5.1', 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. - [Preview API] Gets all artifacts for a build. + 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='5.1-preview.5', + version='5.1', 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. - [Preview API] Gets a file from the build. + 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='5.1-preview.5', + version='5.1', route_values=route_values, query_parameters=query_parameters, accept_media_type='application/octet-stream') @@ -329,7 +329,7 @@ def get_build_badge_data(self, project, repo_type, repo_id=None, branch_name=Non def delete_build(self, project, build_id): """DeleteBuild. - [Preview API] Deletes a build. + Deletes a build. :param str project: Project ID or project name :param int build_id: The ID of the build. """ @@ -340,12 +340,12 @@ 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='5.1-preview.5', + version='5.1', route_values=route_values) def get_build(self, project, build_id, property_filters=None): """GetBuild. - [Preview API] Gets a build + Gets a build :param str project: Project ID or project name :param int build_id: :param str property_filters: @@ -361,14 +361,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='5.1-preview.5', + version='5.1', 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. - [Preview API] Gets a list of builds. + 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. @@ -443,14 +443,14 @@ 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='5.1-preview.5', + version='5.1', 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): """QueueBuild. - [Preview API] Queues a build + Queues a build :param :class:` ` build: :param str project: Project ID or project name :param bool ignore_warnings: @@ -471,7 +471,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='5.1-preview.5', + version='5.1', route_values=route_values, query_parameters=query_parameters, content=content) @@ -479,7 +479,7 @@ def queue_build(self, build, project, ignore_warnings=None, check_in_ticket=None def update_build(self, build, project, build_id, retry=None): """UpdateBuild. - [Preview API] Updates a build. + 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. @@ -497,7 +497,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='5.1-preview.5', + version='5.1', route_values=route_values, query_parameters=query_parameters, content=content) @@ -505,7 +505,7 @@ def update_build(self, build, project, build_id, retry=None): def update_builds(self, builds, project): """UpdateBuilds. - [Preview API] Updates multiple builds. + Updates multiple builds. :param [Build] builds: The builds to update. :param str project: Project ID or project name :rtype: [Build] @@ -516,14 +516,14 @@ 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='5.1-preview.5', + version='5.1', 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 + Gets the changes associated with a build :param str project: Project ID or project name :param int build_id: :param str continuation_token: @@ -545,7 +545,7 @@ def get_build_changes(self, project, build_id, continuation_token=None, top=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='5.1-preview.2', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[Change]', self._unwrap_collection(response)) @@ -578,7 +578,7 @@ def get_changes_between_builds(self, project, from_build_id=None, to_build_id=No def get_build_controller(self, controller_id): """GetBuildController. - [Preview API] Gets a controller + Gets a controller :param int controller_id: :rtype: :class:` ` """ @@ -587,13 +587,13 @@ def get_build_controller(self, controller_id): 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='5.1-preview.2', + version='5.1', route_values=route_values) return self._deserialize('BuildController', response) def get_build_controllers(self, name=None): """GetBuildControllers. - [Preview API] Gets controller, optionally filtered by name + Gets controller, optionally filtered by name :param str name: :rtype: [BuildController] """ @@ -602,13 +602,13 @@ 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='5.1-preview.2', + version='5.1', 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. - [Preview API] Creates a new definition. + Creates a new definition. :param :class:` ` definition: The definition. :param str project: Project ID or project name :param int definition_to_clone_id: @@ -626,7 +626,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='5.1-preview.7', + version='5.1', route_values=route_values, query_parameters=query_parameters, content=content) @@ -634,7 +634,7 @@ def create_definition(self, definition, project, definition_to_clone_id=None, de def delete_definition(self, project, definition_id): """DeleteDefinition. - [Preview API] Deletes a definition and all associated builds. + Deletes a definition and all associated builds. :param str project: Project ID or project name :param int definition_id: The ID of the definition. """ @@ -645,12 +645,12 @@ 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='5.1-preview.7', + version='5.1', 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. - [Preview API] Gets a definition, optionally at a specific revision. + 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. @@ -676,14 +676,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='5.1-preview.7', + version='5.1', 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. - [Preview API] Gets a list of definitions. + 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. @@ -742,14 +742,14 @@ 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='5.1-preview.7', + version='5.1', 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. - [Preview API] Restores a deleted definition + 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. @@ -765,14 +765,14 @@ 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='5.1-preview.7', + version='5.1', 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. - [Preview API] Updates an existing definition. + Updates an existing definition. :param :class:` ` definition: The new version of the defintion. :param str project: Project ID or project name :param int definition_id: The ID of the definition. @@ -793,7 +793,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='5.1-preview.7', + version='5.1', route_values=route_values, query_parameters=query_parameters, content=content) @@ -948,7 +948,7 @@ def get_latest_build(self, project, definition, branch_name=None): def get_build_log(self, project, build_id, log_id, start_line=None, end_line=None, **kwargs): """GetBuildLog. - [Preview API] Gets an individual log file for a build. + 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. @@ -970,7 +970,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='5.1-preview.2', + version='5.1', route_values=route_values, query_parameters=query_parameters, accept_media_type='text/plain') @@ -982,7 +982,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. - [Preview API] Gets an individual log file for a build. + 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. @@ -1004,14 +1004,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='5.1-preview.2', + version='5.1', 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. - [Preview API] Gets the logs for a build. + 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] @@ -1023,13 +1023,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='5.1-preview.2', + version='5.1', route_values=route_values) return self._deserialize('[BuildLog]', self._unwrap_collection(response)) def get_build_logs_zip(self, project, build_id, **kwargs): """GetBuildLogsZip. - [Preview API] Gets the logs for a build. + 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 @@ -1041,7 +1041,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='5.1-preview.2', + version='5.1', route_values=route_values, accept_media_type='application/zip') if "callback" in kwargs: @@ -1052,7 +1052,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. - [Preview API] Gets an individual log file for a build. + 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. @@ -1074,7 +1074,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='5.1-preview.2', + version='5.1', route_values=route_values, query_parameters=query_parameters, accept_media_type='application/zip') @@ -1132,7 +1132,7 @@ def get_definition_metrics(self, project, definition_id, min_metrics_time=None): def get_build_option_definitions(self, project=None): """GetBuildOptionDefinitions. - [Preview API] Gets all build definition options supported by the system. + Gets all build definition options supported by the system. :param str project: Project ID or project name :rtype: [BuildOptionDefinition] """ @@ -1141,7 +1141,7 @@ 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='5.1-preview.2', + version='5.1', route_values=route_values) return self._deserialize('[BuildOptionDefinition]', self._unwrap_collection(response)) @@ -1435,7 +1435,7 @@ def get_resource_usage(self): def get_definition_revisions(self, project, definition_id): """GetDefinitionRevisions. - [Preview API] Gets all revisions of a definition. + 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] @@ -1447,13 +1447,13 @@ 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='5.1-preview.3', + version='5.1', route_values=route_values) return self._deserialize('[BuildDefinitionRevision]', self._unwrap_collection(response)) def get_build_settings(self, project=None): """GetBuildSettings. - [Preview API] Gets the build settings. + Gets the build settings. :param str project: Project ID or project name :rtype: :class:` ` """ @@ -1462,13 +1462,13 @@ def get_build_settings(self, project=None): route_values['project'] = self._serialize.url('project', project, 'str') response = self._send(http_method='GET', location_id='aa8c1c9c-ef8b-474a-b8c4-785c7b191d0d', - version='5.1-preview.1', + version='5.1', route_values=route_values) return self._deserialize('BuildSettings', response) def update_build_settings(self, settings, project=None): """UpdateBuildSettings. - [Preview API] Updates the build settings. + Updates the build settings. :param :class:` ` settings: The new settings. :param str project: Project ID or project name :rtype: :class:` ` @@ -1479,7 +1479,7 @@ 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='5.1-preview.1', + version='5.1', route_values=route_values, content=content) return self._deserialize('BuildSettings', response) @@ -1536,7 +1536,7 @@ def get_status_badge(self, project, definition, branch_name=None, stage_name=Non def add_build_tag(self, project, build_id, tag): """AddBuildTag. - [Preview API] Adds a tag to a build. + 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. @@ -1551,13 +1551,13 @@ 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='5.1-preview.2', + version='5.1', route_values=route_values) return self._deserialize('[str]', self._unwrap_collection(response)) def add_build_tags(self, tags, project, build_id): """AddBuildTags. - [Preview API] Adds tags to a build. + Adds tags to a build. :param [str] tags: The tags to add. :param str project: Project ID or project name :param int build_id: The ID of the build. @@ -1571,14 +1571,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='5.1-preview.2', + version='5.1', route_values=route_values, content=content) return self._deserialize('[str]', self._unwrap_collection(response)) def delete_build_tag(self, project, build_id, tag): """DeleteBuildTag. - [Preview API] Removes a tag from a build. + Removes a tag from 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 remove. @@ -1593,13 +1593,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='5.1-preview.2', + version='5.1', route_values=route_values) return self._deserialize('[str]', self._unwrap_collection(response)) def get_build_tags(self, project, build_id): """GetBuildTags. - [Preview API] Gets the tags for a build. + 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] @@ -1611,7 +1611,22 @@ 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='5.1-preview.2', + version='5.1', + route_values=route_values) + return self._deserialize('[str]', self._unwrap_collection(response)) + + def get_tags(self, project): + """GetTags. + Gets a list of all build and definition tags in the project. + :param str project: Project ID or project name + :rtype: [str] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + response = self._send(http_method='GET', + location_id='d84ac5c6-edc7-43d5-adc9-1b34be5dea09', + version='5.1', route_values=route_values) return self._deserialize('[str]', self._unwrap_collection(response)) @@ -1701,24 +1716,9 @@ def get_definition_tags(self, project, definition_id, revision=None): query_parameters=query_parameters) return self._deserialize('[str]', self._unwrap_collection(response)) - def get_tags(self, project): - """GetTags. - [Preview API] Gets a list of all build and definition tags in the project. - :param str project: Project ID or project name - :rtype: [str] - """ - route_values = {} - if project is not None: - route_values['project'] = self._serialize.url('project', project, 'str') - response = self._send(http_method='GET', - location_id='d84ac5c6-edc7-43d5-adc9-1b34be5dea09', - version='5.1-preview.2', - route_values=route_values) - return self._deserialize('[str]', self._unwrap_collection(response)) - def delete_template(self, project, template_id): """DeleteTemplate. - [Preview API] Deletes a build definition template. + Deletes a build definition template. :param str project: Project ID or project name :param str template_id: The ID of the template. """ @@ -1729,12 +1729,12 @@ 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='5.1-preview.3', + version='5.1', route_values=route_values) def get_template(self, project, template_id): """GetTemplate. - [Preview API] Gets a specific build definition template. + 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:` ` @@ -1746,13 +1746,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='5.1-preview.3', + version='5.1', route_values=route_values) return self._deserialize('BuildDefinitionTemplate', response) def get_templates(self, project): """GetTemplates. - [Preview API] Gets all definition templates. + Gets all definition templates. :param str project: Project ID or project name :rtype: [BuildDefinitionTemplate] """ @@ -1761,13 +1761,13 @@ 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='5.1-preview.3', + version='5.1', route_values=route_values) return self._deserialize('[BuildDefinitionTemplate]', self._unwrap_collection(response)) def save_template(self, template, project, template_id): """SaveTemplate. - [Preview API] Updates an existing build definition template. + 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. @@ -1781,14 +1781,14 @@ 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='5.1-preview.3', + version='5.1', 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. - [Preview API] Gets details for a build + Gets details for a build :param str project: Project ID or project name :param int build_id: :param str timeline_id: @@ -1810,7 +1810,7 @@ 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='5.1-preview.2', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('Timeline', response) @@ -1870,7 +1870,7 @@ def list_webhooks(self, project, provider_name, service_endpoint_id=None, reposi def get_build_work_items_refs(self, project, build_id, top=None): """GetBuildWorkItemsRefs. - [Preview API] Gets the work items associated with a build. + Gets the work items associated with a build. :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. @@ -1886,14 +1886,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='5.1-preview.2', + version='5.1', 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. - [Preview API] Gets the work items associated with a build, filtered to specific commits. + 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. @@ -1911,7 +1911,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='5.1-preview.2', + version='5.1', route_values=route_values, query_parameters=query_parameters, content=content) diff --git a/azure-devops/azure/devops/v5_1/client_factory.py b/azure-devops/azure/devops/v5_1/client_factory.py index af40dfc7..5cdd6e80 100644 --- a/azure-devops/azure/devops/v5_1/client_factory.py +++ b/azure-devops/azure/devops/v5_1/client_factory.py @@ -9,7 +9,7 @@ class ClientFactoryV5_1(object): """ClientFactoryV5_1. - A factory class to get the 5.1 preview clients. + A factory class to get the 5.1 clients. """ def __init__(self, connection): diff --git a/azure-devops/azure/devops/v5_1/cloud_load_test/cloud_load_test_client.py b/azure-devops/azure/devops/v5_1/cloud_load_test/cloud_load_test_client.py index 580b25bb..447b7ba2 100644 --- a/azure-devops/azure/devops/v5_1/cloud_load_test/cloud_load_test_client.py +++ b/azure-devops/azure/devops/v5_1/cloud_load_test/cloud_load_test_client.py @@ -27,20 +27,18 @@ def __init__(self, base_url=None, creds=None): def create_agent_group(self, group): """CreateAgentGroup. - [Preview API] :param :class:` ` group: Agent group to be created :rtype: :class:` ` """ content = self._serialize.body(group, 'AgentGroup') response = self._send(http_method='POST', location_id='ab8d91c1-12d9-4ec5-874d-1ddb23e17720', - version='5.1-preview.1', + version='5.1', content=content) return self._deserialize('AgentGroup', response) def get_agent_groups(self, agent_group_id=None, machine_setup_input=None, machine_access_data=None, outgoing_request_urls=None, agent_group_name=None): """GetAgentGroups. - [Preview API] :param str agent_group_id: The agent group indentifier :param bool machine_setup_input: :param bool machine_access_data: @@ -62,14 +60,13 @@ def get_agent_groups(self, agent_group_id=None, machine_setup_input=None, machin query_parameters['agentGroupName'] = self._serialize.query('agent_group_name', agent_group_name, 'str') response = self._send(http_method='GET', location_id='ab8d91c1-12d9-4ec5-874d-1ddb23e17720', - version='5.1-preview.1', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('object', response) def delete_static_agent(self, agent_group_id, agent_name): """DeleteStaticAgent. - [Preview API] :param str agent_group_id: The agent group identifier :param str agent_name: Name of the static agent :rtype: str @@ -82,14 +79,13 @@ def delete_static_agent(self, agent_group_id, agent_name): query_parameters['agentName'] = self._serialize.query('agent_name', agent_name, 'str') response = self._send(http_method='DELETE', location_id='87e4b63d-7142-4b50-801e-72ba9ff8ee9b', - version='5.1-preview.1', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('str', response) def get_static_agents(self, agent_group_id, agent_name=None): """GetStaticAgents. - [Preview API] :param str agent_group_id: The agent group identifier :param str agent_name: Name of the static agent :rtype: object @@ -102,14 +98,13 @@ def get_static_agents(self, agent_group_id, agent_name=None): query_parameters['agentName'] = self._serialize.query('agent_name', agent_name, 'str') response = self._send(http_method='GET', location_id='87e4b63d-7142-4b50-801e-72ba9ff8ee9b', - version='5.1-preview.1', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('object', response) def get_application(self, application_id): """GetApplication. - [Preview API] :param str application_id: Filter by APM application identifier. :rtype: :class:` ` """ @@ -118,13 +113,12 @@ def get_application(self, application_id): route_values['applicationId'] = self._serialize.url('application_id', application_id, 'str') response = self._send(http_method='GET', location_id='2c986dce-8e8d-4142-b541-d016d5aff764', - version='5.1-preview.1', + version='5.1', route_values=route_values) return self._deserialize('Application', response) def get_applications(self, type=None): """GetApplications. - [Preview API] :param str type: Filters the results based on the plugin type. :rtype: [Application] """ @@ -133,13 +127,12 @@ def get_applications(self, type=None): query_parameters['type'] = self._serialize.query('type', type, 'str') response = self._send(http_method='GET', location_id='2c986dce-8e8d-4142-b541-d016d5aff764', - version='5.1-preview.1', + version='5.1', query_parameters=query_parameters) return self._deserialize('[Application]', self._unwrap_collection(response)) def get_counters(self, test_run_id, group_names, include_summary=None): """GetCounters. - [Preview API] :param str test_run_id: The test run identifier :param str group_names: Comma separated names of counter groups, such as 'Application', 'Performance' and 'Throughput' :param bool include_summary: @@ -155,14 +148,13 @@ def get_counters(self, test_run_id, group_names, include_summary=None): query_parameters['includeSummary'] = self._serialize.query('include_summary', include_summary, 'bool') response = self._send(http_method='GET', location_id='29265ea4-b5a5-4b2e-b054-47f5f6f00183', - version='5.1-preview.1', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TestRunCounterInstance]', self._unwrap_collection(response)) def get_application_counters(self, application_id=None, plugintype=None): """GetApplicationCounters. - [Preview API] :param str application_id: Filter by APM application identifier. :param str plugintype: Currently ApplicationInsights is the only available plugin type. :rtype: [ApplicationCounters] @@ -174,13 +166,12 @@ def get_application_counters(self, application_id=None, plugintype=None): query_parameters['plugintype'] = self._serialize.query('plugintype', plugintype, 'str') response = self._send(http_method='GET', location_id='c1275ce9-6d26-4bc6-926b-b846502e812d', - version='5.1-preview.1', + version='5.1', query_parameters=query_parameters) return self._deserialize('[ApplicationCounters]', self._unwrap_collection(response)) def get_counter_samples(self, counter_sample_query_details, test_run_id): """GetCounterSamples. - [Preview API] :param :class:` ` counter_sample_query_details: :param str test_run_id: The test run identifier :rtype: :class:` ` @@ -191,14 +182,13 @@ def get_counter_samples(self, counter_sample_query_details, test_run_id): content = self._serialize.body(counter_sample_query_details, 'VssJsonCollectionWrapper') response = self._send(http_method='POST', location_id='bad18480-7193-4518-992a-37289c5bb92d', - version='5.1-preview.1', + version='5.1', route_values=route_values, content=content) return self._deserialize('CounterSamplesResult', response) def get_load_test_run_errors(self, test_run_id, type=None, sub_type=None, detailed=None): """GetLoadTestRunErrors. - [Preview API] :param str test_run_id: The test run identifier :param str type: Filter for the particular type of errors. :param str sub_type: Filter for a particular subtype of errors. You should not provide error subtype without error type. @@ -217,14 +207,13 @@ def get_load_test_run_errors(self, test_run_id, type=None, sub_type=None, detail query_parameters['detailed'] = self._serialize.query('detailed', detailed, 'bool') response = self._send(http_method='GET', location_id='b52025a7-3fb4-4283-8825-7079e75bd402', - version='5.1-preview.2', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('LoadTestErrors', response) def get_test_run_messages(self, test_run_id): """GetTestRunMessages. - [Preview API] :param str test_run_id: Id of the test run :rtype: [TestRunMessage] """ @@ -233,13 +222,12 @@ def get_test_run_messages(self, test_run_id): route_values['testRunId'] = self._serialize.url('test_run_id', test_run_id, 'str') response = self._send(http_method='GET', location_id='2e7ba122-f522-4205-845b-2d270e59850a', - version='5.1-preview.1', + version='5.1', route_values=route_values) return self._deserialize('[TestRunMessage]', self._unwrap_collection(response)) def get_plugin(self, type): """GetPlugin. - [Preview API] :param str type: Currently ApplicationInsights is the only available plugin type. :rtype: :class:` ` """ @@ -248,23 +236,21 @@ def get_plugin(self, type): route_values['type'] = self._serialize.url('type', type, 'str') response = self._send(http_method='GET', location_id='7dcb0bb2-42d5-4729-9958-c0401d5e7693', - version='5.1-preview.1', + version='5.1', route_values=route_values) return self._deserialize('ApplicationType', response) def get_plugins(self): """GetPlugins. - [Preview API] :rtype: [ApplicationType] """ response = self._send(http_method='GET', location_id='7dcb0bb2-42d5-4729-9958-c0401d5e7693', - version='5.1-preview.1') + version='5.1') return self._deserialize('[ApplicationType]', self._unwrap_collection(response)) def get_load_test_result(self, test_run_id): """GetLoadTestResult. - [Preview API] :param str test_run_id: The test run identifier :rtype: :class:` ` """ @@ -273,26 +259,24 @@ def get_load_test_result(self, test_run_id): route_values['testRunId'] = self._serialize.url('test_run_id', test_run_id, 'str') response = self._send(http_method='GET', location_id='5ed69bd8-4557-4cec-9b75-1ad67d0c257b', - version='5.1-preview.1', + version='5.1', route_values=route_values) return self._deserialize('TestResults', response) def create_test_definition(self, test_definition): """CreateTestDefinition. - [Preview API] :param :class:` ` test_definition: Test definition to be created :rtype: :class:` ` """ content = self._serialize.body(test_definition, 'TestDefinition') response = self._send(http_method='POST', location_id='a8f9b135-f604-41ea-9d74-d9a5fd32fcd8', - version='5.1-preview.1', + version='5.1', content=content) return self._deserialize('TestDefinition', response) def get_test_definition(self, test_definition_id): """GetTestDefinition. - [Preview API] :param str test_definition_id: The test definition identifier :rtype: :class:` ` """ @@ -301,13 +285,12 @@ def get_test_definition(self, test_definition_id): route_values['testDefinitionId'] = self._serialize.url('test_definition_id', test_definition_id, 'str') response = self._send(http_method='GET', location_id='a8f9b135-f604-41ea-9d74-d9a5fd32fcd8', - version='5.1-preview.1', + version='5.1', route_values=route_values) return self._deserialize('TestDefinition', response) def get_test_definitions(self, from_date=None, to_date=None, top=None): """GetTestDefinitions. - [Preview API] :param str from_date: Date after which test definitions were created :param str to_date: Date before which test definitions were crated :param int top: @@ -322,39 +305,36 @@ def get_test_definitions(self, from_date=None, to_date=None, top=None): query_parameters['top'] = self._serialize.query('top', top, 'int') response = self._send(http_method='GET', location_id='a8f9b135-f604-41ea-9d74-d9a5fd32fcd8', - version='5.1-preview.1', + version='5.1', query_parameters=query_parameters) return self._deserialize('[TestDefinitionBasic]', self._unwrap_collection(response)) def update_test_definition(self, test_definition): """UpdateTestDefinition. - [Preview API] :param :class:` ` test_definition: :rtype: :class:` ` """ content = self._serialize.body(test_definition, 'TestDefinition') response = self._send(http_method='PUT', location_id='a8f9b135-f604-41ea-9d74-d9a5fd32fcd8', - version='5.1-preview.1', + version='5.1', content=content) return self._deserialize('TestDefinition', response) def create_test_drop(self, web_test_drop): """CreateTestDrop. - [Preview API] :param :class:` ` web_test_drop: Test drop to be created :rtype: :class:` ` """ content = self._serialize.body(web_test_drop, 'TestDrop') response = self._send(http_method='POST', location_id='d89d0e08-505c-4357-96f6-9729311ce8ad', - version='5.1-preview.1', + version='5.1', content=content) return self._deserialize('TestDrop', response) def get_test_drop(self, test_drop_id): """GetTestDrop. - [Preview API] :param str test_drop_id: The test drop identifier :rtype: :class:` ` """ @@ -363,26 +343,24 @@ def get_test_drop(self, test_drop_id): route_values['testDropId'] = self._serialize.url('test_drop_id', test_drop_id, 'str') response = self._send(http_method='GET', location_id='d89d0e08-505c-4357-96f6-9729311ce8ad', - version='5.1-preview.1', + version='5.1', route_values=route_values) return self._deserialize('TestDrop', response) def create_test_run(self, web_test_run): """CreateTestRun. - [Preview API] :param :class:` ` web_test_run: :rtype: :class:` ` """ content = self._serialize.body(web_test_run, 'TestRun') response = self._send(http_method='POST', location_id='b41a84ff-ff03-4ac1-b76e-e7ea25c92aba', - version='5.1-preview.1', + version='5.1', content=content) return self._deserialize('TestRun', response) def get_test_run(self, test_run_id): """GetTestRun. - [Preview API] :param str test_run_id: Unique ID of the test run :rtype: :class:` ` """ @@ -391,13 +369,13 @@ def get_test_run(self, test_run_id): route_values['testRunId'] = self._serialize.url('test_run_id', test_run_id, 'str') response = self._send(http_method='GET', location_id='b41a84ff-ff03-4ac1-b76e-e7ea25c92aba', - version='5.1-preview.1', + version='5.1', route_values=route_values) return self._deserialize('TestRun', response) def get_test_runs(self, name=None, requested_by=None, status=None, run_type=None, from_date=None, to_date=None, detailed=None, top=None, runsourceidentifier=None, retention_state=None): """GetTestRuns. - [Preview API] Returns test runs based on the filter specified. Returns all runs of the tenant if there is no filter. + Returns test runs based on the filter specified. Returns all runs of the tenant if there is no filter. :param str name: Name for the test run. Names are not unique. Test runs with same name are assigned sequential rolling numbers. :param str requested_by: Filter by the user who requested the test run. Here requestedBy should be the display name of the user. :param str status: Filter by the test run status. @@ -433,13 +411,12 @@ def get_test_runs(self, name=None, requested_by=None, status=None, run_type=None query_parameters['retentionState'] = self._serialize.query('retention_state', retention_state, 'str') response = self._send(http_method='GET', location_id='b41a84ff-ff03-4ac1-b76e-e7ea25c92aba', - version='5.1-preview.1', + version='5.1', query_parameters=query_parameters) return self._deserialize('object', response) def update_test_run(self, web_test_run, test_run_id): """UpdateTestRun. - [Preview API] :param :class:` ` web_test_run: :param str test_run_id: """ @@ -449,7 +426,7 @@ def update_test_run(self, web_test_run, test_run_id): content = self._serialize.body(web_test_run, 'TestRun') self._send(http_method='PATCH', location_id='b41a84ff-ff03-4ac1-b76e-e7ea25c92aba', - version='5.1-preview.1', + version='5.1', route_values=route_values, content=content) diff --git a/azure-devops/azure/devops/v5_1/core/core_client.py b/azure-devops/azure/devops/v5_1/core/core_client.py index 6e8ad321..83659dd2 100644 --- a/azure-devops/azure/devops/v5_1/core/core_client.py +++ b/azure-devops/azure/devops/v5_1/core/core_client.py @@ -112,7 +112,7 @@ def get_connected_services(self, project_id, kind=None): def get_team_members_with_extended_properties(self, project_id, team_id, top=None, skip=None): """GetTeamMembersWithExtendedProperties. - [Preview API] Get a list of members for a specific team. + 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,14 +131,14 @@ 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='5.1-preview.2', + version='5.1', 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. - [Preview API] Get a process by ID. + Get a process by ID. :param str process_id: ID for a process. :rtype: :class:` ` """ @@ -147,23 +147,23 @@ def get_process_by_id(self, process_id): 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='5.1-preview.1', + version='5.1', route_values=route_values) return self._deserialize('Process', response) def get_processes(self): """GetProcesses. - [Preview API] Get a list of processes. + Get a list of processes. :rtype: [Process] """ response = self._send(http_method='GET', location_id='93878975-88c5-4e6a-8abb-7ddd77a8a7d8', - version='5.1-preview.1') + version='5.1') return self._deserialize('[Process]', self._unwrap_collection(response)) def get_project_collection(self, collection_id): """GetProjectCollection. - [Preview API] Get project collection with the specified id or name. + Get project collection with the specified id or name. :param str collection_id: :rtype: :class:` ` """ @@ -172,13 +172,13 @@ def get_project_collection(self, collection_id): 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='5.1-preview.2', + version='5.1', route_values=route_values) return self._deserialize('TeamProjectCollection', response) def get_project_collections(self, top=None, skip=None): """GetProjectCollections. - [Preview API] Get project collection references for this application. + Get project collection references for this application. :param int top: :param int skip: :rtype: [TeamProjectCollectionReference] @@ -190,13 +190,13 @@ 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='5.1-preview.2', + version='5.1', 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. - [Preview API] Get project with the specified id or name, optionally including capabilities. + 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). @@ -212,14 +212,14 @@ 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='5.1-preview.4', + version='5.1', 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. - [Preview API] Get all projects in the organization that the authenticated user has access to. + 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: @@ -240,26 +240,26 @@ def get_projects(self, state_filter=None, top=None, skip=None, continuation_toke 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='5.1-preview.4', + version='5.1', query_parameters=query_parameters) return self._deserialize('[TeamProjectReference]', self._unwrap_collection(response)) def queue_create_project(self, project_to_create): """QueueCreateProject. - [Preview API] Queues a project to be created. Use the [GetOperation](../../operations/operations/get) to periodically check for create project status. + 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='5.1-preview.4', + version='5.1', content=content) return self._deserialize('OperationReference', response) def queue_delete_project(self, project_id): """QueueDeleteProject. - [Preview API] Queues a project to be deleted. Use the [GetOperation](../../operations/operations/get) to periodically check for delete project status. + 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:` ` """ @@ -268,13 +268,13 @@ def queue_delete_project(self, project_id): 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='5.1-preview.4', + version='5.1', route_values=route_values) return self._deserialize('OperationReference', response) def update_project(self, project_update, project_id): """UpdateProject. - [Preview API] Update an existing project's name, abbreviation, description, or restore a project. + 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:` ` @@ -285,7 +285,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='5.1-preview.4', + version='5.1', route_values=route_values, content=content) return self._deserialize('OperationReference', response) @@ -372,33 +372,9 @@ def get_proxies(self, proxy_url=None): 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='5.1-preview.3', - query_parameters=query_parameters) - return self._deserialize('[WebApiTeam]', self._unwrap_collection(response)) - def create_team(self, team, project_id): """CreateTeam. - [Preview API] Create a team in a team project. + 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:` ` @@ -409,16 +385,16 @@ 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='5.1-preview.3', + version='5.1', route_values=route_values, content=content) return self._deserialize('WebApiTeam', response) def delete_team(self, project_id, team_id): """DeleteTeam. - [Preview API] Delete a team. + 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 of ID of the team to delete. + :param str team_id: The name or ID of the team to delete. """ route_values = {} if project_id is not None: @@ -427,12 +403,12 @@ 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='5.1-preview.3', + version='5.1', route_values=route_values) def get_team(self, project_id, team_id, expand_identity=None): """GetTeam. - [Preview API] Get a specific team. + 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. @@ -448,14 +424,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='5.1-preview.3', + version='5.1', 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. - [Preview API] Get a list of teams. + 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. @@ -477,14 +453,14 @@ 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='5.1-preview.3', + version='5.1', 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. - [Preview API] Update a team's name and/or description. + 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. @@ -498,8 +474,32 @@ 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='5.1-preview.3', + version='5.1', 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='5.1-preview.3', + query_parameters=query_parameters) + return self._deserialize('[WebApiTeam]', self._unwrap_collection(response)) + diff --git a/azure-devops/azure/devops/v5_1/dashboard/models.py b/azure-devops/azure/devops/v5_1/dashboard/models.py index 48fbc290..3e90c854 100644 --- a/azure-devops/azure/devops/v5_1/dashboard/models.py +++ b/azure-devops/azure/devops/v5_1/dashboard/models.py @@ -97,7 +97,7 @@ def __init__(self, _links=None, dashboard_entries=None, permission=None, team_da class DashboardGroupEntry(Dashboard): """ - Dashboard group entry, wraping around Dashboard (needed?) + Dashboard group entry, wrapping around Dashboard (needed?) :param _links: :type _links: :class:`ReferenceLinks ` diff --git a/azure-devops/azure/devops/v5_1/gallery/models.py b/azure-devops/azure/devops/v5_1/gallery/models.py index 87bffb6a..7838adbd 100644 --- a/azure-devops/azure/devops/v5_1/gallery/models.py +++ b/azure-devops/azure/devops/v5_1/gallery/models.py @@ -65,7 +65,7 @@ class Answers(Model): """ :param vSMarketplace_extension_name: Gets or sets the vs marketplace extension name :type vSMarketplace_extension_name: str - :param vSMarketplace_publisher_name: Gets or sets the vs marketplace publsiher name + :param vSMarketplace_publisher_name: Gets or sets the vs marketplace publisher name :type vSMarketplace_publisher_name: str """ @@ -1576,7 +1576,7 @@ class Review(Model): :type is_ignored: bool :param product_version: Version of the product for which review was submitted :type product_version: str - :param rating: Rating procided by the user + :param rating: Rating provided by the user :type rating: str :param reply: Reply, if any, for this review :type reply: :class:`ReviewReply ` diff --git a/azure-devops/azure/devops/v5_1/git/git_client_base.py b/azure-devops/azure/devops/v5_1/git/git_client_base.py index 384a27ec..6bea3de4 100644 --- a/azure-devops/azure/devops/v5_1/git/git_client_base.py +++ b/azure-devops/azure/devops/v5_1/git/git_client_base.py @@ -69,7 +69,7 @@ def get_annotated_tag(self, project, repository_id, object_id): def get_blob(self, repository_id, sha1, project=None, download=None, file_name=None, resolve_lfs=None): """GetBlob. - [Preview API] Get a single blob. + 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 @@ -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='5.1-preview.1', + version='5.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. - [Preview API] Get a single blob. + 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='5.1-preview.1', + version='5.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. - [Preview API] Gets one or more blobs in a zip file download. + 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='5.1-preview.1', + version='5.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. - [Preview API] Get a single blob. + 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='5.1-preview.1', + version='5.1', route_values=route_values, query_parameters=query_parameters, accept_media_type='application/zip') @@ -206,7 +206,7 @@ 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. - [Preview API] Retrieve statistics about a single branch. + 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 @@ -230,14 +230,14 @@ 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='5.1-preview.1', + version='5.1', 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. - [Preview API] Retrieve statistics about all branches within a repository. + 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. @@ -258,14 +258,14 @@ 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='5.1-preview.1', + version='5.1', 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. + 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 @@ -287,7 +287,7 @@ def get_changes(self, commit_id, repository_id, project=None, top=None, skip=Non query_parameters['skip'] = self._serialize.query('skip', skip, 'int') response = self._send(http_method='GET', location_id='5bf884f5-3e07-42e9-afb8-1b872267bf16', - version='5.1-preview.1', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('GitCommitChanges', response) @@ -359,7 +359,7 @@ def get_cherry_pick_for_ref_name(self, project, repository_id, ref_name): 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. - [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. + 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. @@ -397,14 +397,14 @@ 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='5.1-preview.1', + version='5.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. - [Preview API] Retrieve a particular commit. + 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 @@ -423,14 +423,14 @@ 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='5.1-preview.1', + version='5.1', 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. - [Preview API] Retrieve git commits for a project + 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 str project: Project ID or project name @@ -497,14 +497,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='5.1-preview.1', + version='5.1', 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. - [Preview API] Retrieve a list of commits associated with a particular push. + 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 @@ -529,14 +529,14 @@ 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='5.1-preview.1', + version='5.1', 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. - [Preview API] Retrieve git commits for a project matching the search criteria + 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 @@ -560,7 +560,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='5.1-preview.1', + version='5.1', route_values=route_values, query_parameters=query_parameters, content=content) @@ -776,7 +776,7 @@ def update_import_request(self, import_request_to_update, project, repository_id 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): """GetItem. - [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. + 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 @@ -821,14 +821,14 @@ def get_item(self, repository_id, path, project=None, scope_path=None, recursion query_parameters['resolveLfs'] = self._serialize.query('resolve_lfs', resolve_lfs, 'bool') response = self._send(http_method='GET', location_id='fb93c0db-47ed-4a31-8c20-47552878fb44', - version='5.1-preview.1', + version='5.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, **kwargs): """GetItemContent. - [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. + 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 @@ -873,7 +873,7 @@ def get_item_content(self, repository_id, path, project=None, scope_path=None, r query_parameters['resolveLfs'] = self._serialize.query('resolve_lfs', resolve_lfs, 'bool') response = self._send(http_method='GET', location_id='fb93c0db-47ed-4a31-8c20-47552878fb44', - version='5.1-preview.1', + version='5.1', route_values=route_values, query_parameters=query_parameters, accept_media_type='application/octet-stream') @@ -885,7 +885,7 @@ def get_item_content(self, repository_id, path, project=None, scope_path=None, r 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): """GetItems. - [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. + 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. @@ -924,14 +924,14 @@ def get_items(self, repository_id, project=None, scope_path=None, recursion_leve query_parameters['versionDescriptor.versionOptions'] = version_descriptor.version_options response = self._send(http_method='GET', location_id='fb93c0db-47ed-4a31-8c20-47552878fb44', - version='5.1-preview.1', + version='5.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, **kwargs): """GetItemText. - [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. + 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 @@ -976,7 +976,7 @@ def get_item_text(self, repository_id, path, project=None, scope_path=None, recu query_parameters['resolveLfs'] = self._serialize.query('resolve_lfs', resolve_lfs, 'bool') response = self._send(http_method='GET', location_id='fb93c0db-47ed-4a31-8c20-47552878fb44', - version='5.1-preview.1', + version='5.1', route_values=route_values, query_parameters=query_parameters, accept_media_type='text/plain') @@ -988,7 +988,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, **kwargs): """GetItemZip. - [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. + 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 @@ -1033,7 +1033,7 @@ def get_item_zip(self, repository_id, path, project=None, scope_path=None, recur query_parameters['resolveLfs'] = self._serialize.query('resolve_lfs', resolve_lfs, 'bool') response = self._send(http_method='GET', location_id='fb93c0db-47ed-4a31-8c20-47552878fb44', - version='5.1-preview.1', + version='5.1', route_values=route_values, query_parameters=query_parameters, accept_media_type='application/zip') @@ -1045,7 +1045,7 @@ 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. - [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 + 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 @@ -1059,7 +1059,7 @@ 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='5.1-preview.1', + version='5.1', route_values=route_values, content=content) return self._deserialize('[[GitItem]]', self._unwrap_collection(response)) @@ -1395,7 +1395,7 @@ def get_likes(self, repository_id, pull_request_id, thread_id, comment_id, proje def get_pull_request_iteration_commits(self, repository_id, pull_request_id, iteration_id, project=None, top=None, skip=None): """GetPullRequestIterationCommits. - [Preview API] Get the commits for the specified iteration of a pull request. + 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. @@ -1420,14 +1420,14 @@ 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='5.1-preview.1', + version='5.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): """GetPullRequestCommits. - [Preview API] Get the commits for the specified pull request. + 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 @@ -1442,13 +1442,13 @@ def get_pull_request_commits(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='52823034-34a8-4576-922c-8d8b77e9e4c4', - version='5.1-preview.1', + version='5.1', route_values=route_values) 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. - [Preview API] Retrieve the changes made in a pull request between two iterations. + 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 IDs are zero-based with zero indicating the common commit between the source and target branches. 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. @@ -1476,14 +1476,14 @@ 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='5.1-preview.1', + version='5.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. - [Preview API] Get the specified iteration for a pull request. + 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. @@ -1501,13 +1501,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='5.1-preview.1', + version='5.1', 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. - [Preview API] Get the list of iterations for the specified pull request. + 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 @@ -1526,7 +1526,7 @@ 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='5.1-preview.1', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[GitPullRequestIteration]', self._unwrap_collection(response)) @@ -1819,7 +1819,7 @@ def update_pull_request_properties(self, patch_document, repository_id, pull_req def get_pull_request_query(self, queries, repository_id, project=None): """GetPullRequestQuery. - [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. + 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 @@ -1833,14 +1833,14 @@ 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='5.1-preview.1', + version='5.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. - [Preview API] Add a reviewer to a pull request or cast a vote. + 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. @@ -1860,14 +1860,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='5.1-preview.1', + version='5.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. - [Preview API] Add reviewers to a pull request. + 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. @@ -1884,14 +1884,14 @@ 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='5.1-preview.1', + version='5.1', route_values=route_values, content=content) return self._deserialize('[IdentityRefWithVote]', self._unwrap_collection(response)) def delete_pull_request_reviewer(self, repository_id, pull_request_id, reviewer_id, project=None): """DeletePullRequestReviewer. - [Preview API] Remove a reviewer from a pull request. + 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. @@ -1908,12 +1908,12 @@ 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='5.1-preview.1', + version='5.1', route_values=route_values) def get_pull_request_reviewer(self, repository_id, pull_request_id, reviewer_id, project=None): """GetPullRequestReviewer. - [Preview API] Retrieve information about a particular reviewer on a pull request + 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. @@ -1931,13 +1931,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='5.1-preview.1', + version='5.1', route_values=route_values) return self._deserialize('IdentityRefWithVote', response) def get_pull_request_reviewers(self, repository_id, pull_request_id, project=None): """GetPullRequestReviewers. - [Preview API] Retrieve the reviewers for a pull request + 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 @@ -1952,13 +1952,13 @@ 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='5.1-preview.1', + version='5.1', route_values=route_values) return self._deserialize('[IdentityRefWithVote]', self._unwrap_collection(response)) def update_pull_request_reviewers(self, patch_votes, repository_id, pull_request_id, project=None): """UpdatePullRequestReviewers. - [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. + 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 @@ -1974,13 +1974,13 @@ 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='5.1-preview.1', + version='5.1', route_values=route_values, content=content) def get_pull_request_by_id(self, pull_request_id, project=None): """GetPullRequestById. - [Preview API] Retrieve a pull request. + 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:` ` @@ -1992,13 +1992,13 @@ 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='5.1-preview.1', + version='5.1', 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. - [Preview API] Retrieve all pull requests matching a specified criteria. + 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 int max_comment_length: Not used. @@ -2035,14 +2035,14 @@ 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='5.1-preview.1', + version='5.1', 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. - [Preview API] Create a pull request. + 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 @@ -2060,7 +2060,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='5.1-preview.1', + version='5.1', route_values=route_values, query_parameters=query_parameters, content=content) @@ -2068,7 +2068,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. - [Preview API] Retrieve a pull request. + 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 @@ -2099,14 +2099,14 @@ 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='5.1-preview.1', + version='5.1', 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. - [Preview API] Retrieve all pull requests matching a specified criteria. + 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 str project: Project ID or project name @@ -2146,14 +2146,14 @@ 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='5.1-preview.1', + version='5.1', 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. - [Preview API] Update a pull request + 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. @@ -2170,7 +2170,7 @@ 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='5.1-preview.1', + version='5.1', route_values=route_values, content=content) return self._deserialize('GitPullRequest', response) @@ -2313,7 +2313,7 @@ def update_pull_request_statuses(self, patch_document, repository_id, pull_reque def create_comment(self, comment, repository_id, pull_request_id, thread_id, project=None): """CreateComment. - [Preview API] Create a comment on a specific thread in a pull request (up to 500 comments can be created per thread). + 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. @@ -2333,14 +2333,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='5.1-preview.1', + version='5.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. - [Preview API] Delete a comment associated with a specific thread in a pull request. + 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. @@ -2360,12 +2360,12 @@ 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='5.1-preview.1', + version='5.1', route_values=route_values) def get_comment(self, repository_id, pull_request_id, thread_id, comment_id, project=None): """GetComment. - [Preview API] Retrieve a comment associated with a specific thread in a pull request. + 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. @@ -2386,13 +2386,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='5.1-preview.1', + version='5.1', route_values=route_values) return self._deserialize('Comment', response) def get_comments(self, repository_id, pull_request_id, thread_id, project=None): """GetComments. - [Preview API] Retrieve all comments associated with a specific thread in a pull request. + 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. @@ -2410,13 +2410,13 @@ 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='5.1-preview.1', + version='5.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. - [Preview API] Update a comment associated with a specific thread in a pull request. + 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. @@ -2439,14 +2439,14 @@ 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='5.1-preview.1', + version='5.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. - [Preview API] Create a thread in a pull request. + 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. @@ -2463,14 +2463,14 @@ 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='5.1-preview.1', + version='5.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. - [Preview API] Retrieve a thread in a pull request. + 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. @@ -2495,14 +2495,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='5.1-preview.1', + version='5.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. - [Preview API] Retrieve all threads in a pull request. + 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 @@ -2524,14 +2524,14 @@ 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='5.1-preview.1', + version='5.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. - [Preview API] Update a thread in a pull request. + 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. @@ -2551,14 +2551,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='5.1-preview.1', + version='5.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. - [Preview API] Retrieve a list of work items associated with a pull request. + 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 @@ -2573,13 +2573,13 @@ 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='5.1-preview.1', + version='5.1', route_values=route_values) return self._deserialize('[ResourceRef]', self._unwrap_collection(response)) def create_push(self, push, repository_id, project=None): """CreatePush. - [Preview API] Push changes to the repository. + 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 @@ -2593,14 +2593,14 @@ 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='5.1-preview.2', + version='5.1', 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. - [Preview API] Retrieves a particular push. + 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 @@ -2622,14 +2622,14 @@ 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='5.1-preview.2', + version='5.1', 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. - [Preview API] Retrieves pushes associated with the specified repository. + 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. @@ -2662,7 +2662,7 @@ 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='5.1-preview.2', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[GitPush]', self._unwrap_collection(response)) @@ -2721,7 +2721,7 @@ def restore_repository_from_recycle_bin(self, repository_details, project, repos 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): """GetRefs. - [Preview API] Queries the provided repository for its refs and returns them. + 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). @@ -2755,14 +2755,14 @@ def get_refs(self, repository_id, project=None, filter=None, include_links=None, query_parameters['filterContains'] = self._serialize.query('filter_contains', filter_contains, 'str') response = self._send(http_method='GET', location_id='2d874a60-a811-4f62-9c9f-963a6ea0a55b', - version='5.1-preview.1', + version='5.1', 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. - [Preview API] Lock or Unlock a branch. + 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 @@ -2783,7 +2783,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='5.1-preview.1', + version='5.1', route_values=route_values, query_parameters=query_parameters, content=content) @@ -2791,7 +2791,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. - [Preview API] Creating, updating, or deleting refs(branches). + 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 @@ -2809,7 +2809,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='5.1-preview.1', + version='5.1', route_values=route_values, query_parameters=query_parameters, content=content) @@ -2892,7 +2892,7 @@ def get_ref_favorites(self, project, repository_id=None, identity_id=None): def create_repository(self, git_repository_to_create, project=None, source_ref=None): """CreateRepository. - [Preview API] Create a git repository in a team project. + 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 ommitted 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 @@ -2907,7 +2907,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='5.1-preview.1', + version='5.1', route_values=route_values, query_parameters=query_parameters, content=content) @@ -2915,7 +2915,7 @@ def create_repository(self, git_repository_to_create, project=None, source_ref=N def delete_repository(self, repository_id, project=None): """DeleteRepository. - [Preview API] Delete a git repository + Delete a git repository :param str repository_id: The name or ID of the repository. :param str project: Project ID or project name """ @@ -2926,12 +2926,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='5.1-preview.1', + version='5.1', route_values=route_values) def get_repositories(self, project=None, include_links=None, include_all_urls=None, include_hidden=None): """GetRepositories. - [Preview API] Retrieve git repositories. + 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. @@ -2950,14 +2950,14 @@ 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='5.1-preview.1', + version='5.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. - [Preview API] Retrieve a git repository. + 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:` ` @@ -2969,13 +2969,13 @@ 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='5.1-preview.1', + version='5.1', route_values=route_values) return self._deserialize('GitRepository', response) def get_repository_with_parent(self, repository_id, include_parent, project=None): """GetRepositoryWithParent. - [Preview API] Retrieve a git repository. + 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 @@ -2991,14 +2991,14 @@ 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='5.1-preview.1', + version='5.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. - [Preview API] Updates the Git repository with either a new repo name or a new default branch. + 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 name or ID of the repository. :param str project: Project ID or project name @@ -3012,7 +3012,7 @@ 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='5.1-preview.1', + version='5.1', route_values=route_values, content=content) return self._deserialize('GitRepository', response) @@ -3102,7 +3102,7 @@ def get_revert_for_ref_name(self, project, repository_id, ref_name): def create_commit_status(self, git_commit_status_to_create, commit_id, repository_id, project=None): """CreateCommitStatus. - [Preview API] Create Git commit status. + 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. @@ -3119,14 +3119,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='5.1-preview.1', + version='5.1', 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. - [Preview API] Get statuses associated with the Git commit. + 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 @@ -3151,7 +3151,7 @@ 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='5.1-preview.1', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[GitStatus]', self._unwrap_collection(response)) @@ -3176,7 +3176,7 @@ def get_suggestions(self, repository_id, project=None): def get_tree(self, repository_id, sha1, project=None, project_id=None, recursive=None, file_name=None): """GetTree. - [Preview API] The Tree endpoint returns the collection of objects underneath the specified tree. Trees are folders in a Git repository. + 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 @@ -3201,14 +3201,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='5.1-preview.1', + version='5.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. - [Preview API] The Tree endpoint returns the collection of objects underneath the specified tree. Trees are folders in a Git repository. + 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 @@ -3233,7 +3233,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='5.1-preview.1', + version='5.1', route_values=route_values, query_parameters=query_parameters, accept_media_type='application/zip') diff --git a/azure-devops/azure/devops/v5_1/graph/graph_client.py b/azure-devops/azure/devops/v5_1/graph/graph_client.py index 7140e23b..c6dff52f 100644 --- a/azure-devops/azure/devops/v5_1/graph/graph_client.py +++ b/azure-devops/azure/devops/v5_1/graph/graph_client.py @@ -94,7 +94,7 @@ def get_descriptor(self, storage_key): def create_group(self, creation_context, scope_descriptor=None, group_descriptors=None): """CreateGroup. - [Preview API] Create a new VSTS group or materialize an existing AAD group. + [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 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 @@ -116,7 +116,7 @@ def create_group(self, creation_context, scope_descriptor=None, group_descriptor def delete_group(self, group_descriptor): """DeleteGroup. - [Preview API] Removes a VSTS group from all of its parent groups. + [Preview API] Removes an Azure DevOps group from all of its parent groups. :param str group_descriptor: The descriptor of the group to delete. """ route_values = {} @@ -169,7 +169,7 @@ def list_groups(self, scope_descriptor=None, subject_types=None, continuation_to def update_group(self, group_descriptor, patch_document): """UpdateGroup. - [Preview API] Update the properties of a VSTS group. + [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:` ` diff --git a/azure-devops/azure/devops/v5_1/identity/identity_client.py b/azure-devops/azure/devops/v5_1/identity/identity_client.py index 2bf199ad..f488d5e2 100644 --- a/azure-devops/azure/devops/v5_1/identity/identity_client.py +++ b/azure-devops/azure/devops/v5_1/identity/identity_client.py @@ -60,20 +60,18 @@ def get_descriptor_by_id(self, id, is_master_id=None): def create_groups(self, container): """CreateGroups. - [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='5.1-preview.1', + version='5.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 = {} @@ -81,12 +79,11 @@ 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='5.1-preview.1', + version='5.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: @@ -104,13 +101,12 @@ 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='5.1-preview.1', + version='5.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: @@ -131,13 +127,12 @@ 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='5.1-preview.1', + version='5.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] """ @@ -146,13 +141,12 @@ 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='5.1-preview.1', + version='5.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. - [Preview API] :param str descriptors: :param str identity_ids: :param str subject_descriptors: @@ -188,13 +182,12 @@ 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='5.1-preview.1', + version='5.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: @@ -209,13 +202,12 @@ 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='5.1-preview.1', + version='5.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: @@ -231,27 +223,25 @@ 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='5.1-preview.1', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('Identity', response) def update_identities(self, identities): """UpdateIdentities. - [Preview API] :param :class:` ` identities: :rtype: [IdentityUpdateData] """ content = self._serialize.body(identities, 'VssJsonCollectionWrapper') response = self._send(http_method='PUT', location_id='28010c54-d0c0-4c89-a5b0-1c9e188b9fb7', - version='5.1-preview.1', + version='5.1', content=content) return self._deserialize('[IdentityUpdateData]', self._unwrap_collection(response)) def update_identity(self, identity, identity_id): """UpdateIdentity. - [Preview API] :param :class:` ` identity: :param str identity_id: """ @@ -261,20 +251,19 @@ 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='5.1-preview.1', + version='5.1', route_values=route_values, content=content) def create_identity(self, framework_identity_info): """CreateIdentity. - [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='5.1-preview.1', + version='5.1', content=content) return self._deserialize('Identity', response) @@ -308,22 +297,22 @@ def get_identity_snapshot(self, scope_id): def get_max_sequence_id(self): """GetMaxSequenceId. - [Preview API] Read the max sequence id of all the identities. + 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='5.1-preview.1') + version='5.1') return self._deserialize('long', response) def get_self(self): """GetSelf. - [Preview API] Read identity of the home tenant request user. + Read identity of the home tenant request user. :rtype: :class:` ` """ response = self._send(http_method='GET', location_id='4bb02b5b-c120-4be2-b68e-21f7c50a4b82', - version='5.1-preview.1') + version='5.1') return self._deserialize('IdentitySelf', response) def add_member(self, container_id, member_id): diff --git a/azure-devops/azure/devops/v5_1/notification/models.py b/azure-devops/azure/devops/v5_1/notification/models.py index 0ca251cf..7269fc5b 100644 --- a/azure-devops/azure/devops/v5_1/notification/models.py +++ b/azure-devops/azure/devops/v5_1/notification/models.py @@ -1304,7 +1304,7 @@ def __init__(self, min_events_created_date=None, subscription_create_parameters= class SubscriptionEvaluationResult(Model): """ - Ecapsulates the subscription evaluation results. It defines the Date Interval that was used, number of events evaluated and events and notifications results + Encapsulates the subscription evaluation results. It defines the Date Interval that was used, number of events evaluated and events and notifications results :param evaluation_job_status: Subscription evaluation job status :type evaluation_job_status: object diff --git a/azure-devops/azure/devops/v5_1/notification/notification_client.py b/azure-devops/azure/devops/v5_1/notification/notification_client.py index afdaa388..79432865 100644 --- a/azure-devops/azure/devops/v5_1/notification/notification_client.py +++ b/azure-devops/azure/devops/v5_1/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. - [Preview API] List diagnostic logs this service. + List diagnostic logs this service. :param str source: :param str entry_id: :param datetime start_time: @@ -46,14 +46,13 @@ 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='5.1-preview.1', + version='5.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. - [Preview API] :param str subscription_id: :rtype: :class:` ` """ @@ -62,13 +61,12 @@ def get_subscription_diagnostics(self, subscription_id): 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='5.1-preview.1', + version='5.1', route_values=route_values) return self._deserialize('SubscriptionDiagnostics', response) def update_subscription_diagnostics(self, update_parameters, subscription_id): """UpdateSubscriptionDiagnostics. - [Preview API] :param :class:` ` update_parameters: :param str subscription_id: :rtype: :class:` ` @@ -79,14 +77,14 @@ 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='5.1-preview.1', + version='5.1', route_values=route_values, content=content) return self._deserialize('SubscriptionDiagnostics', response) def get_event_type(self, event_type): """GetEventType. - [Preview API] Get a specific event type. + Get a specific event type. :param str event_type: :rtype: :class:` ` """ @@ -95,13 +93,13 @@ def get_event_type(self, event_type): 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='5.1-preview.1', + version='5.1', route_values=route_values) return self._deserialize('NotificationEventType', response) def list_event_types(self, publisher_id=None): """ListEventTypes. - [Preview API] List available event types for this service. Optionally filter by only event types for the specified publisher. + 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,36 +108,33 @@ 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='5.1-preview.1', + version='5.1', query_parameters=query_parameters) return self._deserialize('[NotificationEventType]', self._unwrap_collection(response)) def get_settings(self): """GetSettings. - [Preview API] :rtype: :class:` ` """ response = self._send(http_method='GET', location_id='cbe076d8-2803-45ff-8d8d-44653686ea2a', - version='5.1-preview.1') + version='5.1') return self._deserialize('NotificationAdminSettings', response) def update_settings(self, update_parameters): """UpdateSettings. - [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='5.1-preview.1', + version='5.1', content=content) return self._deserialize('NotificationAdminSettings', response) def get_subscriber(self, subscriber_id): """GetSubscriber. - [Preview API] :param str subscriber_id: :rtype: :class:` ` """ @@ -148,13 +143,12 @@ def get_subscriber(self, subscriber_id): 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='5.1-preview.1', + version='5.1', route_values=route_values) return self._deserialize('NotificationSubscriber', response) def update_subscriber(self, update_parameters, subscriber_id): """UpdateSubscriber. - [Preview API] :param :class:` ` update_parameters: :param str subscriber_id: :rtype: :class:` ` @@ -165,40 +159,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='5.1-preview.1', + version='5.1', route_values=route_values, content=content) return self._deserialize('NotificationSubscriber', response) def query_subscriptions(self, subscription_query): """QuerySubscriptions. - [Preview API] Query for subscriptions. A subscription is returned if it matches one or more of the specified conditions. + 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='5.1-preview.1', + version='5.1', content=content) return self._deserialize('[NotificationSubscription]', self._unwrap_collection(response)) def create_subscription(self, create_parameters): """CreateSubscription. - [Preview API] Create a new subscription. + 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='5.1-preview.1', + version='5.1', content=content) return self._deserialize('NotificationSubscription', response) def delete_subscription(self, subscription_id): """DeleteSubscription. - [Preview API] Delete a subscription. + Delete a subscription. :param str subscription_id: """ route_values = {} @@ -206,12 +200,12 @@ 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='5.1-preview.1', + version='5.1', route_values=route_values) def get_subscription(self, subscription_id, query_flags=None): """GetSubscription. - [Preview API] Get a notification subscription by its ID. + Get a notification subscription by its ID. :param str subscription_id: :param str query_flags: :rtype: :class:` ` @@ -224,14 +218,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='5.1-preview.1', + version='5.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. - [Preview API] Get a list of notification subscriptions, either by subscription IDs or by all subscriptions for a given user or group. + 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: @@ -247,13 +241,13 @@ 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='5.1-preview.1', + version='5.1', query_parameters=query_parameters) return self._deserialize('[NotificationSubscription]', self._unwrap_collection(response)) def update_subscription(self, update_parameters, subscription_id): """UpdateSubscription. - [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. + 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:` ` @@ -264,24 +258,24 @@ 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='5.1-preview.1', + version='5.1', route_values=route_values, content=content) return self._deserialize('NotificationSubscription', response) def get_subscription_templates(self): """GetSubscriptionTemplates. - [Preview API] Get available subscription templates. + Get available subscription templates. :rtype: [NotificationSubscriptionTemplate] """ response = self._send(http_method='GET', location_id='fa5d24ba-7484-4f3d-888d-4ec6b1974082', - version='5.1-preview.1') + version='5.1') return self._deserialize('[NotificationSubscriptionTemplate]', self._unwrap_collection(response)) def update_subscription_user_settings(self, user_settings, subscription_id, user_id): """UpdateSubscriptionUserSettings. - [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. + 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 @@ -295,7 +289,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='5.1-preview.1', + version='5.1', route_values=route_values, content=content) return self._deserialize('SubscriptionUserSettings', response) diff --git a/azure-devops/azure/devops/v5_1/operations/operations_client.py b/azure-devops/azure/devops/v5_1/operations/operations_client.py index 4421e686..67f763c4 100644 --- a/azure-devops/azure/devops/v5_1/operations/operations_client.py +++ b/azure-devops/azure/devops/v5_1/operations/operations_client.py @@ -27,7 +27,7 @@ def __init__(self, base_url=None, creds=None): def get_operation(self, operation_id, plugin_id=None): """GetOperation. - [Preview API] Gets an operation from the the operationId using the given pluginId. + Gets an operation from the 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:` ` @@ -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='5.1-preview.1', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('Operation', response) diff --git a/azure-devops/azure/devops/v5_1/policy/policy_client.py b/azure-devops/azure/devops/v5_1/policy/policy_client.py index d3690f95..e02f224e 100644 --- a/azure-devops/azure/devops/v5_1/policy/policy_client.py +++ b/azure-devops/azure/devops/v5_1/policy/policy_client.py @@ -27,7 +27,7 @@ def __init__(self, base_url=None, creds=None): def create_policy_configuration(self, configuration, project, configuration_id=None): """CreatePolicyConfiguration. - [Preview API] Create a policy configuration of a given policy type. + 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: @@ -41,14 +41,14 @@ def create_policy_configuration(self, configuration, project, configuration_id=N content = self._serialize.body(configuration, 'PolicyConfiguration') response = self._send(http_method='POST', location_id='dad91cbe-d183-45f8-9c6e-9c1164472121', - version='5.1-preview.1', + version='5.1', route_values=route_values, content=content) return self._deserialize('PolicyConfiguration', response) def delete_policy_configuration(self, project, configuration_id): """DeletePolicyConfiguration. - [Preview API] Delete a policy configuration by its ID. + 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,12 +59,12 @@ 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='5.1-preview.1', + version='5.1', route_values=route_values) def get_policy_configuration(self, project, configuration_id): """GetPolicyConfiguration. - [Preview API] Get a policy configuration by its ID. + 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:` ` @@ -76,13 +76,13 @@ 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='5.1-preview.1', + version='5.1', route_values=route_values) return self._deserialize('PolicyConfiguration', response) def get_policy_configurations(self, project, scope=None, policy_type=None): """GetPolicyConfigurations. - [Preview API] Get a list of policy configurations in a project. + 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 str policy_type: Filter returned policies to only this type @@ -98,14 +98,14 @@ def get_policy_configurations(self, project, scope=None, policy_type=None): 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='5.1-preview.1', + version='5.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. - [Preview API] Update a policy configuration by its ID. + 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. @@ -119,7 +119,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='5.1-preview.1', + version='5.1', route_values=route_values, content=content) return self._deserialize('PolicyConfiguration', response) @@ -191,7 +191,7 @@ def get_policy_evaluations(self, project, artifact_id, include_not_applicable=No def get_policy_configuration_revision(self, project, configuration_id, revision_id): """GetPolicyConfigurationRevision. - [Preview API] Retrieve a specific revision of a given policy by ID. + 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. @@ -206,13 +206,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='5.1-preview.1', + version='5.1', route_values=route_values) return self._deserialize('PolicyConfiguration', response) def get_policy_configuration_revisions(self, project, configuration_id, top=None, skip=None): """GetPolicyConfigurationRevisions. - [Preview API] Retrieve all revisions for a given policy. + 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. @@ -231,14 +231,14 @@ 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='5.1-preview.1', + version='5.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. - [Preview API] Retrieve a specific policy type by ID. + Retrieve a specific policy type by ID. :param str project: Project ID or project name :param str type_id: The policy ID. :rtype: :class:` ` @@ -250,13 +250,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='5.1-preview.1', + version='5.1', route_values=route_values) return self._deserialize('PolicyType', response) def get_policy_types(self, project): """GetPolicyTypes. - [Preview API] Retrieve all available policy types. + Retrieve all available policy types. :param str project: Project ID or project name :rtype: [PolicyType] """ @@ -265,7 +265,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='5.1-preview.1', + version='5.1', route_values=route_values) return self._deserialize('[PolicyType]', self._unwrap_collection(response)) diff --git a/azure-devops/azure/devops/v5_1/profile/profile_client.py b/azure-devops/azure/devops/v5_1/profile/profile_client.py index 5fe6df3a..7d4d11a6 100644 --- a/azure-devops/azure/devops/v5_1/profile/profile_client.py +++ b/azure-devops/azure/devops/v5_1/profile/profile_client.py @@ -27,7 +27,7 @@ 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. - [Preview API] Gets a user profile. + 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. @@ -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='5.1-preview.3', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('Profile', response) diff --git a/azure-devops/azure/devops/v5_1/release/release_client.py b/azure-devops/azure/devops/v5_1/release/release_client.py index c11e96dd..68f20c66 100644 --- a/azure-devops/azure/devops/v5_1/release/release_client.py +++ b/azure-devops/azure/devops/v5_1/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. - [Preview API] Get a list of approvals + 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'. @@ -62,14 +62,14 @@ 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='5.1-preview.3', + version='5.1', 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. - [Preview API] Update status of an approval + 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. @@ -83,7 +83,7 @@ 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='5.1-preview.3', + version='5.1', route_values=route_values, content=content) return self._deserialize('ReleaseApproval', response) @@ -164,7 +164,7 @@ def get_release_task_attachments(self, project, release_id, environment_id, atte def create_release_definition(self, release_definition, project): """CreateReleaseDefinition. - [Preview API] Create a release definition + Create a release definition :param :class:` ` release_definition: release definition object to create. :param str project: Project ID or project name :rtype: :class:` ` @@ -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='5.1-preview.3', + version='5.1', 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. - [Preview API] Delete a release definition. + 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,13 +200,13 @@ 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='5.1-preview.3', + version='5.1', route_values=route_values, query_parameters=query_parameters) def get_release_definition(self, project, definition_id, property_filters=None): """GetReleaseDefinition. - [Preview API] Get a release definition. + 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. @@ -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='5.1-preview.3', + version='5.1', 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. - [Preview API] Get a list of release definitions. + 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. @@ -285,14 +285,14 @@ 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='5.1-preview.3', + version='5.1', 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. - [Preview API] Update a release definition. + Update a release definition. :param :class:` ` release_definition: Release definition object to update. :param str project: Project ID or project name :rtype: :class:` ` @@ -303,14 +303,13 @@ 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='5.1-preview.3', + version='5.1', 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] :param str project: Project ID or project name :param int definition_id: :param int definition_environment_id: @@ -365,7 +364,7 @@ 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='5.1-preview.2', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[Deployment]', self._unwrap_collection(response)) @@ -561,7 +560,7 @@ 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. - [Preview API] Get manual intervention for a given release and manual intervention id. + 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. @@ -576,13 +575,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='5.1-preview.1', + version='5.1', route_values=route_values) return self._deserialize('ManualIntervention', response) def get_manual_interventions(self, project, release_id): """GetManualInterventions. - [Preview API] List all manual interventions for a given release. + 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] @@ -594,13 +593,13 @@ 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='5.1-preview.1', + version='5.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. - [Preview API] Update manual intervention. + 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. @@ -617,14 +616,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='5.1-preview.1', + version='5.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. - [Preview API] Get a list of releases + 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: @@ -700,14 +699,14 @@ 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='5.1-preview.8', + version='5.1', 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. - [Preview API] Create a release. + Create a release. :param :class:` ` release_start_metadata: Metadata to create a release. :param str project: Project ID or project name :rtype: :class:` ` @@ -718,14 +717,14 @@ 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='5.1-preview.8', + version='5.1', 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. - [Preview API] Get a Release + 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 @@ -751,14 +750,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='5.1-preview.8', + version='5.1', 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. - [Preview API] Get release for a given revision number. + 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. @@ -774,7 +773,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='5.1-preview.8', + version='5.1', route_values=route_values, query_parameters=query_parameters, accept_media_type='text/plain') @@ -786,7 +785,7 @@ def get_release_revision(self, project, release_id, definition_snapshot_revision def update_release(self, release, project, release_id): """UpdateRelease. - [Preview API] Update a complete release object. + 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. @@ -800,14 +799,14 @@ 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='5.1-preview.8', + version='5.1', route_values=route_values, content=content) return self._deserialize('Release', response) def update_release_resource(self, release_update_metadata, project, release_id): """UpdateReleaseResource. - [Preview API] Update few properties of a release. + 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. @@ -821,7 +820,7 @@ 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='5.1-preview.8', + version='5.1', route_values=route_values, content=content) return self._deserialize('Release', response) diff --git a/azure-devops/azure/devops/v5_1/security/security_client.py b/azure-devops/azure/devops/v5_1/security/security_client.py index 58bda84a..f27d635f 100644 --- a/azure-devops/azure/devops/v5_1/security/security_client.py +++ b/azure-devops/azure/devops/v5_1/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. - [Preview API] Remove the specified ACEs from the ACL belonging to the specified token. + 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,14 +43,14 @@ 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='5.1-preview.1', + version='5.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. - [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. + 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='5.1-preview.1', + version='5.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. - [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. + 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='5.1-preview.1', + version='5.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. - [Preview API] Remove access control lists under the specfied security namespace. + 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,14 +113,14 @@ 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='5.1-preview.1', + version='5.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. - [Preview API] Create or update one or more access control lists. All data that currently exists for the ACLs supplied will be overwritten. + 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. """ @@ -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='5.1-preview.1', + version='5.1', route_values=route_values, content=content) def has_permissions_batch(self, eval_batch): """HasPermissionsBatch. - [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. + 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='5.1-preview.1', + version='5.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. - [Preview API] Evaluates whether the caller has the specified permissions on the specified set of security tokens. + 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,14 +171,14 @@ 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='5.1-preview.2', + version='5.1', 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. - [Preview API] Removes the specified permissions on a security token for a user or group. + 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. @@ -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='5.1-preview.2', + version='5.1', 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. - [Preview API] List all security namespaces or just the specified namespace. + 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='5.1-preview.1', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[SecurityNamespaceDescription]', self._unwrap_collection(response)) diff --git a/azure-devops/azure/devops/v5_1/service_endpoint/models.py b/azure-devops/azure/devops/v5_1/service_endpoint/models.py index 93d236a5..4d47083d 100644 --- a/azure-devops/azure/devops/v5_1/service_endpoint/models.py +++ b/azure-devops/azure/devops/v5_1/service_endpoint/models.py @@ -1156,7 +1156,7 @@ def __init__(self, _links=None, id=None, name=None): class ServiceEndpointExecutionRecord(Model): """ - Represents the details of service ednpoint execution. + Represents the details of service endpoint execution. :param data: Gets the execution data of service endpoint execution. :type data: :class:`ServiceEndpointExecutionData ` diff --git a/azure-devops/azure/devops/v5_1/service_hooks/models.py b/azure-devops/azure/devops/v5_1/service_hooks/models.py index 50557b93..916159c3 100644 --- a/azure-devops/azure/devops/v5_1/service_hooks/models.py +++ b/azure-devops/azure/devops/v5_1/service_hooks/models.py @@ -909,7 +909,7 @@ class PublisherEvent(Model): :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 ` - :param subscription: Gets or sets matchd hooks subscription which caused this event. + :param subscription: Gets or sets matched hooks subscription which caused this event. :type subscription: :class:`Subscription ` """ diff --git a/azure-devops/azure/devops/v5_1/service_hooks/service_hooks_client.py b/azure-devops/azure/devops/v5_1/service_hooks/service_hooks_client.py index af582ffd..0e95630c 100644 --- a/azure-devops/azure/devops/v5_1/service_hooks/service_hooks_client.py +++ b/azure-devops/azure/devops/v5_1/service_hooks/service_hooks_client.py @@ -27,7 +27,7 @@ def __init__(self, base_url=None, creds=None): def get_consumer_action(self, consumer_id, consumer_action_id, publisher_id=None): """GetConsumerAction. - [Preview API] Get details about a specific consumer action. + 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: @@ -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='5.1-preview.1', + version='5.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. - [Preview API] Get a list of consumer actions for a specific consumer. + 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,14 +63,14 @@ 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='5.1-preview.1', + version='5.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. - [Preview API] Get a specific consumer service. Optionally filter out consumer actions that do not support any event types for the specified publisher. + 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:` ` @@ -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='5.1-preview.1', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('Consumer', response) def list_consumers(self, publisher_id=None): """ListConsumers. - [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. + 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,7 +99,7 @@ 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='5.1-preview.1', + version='5.1', query_parameters=query_parameters) return self._deserialize('[Consumer]', self._unwrap_collection(response)) @@ -138,7 +138,7 @@ def update_subscription_diagnostics(self, update_parameters, subscription_id): def get_event_type(self, publisher_id, event_type_id): """GetEventType. - [Preview API] Get a specific event type. + Get a specific event type. :param str publisher_id: ID for a publisher. :param str event_type_id: :rtype: :class:` ` @@ -150,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='5.1-preview.1', + version='5.1', route_values=route_values) return self._deserialize('EventTypeDescriptor', response) def list_event_types(self, publisher_id): """ListEventTypes. - [Preview API] Get the event types for a specific publisher. + Get the event types for a specific publisher. :param str publisher_id: ID for a publisher. :rtype: [EventTypeDescriptor] """ @@ -165,13 +165,13 @@ 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='5.1-preview.1', + version='5.1', route_values=route_values) return self._deserialize('[EventTypeDescriptor]', self._unwrap_collection(response)) def get_notification(self, subscription_id, notification_id): """GetNotification. - [Preview API] Get a specific notification for a subscription. + Get a specific notification for a subscription. :param str subscription_id: ID for a subscription. :param int notification_id: :rtype: :class:` ` @@ -183,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='5.1-preview.1', + version='5.1', route_values=route_values) return self._deserialize('Notification', response) def get_notifications(self, subscription_id, max_results=None, status=None, result=None): """GetNotifications. - [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. + 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. @@ -208,27 +208,26 @@ 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='5.1-preview.1', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[Notification]', self._unwrap_collection(response)) def query_notifications(self, query): """QueryNotifications. - [Preview API] Query for notifications. A notification includes details about the event, the request to and the response from the consumer service. + 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='5.1-preview.1', + version='5.1', content=content) return self._deserialize('NotificationsQuery', response) def query_input_values(self, input_values_query, publisher_id): """QueryInputValues. - [Preview API] :param :class:` ` input_values_query: :param str publisher_id: :rtype: :class:` ` @@ -239,14 +238,14 @@ 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='5.1-preview.1', + version='5.1', route_values=route_values, content=content) return self._deserialize('InputValuesQuery', response) def get_publisher(self, publisher_id): """GetPublisher. - [Preview API] Get a specific service hooks publisher. + Get a specific service hooks publisher. :param str publisher_id: ID for a publisher. :rtype: :class:` ` """ @@ -255,49 +254,49 @@ def get_publisher(self, publisher_id): 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='5.1-preview.1', + version='5.1', route_values=route_values) return self._deserialize('Publisher', response) def list_publishers(self): """ListPublishers. - [Preview API] Get a list of publishers. + Get a list of publishers. :rtype: [Publisher] """ response = self._send(http_method='GET', location_id='1e83a210-5b53-43bc-90f0-d476a4e5d731', - version='5.1-preview.1') + version='5.1') return self._deserialize('[Publisher]', self._unwrap_collection(response)) def query_publishers(self, query): """QueryPublishers. - [Preview API] Query for service hook publishers. + 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='5.1-preview.1', + version='5.1', content=content) return self._deserialize('PublishersQuery', response) def create_subscription(self, subscription): """CreateSubscription. - [Preview API] Create a subscription. + 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='5.1-preview.1', + version='5.1', content=content) return self._deserialize('Subscription', response) def delete_subscription(self, subscription_id): """DeleteSubscription. - [Preview API] Delete a specific service hooks subscription. + Delete a specific service hooks subscription. :param str subscription_id: ID for a subscription. """ route_values = {} @@ -305,12 +304,12 @@ 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='5.1-preview.1', + version='5.1', route_values=route_values) def get_subscription(self, subscription_id): """GetSubscription. - [Preview API] Get a specific service hooks subscription. + Get a specific service hooks subscription. :param str subscription_id: ID for a subscription. :rtype: :class:` ` """ @@ -319,13 +318,13 @@ def get_subscription(self, subscription_id): 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='5.1-preview.1', + version='5.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. - [Preview API] Get a list of subscriptions. + 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. @@ -343,13 +342,13 @@ 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='5.1-preview.1', + version='5.1', query_parameters=query_parameters) return self._deserialize('[Subscription]', self._unwrap_collection(response)) def replace_subscription(self, subscription, subscription_id=None): """ReplaceSubscription. - [Preview API] Update a subscription. ID for a subscription that you wish to update. + Update a subscription. ID for a subscription that you wish to update. :param :class:` ` subscription: :param str subscription_id: :rtype: :class:` ` @@ -360,27 +359,27 @@ 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='5.1-preview.1', + version='5.1', route_values=route_values, content=content) return self._deserialize('Subscription', response) def create_subscriptions_query(self, query): """CreateSubscriptionsQuery. - [Preview API] Query for service hook subscriptions. + 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='5.1-preview.1', + version='5.1', content=content) return self._deserialize('SubscriptionsQuery', response) def create_test_notification(self, test_notification, use_real_data=None): """CreateTestNotification. - [Preview API] Sends a test notification. This is useful for verifying the configuration of an updated or new service hooks subscription. + 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:` ` @@ -391,7 +390,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='5.1-preview.1', + version='5.1', query_parameters=query_parameters, content=content) return self._deserialize('Notification', response) diff --git a/azure-devops/azure/devops/v5_1/task/task_client.py b/azure-devops/azure/devops/v5_1/task/task_client.py index f97e3b52..c5fc569e 100644 --- a/azure-devops/azure/devops/v5_1/task/task_client.py +++ b/azure-devops/azure/devops/v5_1/task/task_client.py @@ -193,7 +193,6 @@ def get_attachments(self, scope_identifier, hub_name, plan_id, timeline_id, reco def append_log_content(self, upload_stream, scope_identifier, hub_name, plan_id, log_id, **kwargs): """AppendLogContent. - [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 @@ -217,7 +216,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='5.1-preview.1', + version='5.1', route_values=route_values, content=content, media_type='application/octet-stream') @@ -225,7 +224,6 @@ def append_log_content(self, upload_stream, scope_identifier, hub_name, plan_id, def create_log(self, log, scope_identifier, hub_name, plan_id): """CreateLog. - [Preview API] :param :class:` ` log: :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 @@ -242,14 +240,13 @@ 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='5.1-preview.1', + version='5.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 plan_id: @@ -274,14 +271,13 @@ 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='5.1-preview.1', + version='5.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 plan_id: @@ -296,13 +292,12 @@ 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='5.1-preview.1', + version='5.1', route_values=route_values) return self._deserialize('[TaskLog]', self._unwrap_collection(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 plan_id: @@ -324,14 +319,13 @@ 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='5.1-preview.1', + version='5.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. - [Preview API] :param :class:` ` records: :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 @@ -351,14 +345,13 @@ 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='5.1-preview.1', + version='5.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. - [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 @@ -375,14 +368,13 @@ 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='5.1-preview.1', + version='5.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 plan_id: @@ -399,12 +391,11 @@ 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='5.1-preview.1', + version='5.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 plan_id: @@ -429,14 +420,13 @@ 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='5.1-preview.1', + version='5.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 plan_id: @@ -451,7 +441,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='5.1-preview.1', + version='5.1', route_values=route_values) return self._deserialize('[Timeline]', self._unwrap_collection(response)) diff --git a/azure-devops/azure/devops/v5_1/task_agent/task_agent_client.py b/azure-devops/azure/devops/v5_1/task_agent/task_agent_client.py index e1129f8a..107dad93 100644 --- a/azure-devops/azure/devops/v5_1/task_agent/task_agent_client.py +++ b/azure-devops/azure/devops/v5_1/task_agent/task_agent_client.py @@ -90,7 +90,7 @@ def get_agent_cloud_types(self): def add_agent(self, agent, pool_id): """AddAgent. - [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. + 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:` ` @@ -101,14 +101,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='5.1-preview.1', + version='5.1', route_values=route_values, content=content) return self._deserialize('TaskAgent', response) def delete_agent(self, pool_id, agent_id): """DeleteAgent. - [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. + 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 """ @@ -119,12 +119,12 @@ 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='5.1-preview.1', + version='5.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. - [Preview API] Get information about an agent. + 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 @@ -150,14 +150,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='5.1-preview.1', + version='5.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. - [Preview API] Get a list of agents. + 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 @@ -187,14 +187,14 @@ 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='5.1-preview.1', + version='5.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. - [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. + 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 @@ -208,14 +208,14 @@ 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='5.1-preview.1', + version='5.1', route_values=route_values, content=content) return self._deserialize('TaskAgent', response) def update_agent(self, agent, pool_id, agent_id): """UpdateAgent. - [Preview API] Update agent details. + 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 @@ -229,7 +229,7 @@ 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='5.1-preview.1', + version='5.1', route_values=route_values, content=content) return self._deserialize('TaskAgent', response) @@ -353,20 +353,20 @@ def update_deployment_group(self, deployment_group, project, deployment_group_id def add_agent_pool(self, pool): """AddAgentPool. - [Preview API] Create an agent pool. + 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='5.1-preview.1', + version='5.1', content=content) return self._deserialize('TaskAgentPool', response) def delete_agent_pool(self, pool_id): """DeleteAgentPool. - [Preview API] Delete an agent pool. + Delete an agent pool. :param int pool_id: ID of the agent pool to delete """ route_values = {} @@ -374,12 +374,12 @@ 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='5.1-preview.1', + version='5.1', route_values=route_values) def get_agent_pool(self, pool_id, properties=None, action_filter=None): """GetAgentPool. - [Preview API] Get information about an agent pool. + 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 @@ -396,14 +396,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='5.1-preview.1', + version='5.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. - [Preview API] Get a list of agent pools. + 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 @@ -422,13 +422,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='5.1-preview.1', + version='5.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. - [Preview API] Get a list of agent pools. + 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] @@ -441,13 +441,13 @@ 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='5.1-preview.1', + version='5.1', query_parameters=query_parameters) return self._deserialize('[TaskAgentPool]', self._unwrap_collection(response)) def update_agent_pool(self, pool, pool_id): """UpdateAgentPool. - [Preview API] Update properties on an agent pool + Update properties on an agent pool :param :class:` ` pool: Updated agent pool details :param int pool_id: The agent pool to update :rtype: :class:` ` @@ -458,7 +458,7 @@ 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='5.1-preview.1', + version='5.1', route_values=route_values, content=content) return self._deserialize('TaskAgentPool', response) @@ -955,11 +955,10 @@ def update_variable_group(self, group, project, group_id): def get_yaml_schema(self): """GetYamlSchema. - [Preview API] :rtype: object """ response = self._send(http_method='GET', location_id='1f9990b9-1dba-441f-9c2e-6485888c42b6', - version='5.1-preview.1') + version='5.1') return self._deserialize('object', response) diff --git a/azure-devops/azure/devops/v5_1/test/test_client.py b/azure-devops/azure/devops/v5_1/test/test_client.py index c8fa437f..8add14d5 100644 --- a/azure-devops/azure/devops/v5_1/test/test_client.py +++ b/azure-devops/azure/devops/v5_1/test/test_client.py @@ -27,7 +27,7 @@ def __init__(self, base_url=None, creds=None): def get_action_results(self, project, run_id, test_case_result_id, iteration_id, action_path=None): """GetActionResults. - [Preview API] Gets the action results for an iteration in a test result. + Gets the action results for an iteration in a test 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. @@ -48,7 +48,7 @@ def get_action_results(self, project, run_id, test_case_result_id, iteration_id, route_values['actionPath'] = self._serialize.url('action_path', action_path, 'str') response = self._send(http_method='GET', location_id='eaf40c31-ff84-4062-aafd-d5664be11a37', - version='5.1-preview.3', + version='5.1', route_values=route_values) return self._deserialize('[TestActionResultModel]', self._unwrap_collection(response)) @@ -417,7 +417,7 @@ def get_test_run_code_coverage(self, project, run_id, flags): def get_test_iteration(self, project, run_id, test_case_result_id, iteration_id, include_action_results=None): """GetTestIteration. - [Preview API] Get iteration for a result + 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. @@ -439,14 +439,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='5.1-preview.3', + version='5.1', 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. - [Preview API] Get iterations for a result + 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. @@ -465,14 +465,14 @@ 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='5.1-preview.3', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TestIterationDetailsModel]', self._unwrap_collection(response)) def get_result_parameters(self, project, run_id, test_case_result_id, iteration_id, param_name=None): """GetResultParameters. - [Preview API] Get a list of parameterized results + Get a list of parameterized results :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. @@ -494,14 +494,14 @@ def get_result_parameters(self, project, run_id, test_case_result_id, iteration_ query_parameters['paramName'] = self._serialize.query('param_name', param_name, 'str') response = self._send(http_method='GET', location_id='7c69810d-3354-4af3-844a-180bd25db08a', - version='5.1-preview.3', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TestResultParameterModel]', self._unwrap_collection(response)) def get_point(self, project, plan_id, suite_id, point_ids, wit_fields=None): """GetPoint. - [Preview API] Get a test point. + 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. @@ -523,14 +523,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='5.1-preview.2', + version='5.1', 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. - [Preview API] Get a list of test points. + 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. @@ -567,14 +567,14 @@ 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='5.1-preview.2', + version='5.1', 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. - [Preview API] Update test points. + 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. @@ -594,7 +594,7 @@ 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='5.1-preview.2', + version='5.1', route_values=route_values, content=content) return self._deserialize('[TestPoint]', self._unwrap_collection(response)) @@ -660,7 +660,7 @@ def update_result_retention_settings(self, retention_settings, project): def add_test_results_to_test_run(self, results, project, run_id): """AddTestResultsToTestRun. - [Preview API] Add test results to a test run. + 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. @@ -674,14 +674,14 @@ 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='5.1-preview.6', + version='5.1', 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. - [Preview API] Get a test result for a test run. + 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. @@ -700,14 +700,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='5.1-preview.6', + version='5.1', 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. - [Preview API] Get test results for a test run. + 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. @@ -733,14 +733,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='5.1-preview.6', + version='5.1', 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] Update test results in a test run. + 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. @@ -754,14 +754,14 @@ 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='5.1-preview.6', + version='5.1', route_values=route_values, content=content) 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. + 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:` ` @@ -773,13 +773,13 @@ 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='5.1-preview.3', + version='5.1', route_values=route_values) return self._deserialize('TestRunStatistic', response) def create_test_run(self, test_run, project): """CreateTestRun. - [Preview API] Create new test run. + Create new test run. :param :class:` ` test_run: Run details RunCreateModel :param str project: Project ID or project name :rtype: :class:` ` @@ -790,14 +790,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='5.1-preview.3', + version='5.1', route_values=route_values, content=content) return self._deserialize('TestRun', response) def delete_test_run(self, project, run_id): """DeleteTestRun. - [Preview API] Delete a test run by its ID. + 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. """ @@ -808,12 +808,12 @@ 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='5.1-preview.3', + version='5.1', route_values=route_values) def get_test_run_by_id(self, project, run_id, include_details=None): """GetTestRunById. - [Preview API] Get a test run by its ID. + 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: Defualt value is true. It includes details like run statistics,release,build,Test enviornment,Post process state and more @@ -829,14 +829,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='5.1-preview.3', + version='5.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] Get a list of test runs. + 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. @@ -870,14 +870,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='5.1-preview.3', + version='5.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. + 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). @@ -942,14 +942,14 @@ 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='5.1-preview.3', + version='5.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] Update test run by its ID. + 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. @@ -963,7 +963,7 @@ 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='5.1-preview.3', + version='5.1', route_values=route_values, content=content) return self._deserialize('TestRun', response) @@ -1080,7 +1080,7 @@ def update_test_session(self, test_session, team_context): def add_test_cases_to_suite(self, project, plan_id, suite_id, test_case_ids): """AddTestCasesToSuite. - [Preview API] Add test cases to suite. + 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. @@ -1099,13 +1099,13 @@ 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='5.1-preview.3', + version='5.1', 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. - [Preview API] Get a specific test case in a test suite with test case id. + 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. @@ -1124,13 +1124,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='5.1-preview.3', + version='5.1', route_values=route_values) return self._deserialize('SuiteTestCase', response) def get_test_cases(self, project, plan_id, suite_id): """GetTestCases. - [Preview API] Get all test cases in a suite. + 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. @@ -1146,13 +1146,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='5.1-preview.3', + version='5.1', 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. - [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. + 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. @@ -1170,12 +1170,12 @@ 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='5.1-preview.3', + version='5.1', route_values=route_values) def update_suite_test_cases(self, suite_test_case_update_model, project, plan_id, suite_id, test_case_ids): """UpdateSuiteTestCases. - [Preview API] Updates the properties of the test case association in a suite. + 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. @@ -1196,7 +1196,7 @@ 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='5.1-preview.3', + version='5.1', route_values=route_values, content=content) return self._deserialize('[SuiteTestCase]', self._unwrap_collection(response)) diff --git a/azure-devops/azure/devops/v5_1/test_plan/test_plan_client.py b/azure-devops/azure/devops/v5_1/test_plan/test_plan_client.py index 6c33fb41..2d35db69 100644 --- a/azure-devops/azure/devops/v5_1/test_plan/test_plan_client.py +++ b/azure-devops/azure/devops/v5_1/test_plan/test_plan_client.py @@ -389,7 +389,7 @@ def update_test_suite(self, test_suite_update_params, project, plan_id, suite_id def get_suites_by_test_case_id(self, test_case_id): """GetSuitesByTestCaseId. - [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. + 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,7 +398,7 @@ 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='5.1-preview.1', + version='5.1', query_parameters=query_parameters) return self._deserialize('[TestSuite]', self._unwrap_collection(response)) diff --git a/azure-devops/azure/devops/v5_1/test_results/test_results_client.py b/azure-devops/azure/devops/v5_1/test_results/test_results_client.py index 1dde7f6b..d4fcb919 100644 --- a/azure-devops/azure/devops/v5_1/test_results/test_results_client.py +++ b/azure-devops/azure/devops/v5_1/test_results/test_results_client.py @@ -945,24 +945,6 @@ def query_result_trend_for_release(self, filter, project): content=content) return self._deserialize('[AggregatedDataForResultTrend]', 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='5.1-preview.1', - route_values=route_values) - return self._deserialize('TestRunStatistic', response) - def create_test_run(self, test_run, project): """CreateTestRun. [Preview API] @@ -1157,6 +1139,24 @@ def update_test_run(self, run_update_model, project, run_id): content=content) return self._deserialize('TestRun', 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. + :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='5.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 diff --git a/azure-devops/azure/devops/v5_1/tfvc/tfvc_client.py b/azure-devops/azure/devops/v5_1/tfvc/tfvc_client.py index d7c387b9..c574bd07 100644 --- a/azure-devops/azure/devops/v5_1/tfvc/tfvc_client.py +++ b/azure-devops/azure/devops/v5_1/tfvc/tfvc_client.py @@ -27,7 +27,7 @@ def __init__(self, base_url=None, creds=None): def get_branch(self, path, project=None, include_parent=None, include_children=None): """GetBranch. - [Preview API] Get a single branch hierarchy at the given path with parents or children as specified. + 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 @@ -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='5.1-preview.1', + version='5.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. - [Preview API] Get a collection of branch roots -- first-level children, branches with no parents. + 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='5.1-preview.1', + version='5.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. - [Preview API] Get branch hierarchies below the specified scopePath + 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,14 +101,14 @@ 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='5.1-preview.1', + version='5.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): """GetChangesetChanges. - [Preview API] Retrieve Tfvc changes for a given changeset. + 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 @@ -124,14 +124,14 @@ def get_changeset_changes(self, id=None, skip=None, top=None): query_parameters['$top'] = self._serialize.query('top', top, 'int') response = self._send(http_method='GET', location_id='f32b86f2-15b9-4fe6-81b1-6f8938617ee5', - version='5.1-preview.1', + version='5.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. - [Preview API] Create a new changeset. + Create a new changeset. :param :class:` ` changeset: :param str project: Project ID or project name :rtype: :class:` ` @@ -142,14 +142,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='5.1-preview.3', + version='5.1', 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. - [Preview API] Retrieve a Tfvc Changeset + 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 @@ -206,14 +206,14 @@ 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='5.1-preview.3', + version='5.1', 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. - [Preview API] Retrieve Tfvc Changesets + 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 @@ -255,27 +255,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='5.1-preview.3', + version='5.1', 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. - [Preview API] Returns changesets for a given list of changeset Ids. + 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='5.1-preview.1', + version='5.1', content=content) return self._deserialize('[TfvcChangesetRef]', self._unwrap_collection(response)) def get_changeset_work_items(self, id=None): """GetChangesetWorkItems. - [Preview API] Retrieves the work items associated with a particular changeset. + Retrieves the work items associated with a particular changeset. :param int id: ID of the changeset. Default: null :rtype: [AssociatedWorkItem] """ @@ -284,13 +284,13 @@ 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='5.1-preview.1', + version='5.1', route_values=route_values) return self._deserialize('[AssociatedWorkItem]', self._unwrap_collection(response)) def get_items_batch(self, item_request_data, project=None): """GetItemsBatch. - [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. + 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]] @@ -301,14 +301,14 @@ 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='5.1-preview.1', + version='5.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. - [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. + 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 @@ -319,7 +319,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='5.1-preview.1', + version='5.1', route_values=route_values, content=content, accept_media_type='application/zip') @@ -331,7 +331,7 @@ 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. - [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. + 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. @@ -367,14 +367,14 @@ 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='5.1-preview.1', + version='5.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. - [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. + 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. @@ -410,7 +410,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='5.1-preview.1', + version='5.1', route_values=route_values, query_parameters=query_parameters, accept_media_type='application/octet-stream') @@ -422,7 +422,7 @@ 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. - [Preview API] Get a list of Tfvc items + 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). @@ -449,14 +449,14 @@ 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='5.1-preview.1', + version='5.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. - [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. + 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. @@ -492,7 +492,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='5.1-preview.1', + version='5.1', route_values=route_values, query_parameters=query_parameters, accept_media_type='text/plain') @@ -504,7 +504,7 @@ 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. - [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. + 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. @@ -540,7 +540,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='5.1-preview.1', + version='5.1', route_values=route_values, query_parameters=query_parameters, accept_media_type='application/zip') @@ -552,7 +552,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. - [Preview API] Get items under a label. + 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 @@ -568,14 +568,14 @@ 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='5.1-preview.1', + version='5.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. - [Preview API] Get a single deep label. + Get a single deep label. :param str label_id: Unique identifier of label :param :class:` ` request_data: maxItemCount :param str project: Project ID or project name @@ -602,14 +602,14 @@ 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='5.1-preview.1', + version='5.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. - [Preview API] Get a collection of shallow label references. + 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 @@ -639,14 +639,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='5.1-preview.1', + version='5.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. - [Preview API] Get changes included in a shelveset. + 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 @@ -661,13 +661,13 @@ 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='5.1-preview.1', + version='5.1', query_parameters=query_parameters) return self._deserialize('[TfvcChange]', self._unwrap_collection(response)) def get_shelveset(self, shelveset_id, request_data=None): """GetShelveset. - [Preview API] Get a single deep shelveset. + Get a single deep shelveset. :param str shelveset_id: Shelveset's unique ID :param :class:` ` request_data: includeDetails, includeWorkItems, maxChangeCount, and maxCommentLength :rtype: :class:` ` @@ -692,13 +692,13 @@ 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='5.1-preview.1', + version='5.1', query_parameters=query_parameters) return self._deserialize('TfvcShelveset', response) def get_shelvesets(self, request_data=None, top=None, skip=None): """GetShelvesets. - [Preview API] Return a collection of shallow shelveset references. + 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 @@ -726,13 +726,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='5.1-preview.1', + version='5.1', query_parameters=query_parameters) return self._deserialize('[TfvcShelvesetRef]', self._unwrap_collection(response)) def get_shelveset_work_items(self, shelveset_id): """GetShelvesetWorkItems. - [Preview API] Get work items associated with a shelveset. + Get work items associated with a shelveset. :param str shelveset_id: Shelveset's unique ID :rtype: [AssociatedWorkItem] """ @@ -741,7 +741,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='5.1-preview.1', + version='5.1', query_parameters=query_parameters) return self._deserialize('[AssociatedWorkItem]', self._unwrap_collection(response)) diff --git a/azure-devops/azure/devops/v5_1/wiki/wiki_client.py b/azure-devops/azure/devops/v5_1/wiki/wiki_client.py index c0a87b14..e4096915 100644 --- a/azure-devops/azure/devops/v5_1/wiki/wiki_client.py +++ b/azure-devops/azure/devops/v5_1/wiki/wiki_client.py @@ -27,7 +27,7 @@ def __init__(self, base_url=None, creds=None): def create_attachment(self, upload_stream, project, wiki_identifier, name, version_descriptor=None, **kwargs): """CreateAttachment. - [Preview API] Creates an attachment in the wiki. + 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 name. @@ -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='5.1-preview.1', + version='5.1', route_values=route_values, query_parameters=query_parameters, content=content, @@ -69,7 +69,7 @@ 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. - [Preview API] Creates a page move operation that updates the path and order of the page as provided in the parameters. + 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 name. @@ -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='5.1-preview.1', + version='5.1', route_values=route_values, query_parameters=query_parameters, content=content) @@ -104,59 +104,13 @@ def create_page_move(self, page_move_parameters, project, wiki_identifier, comme response_object.eTag = response.headers.get('ETag') return response_object - def create_or_update_page(self, parameters, project, wiki_identifier, path, version, comment=None, version_descriptor=None): - """CreateOrUpdatePage. - [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 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:` ` - """ - route_values = {} - if project is not None: - route_values['project'] = self._serialize.url('project', project, 'str') - if wiki_identifier is not None: - route_values['wikiIdentifier'] = self._serialize.url('wiki_identifier', wiki_identifier, 'str') - query_parameters = {} - if path is not None: - query_parameters['path'] = self._serialize.query('path', path, 'str') - if comment is not None: - query_parameters['comment'] = self._serialize.query('comment', comment, 'str') - if version_descriptor is not None: - if version_descriptor.version_type is not None: - query_parameters['versionDescriptor.versionType'] = version_descriptor.version_type - if version_descriptor.version is not None: - query_parameters['versionDescriptor.version'] = version_descriptor.version - if version_descriptor.version_options is not None: - query_parameters['versionDescriptor.versionOptions'] = version_descriptor.version_options - additional_headers = {} - if version is not None: - additional_headers['If-Match'] = version - content = self._serialize.body(parameters, 'WikiPageCreateOrUpdateParameters') - response = self._send(http_method='PUT', - location_id='25d3fbc7-fe3d-46cb-b5a5-0b6f79caf27b', - version='5.1-preview.1', - route_values=route_values, - query_parameters=query_parameters, - additional_headers=additional_headers, - content=content) - response_object = models.WikiPageResponse() - response_object.page = self._deserialize('WikiPage', response) - response_object.eTag = response.headers.get('ETag') - return response_object - - def delete_page(self, project, wiki_identifier, path, comment=None, version_descriptor=None): - """DeletePage. + def delete_page_by_id(self, project, wiki_identifier, id, comment=None): + """DeletePageById. [Preview API] Deletes a wiki page. :param str project: Project ID or project name :param str wiki_identifier: Wiki Id or name. - :param str path: Wiki page path. + :param int id: Wiki page id. :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:` ` """ route_values = {} @@ -164,20 +118,13 @@ def delete_page(self, project, wiki_identifier, path, comment=None, version_desc route_values['project'] = self._serialize.url('project', project, 'str') if wiki_identifier is not None: route_values['wikiIdentifier'] = self._serialize.url('wiki_identifier', wiki_identifier, 'str') + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'int') query_parameters = {} - if path is not None: - query_parameters['path'] = self._serialize.query('path', path, 'str') if comment is not None: query_parameters['comment'] = self._serialize.query('comment', comment, 'str') - if version_descriptor is not None: - if version_descriptor.version_type is not None: - query_parameters['versionDescriptor.versionType'] = version_descriptor.version_type - if version_descriptor.version is not None: - query_parameters['versionDescriptor.version'] = version_descriptor.version - if version_descriptor.version_options is not None: - query_parameters['versionDescriptor.versionOptions'] = version_descriptor.version_options response = self._send(http_method='DELETE', - location_id='25d3fbc7-fe3d-46cb-b5a5-0b6f79caf27b', + location_id='ceddcf75-1068-452d-8b13-2d4d76e1f970', version='5.1-preview.1', route_values=route_values, query_parameters=query_parameters) @@ -186,14 +133,13 @@ def delete_page(self, project, wiki_identifier, path, comment=None, version_desc response_object.eTag = response.headers.get('ETag') return response_object - def get_page(self, project, wiki_identifier, path=None, recursion_level=None, version_descriptor=None, include_content=None): - """GetPage. - [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. + def get_page_by_id(self, project, wiki_identifier, id, recursion_level=None, include_content=None): + """GetPageById. + [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 name. - :param str path: Wiki page path. + :param int id: Wiki page id. :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 bool include_content: True to include the content of the page in the response for Json content type. Defaults to false (Optional) :rtype: :class:` ` """ @@ -202,22 +148,15 @@ def get_page(self, project, wiki_identifier, path=None, recursion_level=None, ve route_values['project'] = self._serialize.url('project', project, 'str') if wiki_identifier is not None: route_values['wikiIdentifier'] = self._serialize.url('wiki_identifier', wiki_identifier, 'str') + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'int') query_parameters = {} - if path is not None: - query_parameters['path'] = self._serialize.query('path', path, 'str') if recursion_level is not None: query_parameters['recursionLevel'] = self._serialize.query('recursion_level', recursion_level, 'str') - if version_descriptor is not None: - if version_descriptor.version_type is not None: - query_parameters['versionDescriptor.versionType'] = version_descriptor.version_type - if version_descriptor.version is not None: - query_parameters['versionDescriptor.version'] = version_descriptor.version - if version_descriptor.version_options is not None: - query_parameters['versionDescriptor.versionOptions'] = version_descriptor.version_options if include_content is not 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', + location_id='ceddcf75-1068-452d-8b13-2d4d76e1f970', version='5.1-preview.1', route_values=route_values, query_parameters=query_parameters) @@ -226,14 +165,13 @@ def get_page(self, project, wiki_identifier, path=None, recursion_level=None, ve response_object.eTag = response.headers.get('ETag') return response_object - def get_page_text(self, project, wiki_identifier, path=None, recursion_level=None, version_descriptor=None, include_content=None, **kwargs): - """GetPageText. - [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. + def get_page_by_id_text(self, project, wiki_identifier, id, recursion_level=None, include_content=None, **kwargs): + """GetPageByIdText. + [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 name. - :param str path: Wiki page path. + :param int id: Wiki page id. :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 bool include_content: True to include the content of the page in the response for Json content type. Defaults to false (Optional) :rtype: object """ @@ -242,22 +180,15 @@ def get_page_text(self, project, wiki_identifier, path=None, recursion_level=Non route_values['project'] = self._serialize.url('project', project, 'str') if wiki_identifier is not None: route_values['wikiIdentifier'] = self._serialize.url('wiki_identifier', wiki_identifier, 'str') + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'int') query_parameters = {} - if path is not None: - query_parameters['path'] = self._serialize.query('path', path, 'str') if recursion_level is not None: query_parameters['recursionLevel'] = self._serialize.query('recursion_level', recursion_level, 'str') - if version_descriptor is not None: - if version_descriptor.version_type is not None: - query_parameters['versionDescriptor.versionType'] = version_descriptor.version_type - if version_descriptor.version is not None: - query_parameters['versionDescriptor.version'] = version_descriptor.version - if version_descriptor.version_options is not None: - query_parameters['versionDescriptor.versionOptions'] = version_descriptor.version_options if include_content is not 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', + location_id='ceddcf75-1068-452d-8b13-2d4d76e1f970', version='5.1-preview.1', route_values=route_values, query_parameters=query_parameters, @@ -268,14 +199,13 @@ def get_page_text(self, project, wiki_identifier, path=None, recursion_level=Non callback = None return self._client.stream_download(response, callback=callback) - def get_page_zip(self, project, wiki_identifier, path=None, recursion_level=None, version_descriptor=None, include_content=None, **kwargs): - """GetPageZip. - [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. + def get_page_by_id_zip(self, project, wiki_identifier, id, recursion_level=None, include_content=None, **kwargs): + """GetPageByIdZip. + [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 name. - :param str path: Wiki page path. + :param int id: Wiki page id. :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 bool include_content: True to include the content of the page in the response for Json content type. Defaults to false (Optional) :rtype: object """ @@ -284,22 +214,15 @@ def get_page_zip(self, project, wiki_identifier, path=None, recursion_level=None route_values['project'] = self._serialize.url('project', project, 'str') if wiki_identifier is not None: route_values['wikiIdentifier'] = self._serialize.url('wiki_identifier', wiki_identifier, 'str') + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'int') query_parameters = {} - if path is not None: - query_parameters['path'] = self._serialize.query('path', path, 'str') if recursion_level is not None: query_parameters['recursionLevel'] = self._serialize.query('recursion_level', recursion_level, 'str') - if version_descriptor is not None: - if version_descriptor.version_type is not None: - query_parameters['versionDescriptor.versionType'] = version_descriptor.version_type - if version_descriptor.version is not None: - query_parameters['versionDescriptor.version'] = version_descriptor.version - if version_descriptor.version_options is not None: - query_parameters['versionDescriptor.versionOptions'] = version_descriptor.version_options if include_content is not 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', + location_id='ceddcf75-1068-452d-8b13-2d4d76e1f970', version='5.1-preview.1', route_values=route_values, query_parameters=query_parameters, @@ -310,13 +233,15 @@ def get_page_zip(self, project, wiki_identifier, path=None, recursion_level=None callback = None return self._client.stream_download(response, callback=callback) - def delete_page_by_id(self, project, wiki_identifier, id, comment=None): - """DeletePageById. - [Preview API] Deletes a wiki page. + def update_page_by_id(self, parameters, project, wiki_identifier, id, version, comment=None): + """UpdatePageById. + [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 name. :param int id: Wiki page id. - :param str comment: Comment to be associated with this page delete. + :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:` ` """ route_values = {} @@ -329,23 +254,112 @@ def delete_page_by_id(self, project, wiki_identifier, id, comment=None): query_parameters = {} if comment is not None: query_parameters['comment'] = self._serialize.query('comment', comment, 'str') - response = self._send(http_method='DELETE', + additional_headers = {} + if version is not None: + additional_headers['If-Match'] = version + content = self._serialize.body(parameters, 'WikiPageCreateOrUpdateParameters') + response = self._send(http_method='PATCH', location_id='ceddcf75-1068-452d-8b13-2d4d76e1f970', version='5.1-preview.1', route_values=route_values, + query_parameters=query_parameters, + additional_headers=additional_headers, + content=content) + response_object = models.WikiPageResponse() + response_object.page = self._deserialize('WikiPage', response) + response_object.eTag = response.headers.get('ETag') + return response_object + + 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. + :param str project: Project ID or project name + :param str wiki_identifier: Wiki Id or 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:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if wiki_identifier is not None: + route_values['wikiIdentifier'] = self._serialize.url('wiki_identifier', wiki_identifier, 'str') + query_parameters = {} + if path is not None: + query_parameters['path'] = self._serialize.query('path', path, 'str') + if comment is not None: + query_parameters['comment'] = self._serialize.query('comment', comment, 'str') + if version_descriptor is not None: + if version_descriptor.version_type is not None: + query_parameters['versionDescriptor.versionType'] = version_descriptor.version_type + if version_descriptor.version is not None: + query_parameters['versionDescriptor.version'] = version_descriptor.version + if version_descriptor.version_options is not None: + query_parameters['versionDescriptor.versionOptions'] = version_descriptor.version_options + additional_headers = {} + if version is not None: + additional_headers['If-Match'] = version + content = self._serialize.body(parameters, 'WikiPageCreateOrUpdateParameters') + response = self._send(http_method='PUT', + location_id='25d3fbc7-fe3d-46cb-b5a5-0b6f79caf27b', + version='5.1', + route_values=route_values, + query_parameters=query_parameters, + additional_headers=additional_headers, + content=content) + response_object = models.WikiPageResponse() + response_object.page = self._deserialize('WikiPage', response) + response_object.eTag = response.headers.get('ETag') + return response_object + + def delete_page(self, project, wiki_identifier, path, comment=None, version_descriptor=None): + """DeletePage. + Deletes a wiki page. + :param str project: Project ID or project name + :param str wiki_identifier: Wiki Id or 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:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if wiki_identifier is not None: + route_values['wikiIdentifier'] = self._serialize.url('wiki_identifier', wiki_identifier, 'str') + query_parameters = {} + if path is not None: + query_parameters['path'] = self._serialize.query('path', path, 'str') + if comment is not None: + query_parameters['comment'] = self._serialize.query('comment', comment, 'str') + if version_descriptor is not None: + if version_descriptor.version_type is not None: + query_parameters['versionDescriptor.versionType'] = version_descriptor.version_type + if version_descriptor.version is not None: + query_parameters['versionDescriptor.version'] = version_descriptor.version + if version_descriptor.version_options is not None: + query_parameters['versionDescriptor.versionOptions'] = version_descriptor.version_options + response = self._send(http_method='DELETE', + location_id='25d3fbc7-fe3d-46cb-b5a5-0b6f79caf27b', + version='5.1', + route_values=route_values, query_parameters=query_parameters) response_object = models.WikiPageResponse() response_object.page = self._deserialize('WikiPage', response) response_object.eTag = response.headers.get('ETag') return response_object - def get_page_by_id(self, project, wiki_identifier, id, recursion_level=None, include_content=None): - """GetPageById. - [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. + 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. :param str project: Project ID or project name :param str wiki_identifier: Wiki Id or name. - :param int id: Wiki page id. + :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 bool include_content: True to include the content of the page in the response for Json content type. Defaults to false (Optional) :rtype: :class:` ` """ @@ -354,16 +368,23 @@ def get_page_by_id(self, project, wiki_identifier, id, recursion_level=None, inc route_values['project'] = self._serialize.url('project', project, 'str') if wiki_identifier is not None: route_values['wikiIdentifier'] = self._serialize.url('wiki_identifier', wiki_identifier, 'str') - if id is not None: - route_values['id'] = self._serialize.url('id', id, 'int') query_parameters = {} + if path is not None: + query_parameters['path'] = self._serialize.query('path', path, 'str') if recursion_level is not None: query_parameters['recursionLevel'] = self._serialize.query('recursion_level', recursion_level, 'str') + if version_descriptor is not None: + if version_descriptor.version_type is not None: + query_parameters['versionDescriptor.versionType'] = version_descriptor.version_type + if version_descriptor.version is not None: + query_parameters['versionDescriptor.version'] = version_descriptor.version + if version_descriptor.version_options is not None: + query_parameters['versionDescriptor.versionOptions'] = version_descriptor.version_options if include_content is not 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='5.1-preview.1', + location_id='25d3fbc7-fe3d-46cb-b5a5-0b6f79caf27b', + version='5.1', route_values=route_values, query_parameters=query_parameters) response_object = models.WikiPageResponse() @@ -371,13 +392,14 @@ def get_page_by_id(self, project, wiki_identifier, id, recursion_level=None, inc response_object.eTag = response.headers.get('ETag') return response_object - def get_page_by_id_text(self, project, wiki_identifier, id, recursion_level=None, include_content=None, **kwargs): - """GetPageByIdText. - [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. + 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. :param str project: Project ID or project name :param str wiki_identifier: Wiki Id or name. - :param int id: Wiki page id. + :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 bool include_content: True to include the content of the page in the response for Json content type. Defaults to false (Optional) :rtype: object """ @@ -386,16 +408,23 @@ def get_page_by_id_text(self, project, wiki_identifier, id, recursion_level=None route_values['project'] = self._serialize.url('project', project, 'str') if wiki_identifier is not None: route_values['wikiIdentifier'] = self._serialize.url('wiki_identifier', wiki_identifier, 'str') - if id is not None: - route_values['id'] = self._serialize.url('id', id, 'int') query_parameters = {} + if path is not None: + query_parameters['path'] = self._serialize.query('path', path, 'str') if recursion_level is not None: query_parameters['recursionLevel'] = self._serialize.query('recursion_level', recursion_level, 'str') + if version_descriptor is not None: + if version_descriptor.version_type is not None: + query_parameters['versionDescriptor.versionType'] = version_descriptor.version_type + if version_descriptor.version is not None: + query_parameters['versionDescriptor.version'] = version_descriptor.version + if version_descriptor.version_options is not None: + query_parameters['versionDescriptor.versionOptions'] = version_descriptor.version_options if include_content is not 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='5.1-preview.1', + location_id='25d3fbc7-fe3d-46cb-b5a5-0b6f79caf27b', + version='5.1', route_values=route_values, query_parameters=query_parameters, accept_media_type='text/plain') @@ -405,13 +434,14 @@ def get_page_by_id_text(self, project, wiki_identifier, id, recursion_level=None callback = None return self._client.stream_download(response, callback=callback) - def get_page_by_id_zip(self, project, wiki_identifier, id, recursion_level=None, include_content=None, **kwargs): - """GetPageByIdZip. - [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. + 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. :param str project: Project ID or project name :param str wiki_identifier: Wiki Id or name. - :param int id: Wiki page id. + :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 bool include_content: True to include the content of the page in the response for Json content type. Defaults to false (Optional) :rtype: object """ @@ -420,16 +450,23 @@ def get_page_by_id_zip(self, project, wiki_identifier, id, recursion_level=None, route_values['project'] = self._serialize.url('project', project, 'str') if wiki_identifier is not None: route_values['wikiIdentifier'] = self._serialize.url('wiki_identifier', wiki_identifier, 'str') - if id is not None: - route_values['id'] = self._serialize.url('id', id, 'int') query_parameters = {} + if path is not None: + query_parameters['path'] = self._serialize.query('path', path, 'str') if recursion_level is not None: query_parameters['recursionLevel'] = self._serialize.query('recursion_level', recursion_level, 'str') + if version_descriptor is not None: + if version_descriptor.version_type is not None: + query_parameters['versionDescriptor.versionType'] = version_descriptor.version_type + if version_descriptor.version is not None: + query_parameters['versionDescriptor.version'] = version_descriptor.version + if version_descriptor.version_options is not None: + query_parameters['versionDescriptor.versionOptions'] = version_descriptor.version_options if include_content is not 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='5.1-preview.1', + location_id='25d3fbc7-fe3d-46cb-b5a5-0b6f79caf27b', + version='5.1', route_values=route_values, query_parameters=query_parameters, accept_media_type='application/zip') @@ -439,46 +476,9 @@ def get_page_by_id_zip(self, project, wiki_identifier, id, recursion_level=None, callback = None return self._client.stream_download(response, callback=callback) - def update_page_by_id(self, parameters, project, wiki_identifier, id, version, comment=None): - """UpdatePageById. - [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 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:` ` - """ - route_values = {} - if project is not None: - route_values['project'] = self._serialize.url('project', project, 'str') - if wiki_identifier is not None: - route_values['wikiIdentifier'] = self._serialize.url('wiki_identifier', wiki_identifier, 'str') - if id is not None: - route_values['id'] = self._serialize.url('id', id, 'int') - query_parameters = {} - if comment is not None: - query_parameters['comment'] = self._serialize.query('comment', comment, 'str') - additional_headers = {} - if version is not None: - additional_headers['If-Match'] = version - content = self._serialize.body(parameters, 'WikiPageCreateOrUpdateParameters') - response = self._send(http_method='PATCH', - location_id='ceddcf75-1068-452d-8b13-2d4d76e1f970', - version='5.1-preview.1', - route_values=route_values, - query_parameters=query_parameters, - additional_headers=additional_headers, - content=content) - response_object = models.WikiPageResponse() - response_object.page = self._deserialize('WikiPage', response) - response_object.eTag = response.headers.get('ETag') - return response_object - def create_wiki(self, wiki_create_params, project=None): """CreateWiki. - [Preview API] Creates the wiki resource. + Creates the wiki resource. :param :class:` ` wiki_create_params: Parameters for the wiki creation. :param str project: Project ID or project name :rtype: :class:` ` @@ -489,14 +489,14 @@ 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='5.1-preview.2', + version='5.1', route_values=route_values, content=content) return self._deserialize('WikiV2', response) def delete_wiki(self, wiki_identifier, project=None): """DeleteWiki. - [Preview API] Deletes the wiki corresponding to the wiki name or Id provided. + Deletes the wiki corresponding to the wiki name or Id provided. :param str wiki_identifier: Wiki name or Id. :param str project: Project ID or project name :rtype: :class:` ` @@ -508,13 +508,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='5.1-preview.2', + version='5.1', route_values=route_values) return self._deserialize('WikiV2', response) def get_all_wikis(self, project=None): """GetAllWikis. - [Preview API] Gets all wikis in a project or collection. + Gets all wikis in a project or collection. :param str project: Project ID or project name :rtype: [WikiV2] """ @@ -523,13 +523,13 @@ 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='5.1-preview.2', + version='5.1', route_values=route_values) return self._deserialize('[WikiV2]', self._unwrap_collection(response)) def get_wiki(self, wiki_identifier, project=None): """GetWiki. - [Preview API] Gets the wiki corresponding to the wiki name or Id provided. + Gets the wiki corresponding to the wiki name or Id provided. :param str wiki_identifier: Wiki name or id. :param str project: Project ID or project name :rtype: :class:` ` @@ -541,13 +541,13 @@ 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='5.1-preview.2', + version='5.1', route_values=route_values) return self._deserialize('WikiV2', response) def update_wiki(self, update_parameters, wiki_identifier, project=None): """UpdateWiki. - [Preview API] Updates the wiki corresponding to the wiki Id or name provided using the update parameters. + Updates the wiki corresponding to the wiki Id or name provided using the update parameters. :param :class:` ` update_parameters: Update parameters. :param str wiki_identifier: Wiki name or Id. :param str project: Project ID or project name @@ -561,7 +561,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='5.1-preview.2', + version='5.1', route_values=route_values, content=content) return self._deserialize('WikiV2', response) diff --git a/azure-devops/azure/devops/v5_1/work/work_client.py b/azure-devops/azure/devops/v5_1/work/work_client.py index 40dc3bf1..40984141 100644 --- a/azure-devops/azure/devops/v5_1/work/work_client.py +++ b/azure-devops/azure/devops/v5_1/work/work_client.py @@ -27,7 +27,7 @@ def __init__(self, base_url=None, creds=None): def get_backlog_configurations(self, team_context): """GetBacklogConfigurations. - [Preview API] Gets backlog configuration for a team + Gets backlog configuration for a team :param :class:` ` team_context: The team context for the operation :rtype: :class:` ` """ @@ -50,7 +50,7 @@ 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='5.1-preview.1', + version='5.1', route_values=route_values) return self._deserialize('BacklogConfiguration', response) @@ -149,7 +149,7 @@ def get_backlogs(self, team_context): def get_column_suggested_values(self, project=None): """GetColumnSuggestedValues. - [Preview API] Get available board columns in a project + Get available board columns in a project :param str project: Project ID or project name :rtype: [BoardSuggestedValue] """ @@ -158,7 +158,7 @@ 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='5.1-preview.1', + version='5.1', route_values=route_values) return self._deserialize('[BoardSuggestedValue]', self._unwrap_collection(response)) @@ -202,7 +202,7 @@ def get_board_mapping_parent_items(self, team_context, child_backlog_context_cat def get_row_suggested_values(self, project=None): """GetRowSuggestedValues. - [Preview API] Get available board rows in a project + Get available board rows in a project :param str project: Project ID or project name :rtype: [BoardSuggestedValue] """ @@ -211,13 +211,13 @@ 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='5.1-preview.1', + version='5.1', route_values=route_values) return self._deserialize('[BoardSuggestedValue]', self._unwrap_collection(response)) def get_board(self, team_context, id): """GetBoard. - [Preview API] Get board + 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:` ` @@ -243,13 +243,13 @@ 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='5.1-preview.1', + version='5.1', route_values=route_values) return self._deserialize('Board', response) def get_boards(self, team_context): """GetBoards. - [Preview API] Get boards + Get boards :param :class:` ` team_context: The team context for the operation :rtype: [BoardReference] """ @@ -272,13 +272,13 @@ 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='5.1-preview.1', + version='5.1', route_values=route_values) return self._deserialize('[BoardReference]', self._unwrap_collection(response)) def set_board_options(self, options, team_context, id): """SetBoardOptions. - [Preview API] Update board options + Update board options :param {str} options: options to updated :param :class:` ` team_context: The team context for the operation :param str id: identifier for board, either category plural name (Eg:"Stories") or guid @@ -306,7 +306,7 @@ 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='5.1-preview.1', + version='5.1', route_values=route_values, content=content) return self._deserialize('{str}', self._unwrap_collection(response)) @@ -380,7 +380,7 @@ def update_board_user_settings(self, board_user_settings, team_context, board): def get_capacities_with_identity_ref(self, team_context, iteration_id): """GetCapacitiesWithIdentityRef. - [Preview API] Get a team's capacity + Get a team's capacity :param :class:` ` team_context: The team context for the operation :param str iteration_id: ID of the iteration :rtype: [TeamMemberCapacityIdentityRef] @@ -406,13 +406,13 @@ def get_capacities_with_identity_ref(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='5.1-preview.2', + version='5.1', route_values=route_values) return self._deserialize('[TeamMemberCapacityIdentityRef]', self._unwrap_collection(response)) def get_capacity_with_identity_ref(self, team_context, iteration_id, team_member_id): """GetCapacityWithIdentityRef. - [Preview API] Get a team member's capacity + 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 @@ -441,13 +441,13 @@ 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='5.1-preview.2', + version='5.1', route_values=route_values) return self._deserialize('TeamMemberCapacityIdentityRef', response) def replace_capacities_with_identity_ref(self, capacities, team_context, iteration_id): """ReplaceCapacitiesWithIdentityRef. - [Preview API] Replace a team's capacity + Replace a team's capacity :param [TeamMemberCapacityIdentityRef] capacities: Team capacity to replace :param :class:` ` team_context: The team context for the operation :param str iteration_id: ID of the iteration @@ -475,14 +475,14 @@ 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='5.1-preview.2', + version='5.1', 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. - [Preview API] Update a team member's capacity + 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 @@ -513,14 +513,14 @@ 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='5.1-preview.2', + version='5.1', route_values=route_values, content=content) return self._deserialize('TeamMemberCapacityIdentityRef', response) def get_board_card_rule_settings(self, team_context, board): """GetBoardCardRuleSettings. - [Preview API] Get board card Rule settings for the board id or board by name + 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:` ` @@ -546,13 +546,13 @@ 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='5.1-preview.2', + version='5.1', route_values=route_values) return self._deserialize('BoardCardRuleSettings', response) def update_board_card_rule_settings(self, board_card_rule_settings, team_context, board): """UpdateBoardCardRuleSettings. - [Preview API] Update board card Rule settings for the board id or board by name + 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: @@ -580,7 +580,7 @@ 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='5.1-preview.2', + version='5.1', route_values=route_values, content=content) return self._deserialize('BoardCardRuleSettings', response) @@ -617,7 +617,7 @@ def update_taskboard_card_rule_settings(self, board_card_rule_settings, team_con def get_board_card_settings(self, team_context, board): """GetBoardCardSettings. - [Preview API] Get board card settings for the board id or board by name + 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:` ` @@ -643,13 +643,13 @@ 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='5.1-preview.2', + version='5.1', route_values=route_values) return self._deserialize('BoardCardSettings', response) def update_board_card_settings(self, board_card_settings_to_save, team_context, board): """UpdateBoardCardSettings. - [Preview API] Update board card settings for the board id or board by name + 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: @@ -677,7 +677,7 @@ 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='5.1-preview.2', + version='5.1', route_values=route_values, content=content) return self._deserialize('BoardCardSettings', response) @@ -714,7 +714,7 @@ def update_taskboard_card_settings(self, board_card_settings_to_save, team_conte def get_board_chart(self, team_context, board, name): """GetBoardChart. - [Preview API] Get a board chart + 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 @@ -743,13 +743,13 @@ def get_board_chart(self, team_context, board, name): route_values['name'] = self._serialize.url('name', name, 'str') response = self._send(http_method='GET', location_id='45fe888c-239e-49fd-958c-df1a1ab21d97', - version='5.1-preview.1', + version='5.1', route_values=route_values) return self._deserialize('BoardChart', response) def get_board_charts(self, team_context, board): """GetBoardCharts. - [Preview API] Get board charts + 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] @@ -775,13 +775,13 @@ def get_board_charts(self, team_context, board): route_values['board'] = self._serialize.url('board', board, 'str') response = self._send(http_method='GET', location_id='45fe888c-239e-49fd-958c-df1a1ab21d97', - version='5.1-preview.1', + version='5.1', route_values=route_values) return self._deserialize('[BoardChartReference]', self._unwrap_collection(response)) def update_board_chart(self, chart, team_context, board, name): """UpdateBoardChart. - [Preview API] Update a board chart + 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 @@ -812,14 +812,14 @@ def update_board_chart(self, chart, team_context, board, name): content = self._serialize.body(chart, 'BoardChart') response = self._send(http_method='PATCH', location_id='45fe888c-239e-49fd-958c-df1a1ab21d97', - version='5.1-preview.1', + version='5.1', route_values=route_values, content=content) return self._deserialize('BoardChart', response) def get_board_columns(self, team_context, board): """GetBoardColumns. - [Preview API] Get columns on a board + 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] @@ -845,13 +845,13 @@ def get_board_columns(self, team_context, board): route_values['board'] = self._serialize.url('board', board, 'str') response = self._send(http_method='GET', location_id='c555d7ff-84e1-47df-9923-a3fe0cd8751b', - version='5.1-preview.1', + version='5.1', route_values=route_values) return self._deserialize('[BoardColumn]', self._unwrap_collection(response)) def update_board_columns(self, board_columns, team_context, board): """UpdateBoardColumns. - [Preview API] Update columns on a board + 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 @@ -879,14 +879,14 @@ def update_board_columns(self, board_columns, team_context, board): content = self._serialize.body(board_columns, '[BoardColumn]') response = self._send(http_method='PUT', location_id='c555d7ff-84e1-47df-9923-a3fe0cd8751b', - version='5.1-preview.1', + version='5.1', 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. - [Preview API] Get Delivery View Data + 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. @@ -908,14 +908,14 @@ def get_delivery_timeline_data(self, project, id, revision=None, start_date=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='5.1-preview.1', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('DeliveryViewData', response) def delete_team_iteration(self, team_context, id): """DeleteTeamIteration. - [Preview API] Delete a team's iteration by iterationId + Delete a team's iteration by iterationId :param :class:` ` team_context: The team context for the operation :param str id: ID of the iteration """ @@ -940,12 +940,12 @@ 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='5.1-preview.1', + version='5.1', route_values=route_values) def get_team_iteration(self, team_context, id): """GetTeamIteration. - [Preview API] Get team's iteration by iterationId + 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:` ` @@ -971,13 +971,13 @@ 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='5.1-preview.1', + version='5.1', route_values=route_values) return self._deserialize('TeamSettingsIteration', response) def get_team_iterations(self, team_context, timeframe=None): """GetTeamIterations. - [Preview API] Get a team's iterations using timeframe filter + 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] @@ -1004,14 +1004,14 @@ 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='5.1-preview.1', + version='5.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. - [Preview API] Add an iteration to the team + Add an iteration to the team :param :class:` ` iteration: Iteration to add :param :class:` ` team_context: The team context for the operation :rtype: :class:` ` @@ -1036,14 +1036,14 @@ 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='5.1-preview.1', + version='5.1', route_values=route_values, content=content) return self._deserialize('TeamSettingsIteration', response) def create_plan(self, posted_plan, project): """CreatePlan. - [Preview API] Add a new plan for the team + Add a new plan for the team :param :class:` ` posted_plan: Plan definition :param str project: Project ID or project name :rtype: :class:` ` @@ -1054,14 +1054,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='5.1-preview.1', + version='5.1', route_values=route_values, content=content) return self._deserialize('Plan', response) def delete_plan(self, project, id): """DeletePlan. - [Preview API] Delete the specified plan + Delete the specified plan :param str project: Project ID or project name :param str id: Identifier of the plan """ @@ -1072,12 +1072,12 @@ 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='5.1-preview.1', + version='5.1', route_values=route_values) def get_plan(self, project, id): """GetPlan. - [Preview API] Get the information for the specified plan + Get the information for the specified plan :param str project: Project ID or project name :param str id: Identifier of the plan :rtype: :class:` ` @@ -1089,13 +1089,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='5.1-preview.1', + version='5.1', route_values=route_values) return self._deserialize('Plan', response) def get_plans(self, project): """GetPlans. - [Preview API] Get the information for all the plans configured for the given team + Get the information for all the plans configured for the given team :param str project: Project ID or project name :rtype: [Plan] """ @@ -1104,13 +1104,13 @@ 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='5.1-preview.1', + version='5.1', route_values=route_values) return self._deserialize('[Plan]', self._unwrap_collection(response)) def update_plan(self, updated_plan, project, id): """UpdatePlan. - [Preview API] Update the information for the specified plan + 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 @@ -1124,7 +1124,7 @@ 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='5.1-preview.1', + version='5.1', route_values=route_values, content=content) return self._deserialize('Plan', response) @@ -1146,7 +1146,7 @@ def get_process_configuration(self, project): def get_board_rows(self, team_context, board): """GetBoardRows. - [Preview API] Get rows on a board + 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] @@ -1172,13 +1172,13 @@ 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='5.1-preview.1', + version='5.1', route_values=route_values) return self._deserialize('[BoardRow]', self._unwrap_collection(response)) def update_board_rows(self, board_rows, team_context, board): """UpdateBoardRows. - [Preview API] Update rows on a board + 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 str board: Name or ID of the specific board @@ -1206,14 +1206,14 @@ 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='5.1-preview.1', + version='5.1', route_values=route_values, content=content) return self._deserialize('[BoardRow]', self._unwrap_collection(response)) def get_team_days_off(self, team_context, iteration_id): """GetTeamDaysOff. - [Preview API] Get team's days off for an iteration + 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:` ` @@ -1239,13 +1239,13 @@ 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='5.1-preview.1', + version='5.1', route_values=route_values) return self._deserialize('TeamSettingsDaysOff', response) def update_team_days_off(self, days_off_patch, team_context, iteration_id): """UpdateTeamDaysOff. - [Preview API] Set a team's days off for an iteration + Set a team's days off for an iteration :param :class:` ` days_off_patch: Team's days off patch containting 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 @@ -1273,14 +1273,14 @@ 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='5.1-preview.1', + version='5.1', route_values=route_values, content=content) return self._deserialize('TeamSettingsDaysOff', response) def get_team_field_values(self, team_context): """GetTeamFieldValues. - [Preview API] Get a collection of team field values + Get a collection of team field values :param :class:` ` team_context: The team context for the operation :rtype: :class:` ` """ @@ -1303,13 +1303,13 @@ 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='5.1-preview.1', + version='5.1', route_values=route_values) return self._deserialize('TeamFieldValues', response) def update_team_field_values(self, patch, team_context): """UpdateTeamFieldValues. - [Preview API] Update team field values + Update team field values :param :class:` ` patch: :param :class:` ` team_context: The team context for the operation :rtype: :class:` ` @@ -1334,14 +1334,14 @@ 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='5.1-preview.1', + version='5.1', route_values=route_values, content=content) return self._deserialize('TeamFieldValues', response) def get_team_settings(self, team_context): """GetTeamSettings. - [Preview API] Get a team's settings + Get a team's settings :param :class:` ` team_context: The team context for the operation :rtype: :class:` ` """ @@ -1364,13 +1364,13 @@ 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='5.1-preview.1', + version='5.1', route_values=route_values) return self._deserialize('TeamSetting', response) def update_team_settings(self, team_settings_patch, team_context): """UpdateTeamSettings. - [Preview API] Update a team's settings + Update a team's settings :param :class:` ` team_settings_patch: TeamSettings changes :param :class:` ` team_context: The team context for the operation :rtype: :class:` ` @@ -1395,7 +1395,7 @@ 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='5.1-preview.1', + version='5.1', route_values=route_values, content=content) return self._deserialize('TeamSetting', response) diff --git a/azure-devops/azure/devops/v5_1/work_item_tracking/work_item_tracking_client.py b/azure-devops/azure/devops/v5_1/work_item_tracking/work_item_tracking_client.py index ef17dceb..deab93aa 100644 --- a/azure-devops/azure/devops/v5_1/work_item_tracking/work_item_tracking_client.py +++ b/azure-devops/azure/devops/v5_1/work_item_tracking/work_item_tracking_client.py @@ -65,7 +65,7 @@ def query_work_items_for_artifact_uris(self, artifact_uri_query, project=None): def create_attachment(self, upload_stream, project=None, file_name=None, upload_type=None, area_path=None, **kwargs): """CreateAttachment. - [Preview API] Uploads an attachment. + 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 @@ -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='5.1-preview.3', + version='5.1', 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. - [Preview API] Downloads an attachment. + 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='5.1-preview.3', + version='5.1', 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. - [Preview API] Downloads an attachment. + 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='5.1-preview.3', + version='5.1', route_values=route_values, query_parameters=query_parameters, accept_media_type='application/zip') @@ -161,9 +161,9 @@ 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. - [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. + 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 seperated integer classification nodes ids. It's not required, if you want root nodes. + :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. :param str error_policy: Flag to handle errors in getting some nodes. Possible options are Fail and Omit. :rtype: [WorkItemClassificationNode] @@ -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='5.1-preview.2', + version='5.1', 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. - [Preview API] Gets root classification nodes under the project. + 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,14 +201,14 @@ 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='5.1-preview.2', + version='5.1', 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. - [Preview API] Create new or update an existing classification node. + 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. @@ -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='5.1-preview.2', + version='5.1', 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. - [Preview API] Delete an existing classification node. + 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,13 +250,13 @@ 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='5.1-preview.2', + version='5.1', route_values=route_values, query_parameters=query_parameters) def get_classification_node(self, project, structure_group, path=None, depth=None): """GetClassificationNode. - [Preview API] Gets the classification node for a given node path. + 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. @@ -275,14 +275,14 @@ 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='5.1-preview.2', + version='5.1', 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. - [Preview API] Update an existing classification node. + 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. @@ -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='5.1-preview.2', + version='5.1', route_values=route_values, content=content) return self._deserialize('WorkItemClassificationNode', response) @@ -610,7 +610,7 @@ def get_comment_versions(self, project, work_item_id, comment_id): def create_field(self, work_item_field, project=None): """CreateField. - [Preview API] Create a new field. + Create a new field. :param :class:` ` work_item_field: New field definition :param str project: Project ID or project name :rtype: :class:` ` @@ -621,14 +621,14 @@ def create_field(self, work_item_field, project=None): content = self._serialize.body(work_item_field, 'WorkItemField') response = self._send(http_method='POST', location_id='b51fd764-e5c2-4b9b-aaf7-3395cf4bdd94', - version='5.1-preview.2', + version='5.1', route_values=route_values, content=content) return self._deserialize('WorkItemField', response) def delete_field(self, field_name_or_ref_name, project=None): """DeleteField. - [Preview API] Deletes the field. + Deletes the field. :param str field_name_or_ref_name: Field simple name or reference name :param str project: Project ID or project name """ @@ -639,12 +639,12 @@ 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='5.1-preview.2', + version='5.1', route_values=route_values) def get_field(self, field_name_or_ref_name, project=None): """GetField. - [Preview API] Gets information on a specific field. + 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:` ` @@ -656,13 +656,13 @@ 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='5.1-preview.2', + version='5.1', route_values=route_values) return self._deserialize('WorkItemField', response) def get_fields(self, project=None, expand=None): """GetFields. - [Preview API] Returns information for all fields. + Returns information for all fields. :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] @@ -675,14 +675,14 @@ 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='5.1-preview.2', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[WorkItemField]', self._unwrap_collection(response)) def create_query(self, posted_query, project, query, validate_wiql_only=None): """CreateQuery. - [Preview API] Creates a query, or moves a query. + 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. @@ -700,7 +700,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='5.1-preview.2', + version='5.1', route_values=route_values, query_parameters=query_parameters, content=content) @@ -708,7 +708,7 @@ def create_query(self, posted_query, project, query, validate_wiql_only=None): def delete_query(self, project, query): """DeleteQuery. - [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. + 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. """ @@ -719,12 +719,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='5.1-preview.2', + version='5.1', route_values=route_values) def get_queries(self, project, expand=None, depth=None, include_deleted=None): """GetQueries. - [Preview API] Gets the root queries and their children + 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. @@ -743,14 +743,14 @@ 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='5.1-preview.2', + version='5.1', 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): """GetQuery. - [Preview API] Retrieves an individual query and its children + 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. @@ -772,14 +772,14 @@ def get_query(self, project, query, expand=None, depth=None, include_deleted=Non 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='5.1-preview.2', + version='5.1', 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. - [Preview API] Searches all queries the user has access to in the current project + 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). @@ -801,14 +801,14 @@ 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='5.1-preview.2', + version='5.1', 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. - [Preview API] Update a query or a folder. This allows you to update, rename and move queries and folders. + 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. @@ -826,7 +826,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='5.1-preview.2', + version='5.1', route_values=route_values, query_parameters=query_parameters, content=content) @@ -834,7 +834,7 @@ def update_query(self, query_update, project, query, undelete_descendants=None): def get_queries_batch(self, query_get_request, project): """GetQueriesBatch. - [Preview API] Gets a list of queries by ids (Maximum 1000) + Gets a list of queries by ids (Maximum 1000) :param :class:` ` query_get_request: :param str project: Project ID or project name :rtype: [QueryHierarchyItem] @@ -845,14 +845,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='5.1-preview.1', + version='5.1', route_values=route_values, content=content) return self._deserialize('[QueryHierarchyItem]', self._unwrap_collection(response)) def destroy_work_item(self, id, project=None): """DestroyWorkItem. - [Preview API] Destroys the specified work item permanently from the Recycle Bin. This action can not be undone. + 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 """ @@ -863,12 +863,12 @@ 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='5.1-preview.2', + version='5.1', route_values=route_values) def get_deleted_work_item(self, id, project=None): """GetDeletedWorkItem. - [Preview API] Gets a deleted work item from Recycle Bin. + 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:` ` @@ -880,13 +880,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='5.1-preview.2', + version='5.1', route_values=route_values) return self._deserialize('WorkItemDelete', response) def get_deleted_work_items(self, ids, project=None): """GetDeletedWorkItems. - [Preview API] Gets the work items from the recycle bin, whose IDs have been specified in the parameters + 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] @@ -900,14 +900,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='5.1-preview.2', + version='5.1', 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. - [Preview API] Gets a list of the IDs and the URLs of the deleted the work items in the Recycle Bin. + 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] """ @@ -916,13 +916,13 @@ 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='5.1-preview.2', + version='5.1', route_values=route_values) return self._deserialize('[WorkItemDeleteShallowReference]', self._unwrap_collection(response)) def restore_work_item(self, payload, id, project=None): """RestoreWorkItem. - [Preview API] Restores the deleted work item from Recycle Bin. + 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 @@ -936,14 +936,14 @@ 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='5.1-preview.2', + version='5.1', route_values=route_values, content=content) return self._deserialize('WorkItemDelete', response) def get_revision(self, id, revision_number, project=None, expand=None): """GetRevision. - [Preview API] Returns a fully hydrated work item for the requested revision + 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 @@ -962,14 +962,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='5.1-preview.3', + version='5.1', 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. - [Preview API] Returns the list of fully hydrated work item revisions, paged. + Returns the list of fully hydrated work item revisions, paged. :param int id: :param str project: Project ID or project name :param int top: @@ -991,7 +991,7 @@ 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='5.1-preview.3', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[WorkItem]', self._unwrap_collection(response)) @@ -1161,7 +1161,7 @@ def replace_template(self, template_content, team_context, template_id): def get_update(self, id, update_number, project=None): """GetUpdate. - [Preview API] Returns a single update for a work item + Returns a single update for a work item :param int id: :param int update_number: :param str project: Project ID or project name @@ -1176,13 +1176,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='5.1-preview.3', + version='5.1', route_values=route_values) return self._deserialize('WorkItemUpdate', response) def get_updates(self, id, project=None, top=None, skip=None): """GetUpdates. - [Preview API] Returns a the deltas between work item revisions + Returns a the deltas between work item revisions :param int id: :param str project: Project ID or project name :param int top: @@ -1201,14 +1201,14 @@ 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='5.1-preview.3', + version='5.1', 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. - [Preview API] Gets the results of the query given its WIQL. + 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. @@ -1240,7 +1240,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='5.1-preview.2', + version='5.1', route_values=route_values, query_parameters=query_parameters, content=content) @@ -1248,7 +1248,7 @@ 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. - [Preview API] Gets the results of the query given the query ID. + 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 bool time_precision: Whether or not to use time precision. @@ -1281,14 +1281,14 @@ 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='5.1-preview.2', + version='5.1', 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. - [Preview API] Gets the results of the query given the query ID. + 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 bool time_precision: Whether or not to use time precision. @@ -1321,14 +1321,14 @@ 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='5.1-preview.2', + version='5.1', 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. - [Preview API] Get a work item icon given the friendly name and icon color. + 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) @@ -1344,24 +1344,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='5.1-preview.1', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('WorkItemIcon', response) def get_work_item_icons(self): """GetWorkItemIcons. - [Preview API] Get a list of all work item icons. + Get a list of all work item icons. :rtype: [WorkItemIcon] """ response = self._send(http_method='GET', location_id='4e1eb4a5-1970-4228-a682-ec48eb2dca30', - version='5.1-preview.1') + version='5.1') return self._deserialize('[WorkItemIcon]', self._unwrap_collection(response)) def get_work_item_icon_svg(self, icon, color=None, v=None, **kwargs): """GetWorkItemIconSvg. - [Preview API] Get a work item icon given the friendly name and icon color. + 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) @@ -1377,7 +1377,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='5.1-preview.1', + version='5.1', route_values=route_values, query_parameters=query_parameters, accept_media_type='image/svg+xml') @@ -1389,7 +1389,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. - [Preview API] Get a work item icon given the friendly name and icon color. + 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) @@ -1405,7 +1405,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='5.1-preview.1', + version='5.1', route_values=route_values, query_parameters=query_parameters, accept_media_type='image/xaml+xml') @@ -1417,7 +1417,7 @@ 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. - [Preview API] Get a batch of work item links + 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. @@ -1441,14 +1441,14 @@ 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='5.1-preview.3', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('ReportingWorkItemLinksBatch', response) def get_relation_type(self, relation): """GetRelationType. - [Preview API] Gets the work item relation type definition. + Gets the work item relation type definition. :param str relation: The relation name :rtype: :class:` ` """ @@ -1457,23 +1457,23 @@ def get_relation_type(self, relation): route_values['relation'] = self._serialize.url('relation', relation, 'str') response = self._send(http_method='GET', location_id='f5d33bc9-5b49-4a3c-a9bd-f3cd46dd2165', - version='5.1-preview.2', + version='5.1', route_values=route_values) return self._deserialize('WorkItemRelationType', response) def get_relation_types(self): """GetRelationTypes. - [Preview API] Gets the work item relation types. + Gets the work item relation types. :rtype: [WorkItemRelationType] """ response = self._send(http_method='GET', location_id='f5d33bc9-5b49-4a3c-a9bd-f3cd46dd2165', - version='5.1-preview.2') + version='5.1') 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. - [Preview API] Get a batch of work item revisions with the option of including deleted items + 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. @@ -1518,14 +1518,14 @@ 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='5.1-preview.2', + version='5.1', 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. - [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. + 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. @@ -1546,7 +1546,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='5.1-preview.2', + version='5.1', route_values=route_values, query_parameters=query_parameters, content=content) @@ -1577,7 +1577,7 @@ def read_reporting_discussions(self, project=None, continuation_token=None, max_ def create_work_item(self, document, project, type, validate_only=None, bypass_rules=None, suppress_notifications=None, expand=None): """CreateWorkItem. - [Preview API] Creates a single work item. + 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 @@ -1604,7 +1604,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='5.1-preview.3', + version='5.1', route_values=route_values, query_parameters=query_parameters, content=content, @@ -1613,7 +1613,7 @@ 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. - [Preview API] Returns a single work item from a template. + 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 @@ -1635,14 +1635,14 @@ 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='5.1-preview.3', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('WorkItem', response) def delete_work_item(self, id, project=None, destroy=None): """DeleteWorkItem. - [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. + 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. @@ -1658,14 +1658,14 @@ 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='5.1-preview.3', + version='5.1', 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. - [Preview API] Returns a single work item. + 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 @@ -1688,14 +1688,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='5.1-preview.3', + version='5.1', 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. - [Preview API] Returns a list of work items (Maximum 200) + 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 @@ -1722,14 +1722,14 @@ 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='5.1-preview.3', + version='5.1', 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. - [Preview API] Updates a single work item. + 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 @@ -1756,7 +1756,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='5.1-preview.3', + version='5.1', route_values=route_values, query_parameters=query_parameters, content=content, @@ -1765,7 +1765,7 @@ 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. - [Preview API] Gets work items for a list of work item ids (Maximum 200) + 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] @@ -1776,7 +1776,7 @@ 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='5.1-preview.1', + version='5.1', route_values=route_values, content=content) return self._deserialize('[WorkItem]', self._unwrap_collection(response)) @@ -1802,7 +1802,7 @@ def get_work_item_next_states_on_checkin_action(self, ids, action=None): def get_work_item_type_categories(self, project): """GetWorkItemTypeCategories. - [Preview API] Get all work item type categories. + Get all work item type categories. :param str project: Project ID or project name :rtype: [WorkItemTypeCategory] """ @@ -1811,13 +1811,13 @@ 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='5.1-preview.2', + version='5.1', route_values=route_values) return self._deserialize('[WorkItemTypeCategory]', self._unwrap_collection(response)) def get_work_item_type_category(self, project, category): """GetWorkItemTypeCategory. - [Preview API] Get specific work item type category by name. + Get specific work item type category by name. :param str project: Project ID or project name :param str category: The category name :rtype: :class:` ` @@ -1829,13 +1829,13 @@ 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='5.1-preview.2', + version='5.1', route_values=route_values) return self._deserialize('WorkItemTypeCategory', response) def get_work_item_type(self, project, type): """GetWorkItemType. - [Preview API] Returns a work item type definition. + Returns a work item type definition. :param str project: Project ID or project name :param str type: Work item type name :rtype: :class:` ` @@ -1847,13 +1847,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='5.1-preview.2', + version='5.1', route_values=route_values) return self._deserialize('WorkItemType', response) def get_work_item_types(self, project): """GetWorkItemTypes. - [Preview API] Returns the list of work item types + Returns the list of work item types :param str project: Project ID or project name :rtype: [WorkItemType] """ @@ -1862,13 +1862,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='5.1-preview.2', + version='5.1', 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. - [Preview API] Get a list of fields for a work item type with detailed references. + 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. @@ -1884,14 +1884,14 @@ 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='5.1-preview.3', + version='5.1', 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. - [Preview API] Get a field for a work item type with detailed references. + 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: @@ -1910,7 +1910,7 @@ 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='5.1-preview.3', + version='5.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('WorkItemTypeFieldWithReferences', response) diff --git a/azure-devops/azure/devops/version.py b/azure-devops/azure/devops/version.py index 6a2578fe..43c67193 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 = "5.0.0b10" +VERSION = "5.1.0" diff --git a/azure-devops/setup.py b/azure-devops/setup.py index 8b9bdcc7..2e09a78b 100644 --- a/azure-devops/setup.py +++ b/azure-devops/setup.py @@ -6,7 +6,7 @@ from setuptools import setup, find_packages NAME = "azure-devops" -VERSION = "5.0.0b10" +VERSION = "5.1.0" # To install the library, run the following #