From 5428142bc985a75cc9480b5f08e4e3143a0ef600 Mon Sep 17 00:00:00 2001 From: Ted Chambers Date: Thu, 13 Aug 2020 10:34:34 -0400 Subject: [PATCH] update apis to match 6.0 RTW --- .../devops/released/accounts/__init__.py | 2 +- .../released/accounts/accounts_client.py | 6 +- .../azure/devops/released/build/__init__.py | 15 +- .../devops/released/build/build_client.py | 210 ++++---- .../azure/devops/released/client_factory.py | 372 ++++++++++--- .../released/cloud_load_test/__init__.py | 2 +- .../cloud_load_test/cloud_load_test_client.py | 90 ++-- .../azure/devops/released/core/__init__.py | 2 +- .../azure/devops/released/core/core_client.py | 77 ++- .../azure/devops/released/git/__init__.py | 2 +- .../azure/devops/released/git/git_client.py | 13 - .../devops/released/git/git_client_base.py | 369 +++++++------ .../devops/released/identity/__init__.py | 4 +- .../released/identity/identity_client.py | 64 ++- .../devops/released/notification/__init__.py | 2 +- .../notification/notification_client.py | 72 +-- .../devops/released/operations/__init__.py | 2 +- .../released/operations/operations_client.py | 6 +- .../azure/devops/released/policy/__init__.py | 2 +- .../devops/released/policy/policy_client.py | 53 +- .../azure/devops/released/profile/__init__.py | 2 +- .../devops/released/profile/profile_client.py | 6 +- .../azure/devops/released/release/__init__.py | 7 +- .../devops/released/release/release_client.py | 146 ++--- .../devops/released/security/__init__.py | 2 +- .../released/security/security_client.py | 30 +- .../devops/released/service_hooks/__init__.py | 2 +- .../service_hooks/service_hooks_client.py | 82 +-- .../azure/devops/released/task/__init__.py | 2 +- .../azure/devops/released/task/task_client.py | 36 +- .../devops/released/task_agent/__init__.py | 5 +- .../released/task_agent/task_agent_client.py | 60 ++- .../azure/devops/released/test/__init__.py | 2 +- .../azure/devops/released/test/test_client.py | 91 ++-- .../devops/released/test_plan/__init__.py | 14 +- .../released/test_plan/test_plan_client.py | 4 +- .../devops/released/test_results/__init__.py | 10 +- .../test_results/test_results_client.py | 22 +- .../azure/devops/released/tfvc/__init__.py | 2 +- .../azure/devops/released/tfvc/tfvc_client.py | 111 ++-- .../azure/devops/released/wiki/__init__.py | 15 +- .../azure/devops/released/wiki/wiki_client.py | 92 ++-- .../azure/devops/released/work/__init__.py | 9 +- .../azure/devops/released/work/work_client.py | 198 +++---- .../released/work_item_tracking/__init__.py | 10 +- .../work_item_tracking_client.py | 223 ++++---- .../devops/v6_0/accounts/accounts_client.py | 4 +- .../azure/devops/v6_0/audit/models.py | 12 +- .../azure/devops/v6_0/build/__init__.py | 2 + .../azure/devops/v6_0/build/build_client.py | 285 ++++++---- .../azure/devops/v6_0/build/models.py | 64 ++- .../azure/devops/v6_0/client_factory.py | 30 +- .../cloud_load_test/cloud_load_test_client.py | 73 +-- .../azure/devops/v6_0/core/core_client.py | 108 ++-- azure-devops/azure/devops/v6_0/core/models.py | 20 +- .../azure/devops/v6_0/git/git_client_base.py | 294 +++++----- azure-devops/azure/devops/v6_0/git/models.py | 20 +- .../devops/v6_0/identity/identity_client.py | 54 +- .../azure/devops/v6_0/identity/models.py | 20 +- .../azure/devops/v6_0/location/models.py | 20 +- .../member_entitlement_management/models.py | 6 +- .../v6_0/notification/notification_client.py | 66 ++- .../v6_0/operations/operations_client.py | 4 +- .../v6_0/pipeline_permissions/__init__.py | 21 + .../v6_0/pipeline_permissions/models.py | 216 ++++++++ .../pipeline_permissions_client.py | 90 ++++ .../azure/devops/v6_0/pipelines/__init__.py | 4 + .../azure/devops/v6_0/pipelines/models.py | 166 +++++- .../devops/v6_0/pipelines/pipelines_client.py | 63 +-- .../devops/v6_0/pipelines_checks/__init__.py | 30 ++ .../devops/v6_0/pipelines_checks/models.py | 500 ++++++++++++++++++ .../pipelines_checks_client.py | 200 +++++++ .../azure/devops/v6_0/policy/policy_client.py | 36 +- .../devops/v6_0/profile/profile_client.py | 4 +- .../azure/devops/v6_0/release/__init__.py | 4 + .../azure/devops/v6_0/release/models.py | 86 ++- .../devops/v6_0/release/release_client.py | 67 ++- .../azure/devops/v6_0/search/__init__.py | 3 + .../azure/devops/v6_0/search/models.py | 116 +++- .../azure/devops/v6_0/search/search_client.py | 15 + .../devops/v6_0/security/security_client.py | 36 +- .../service_endpoint_client.py | 91 +++- .../service_hooks/service_hooks_client.py | 79 ++- .../azure/devops/v6_0/symbol/models.py | 12 +- azure-devops/azure/devops/v6_0/task/models.py | 12 +- .../azure/devops/v6_0/task/task_client.py | 30 +- .../azure/devops/v6_0/task_agent/__init__.py | 1 - .../azure/devops/v6_0/task_agent/models.py | 55 +- .../v6_0/task_agent/task_agent_client.py | 306 ++++++++++- .../azure/devops/v6_0/test/test_client.py | 92 ++-- .../azure/devops/v6_0/test_plan/__init__.py | 9 +- .../azure/devops/v6_0/test_plan/models.py | 294 ++++++++-- .../devops/v6_0/test_plan/test_plan_client.py | 45 +- .../devops/v6_0/test_results/__init__.py | 1 + .../azure/devops/v6_0/test_results/models.py | 32 +- .../v6_0/test_results/test_results_client.py | 44 ++ .../azure/devops/v6_0/tfvc/tfvc_client.py | 92 ++-- .../azure/devops/v6_0/token_admin/__init__.py | 1 + .../azure/devops/v6_0/token_admin/models.py | 24 + .../v6_0/token_admin/token_admin_client.py | 34 ++ azure-devops/azure/devops/v6_0/wiki/models.py | 4 +- .../azure/devops/v6_0/wiki/wiki_client.py | 380 ++++++------- .../azure/devops/v6_0/work/work_client.py | 148 +++--- .../work_item_tracking_client.py | 220 ++++---- azure-devops/azure/devops/version.py | 2 +- azure-devops/setup.py | 2 +- 106 files changed, 4841 insertions(+), 2456 deletions(-) delete mode 100644 azure-devops/azure/devops/released/git/git_client.py create mode 100644 azure-devops/azure/devops/v6_0/pipeline_permissions/__init__.py create mode 100644 azure-devops/azure/devops/v6_0/pipeline_permissions/models.py create mode 100644 azure-devops/azure/devops/v6_0/pipeline_permissions/pipeline_permissions_client.py create mode 100644 azure-devops/azure/devops/v6_0/pipelines_checks/__init__.py create mode 100644 azure-devops/azure/devops/v6_0/pipelines_checks/models.py create mode 100644 azure-devops/azure/devops/v6_0/pipelines_checks/pipelines_checks_client.py diff --git a/azure-devops/azure/devops/released/accounts/__init__.py b/azure-devops/azure/devops/released/accounts/__init__.py index fdc7c5d3..7676f096 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_1.accounts.models import * +from ...v6_0.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 8376bf68..1240c760 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_1.accounts import models +from ...v6_0.accounts import models class AccountsClient(Client): @@ -27,7 +27,7 @@ def __init__(self, base_url=None, creds=None): def get_accounts(self, owner_id=None, member_id=None, properties=None): """GetAccounts. - Get a list of accounts for a specific owner or a specific member. + Get a list of accounts for a specific owner or a specific member. One of the following parameters is required: ownerId, memberId. :param str owner_id: ID for the owner of the accounts. :param str member_id: ID for a member of the accounts. :param str properties: @@ -42,7 +42,7 @@ def get_accounts(self, owner_id=None, member_id=None, properties=None): query_parameters['properties'] = self._serialize.query('properties', properties, 'str') response = self._send(http_method='GET', location_id='229a6a53-b428-4ffb-a835-e8f36b5b4b1e', - version='5.1', + version='6.0', 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 c1f92f41..e97df114 100644 --- a/azure-devops/azure/devops/released/build/__init__.py +++ b/azure-devops/azure/devops/released/build/__init__.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------------------------- -from ...v5_1.build.models import * +from ...v6_0.build.models import * from .build_client import BuildClient __all__ = [ @@ -56,18 +56,28 @@ 'GraphSubjectBase', 'IdentityRef', 'Issue', + 'JobReference', 'JsonPatchOperation', + 'MinimalRetentionLease', + 'NewRetentionLease', + 'PhaseReference', + 'PipelineGeneralSettings', + 'PipelineReference', 'ProcessParameters', + 'ProjectRetentionSetting', 'PullRequest', 'ReferenceLinks', 'ReleaseReference', 'RepositoryWebhook', 'ResourceRef', + 'RetentionLease', 'RetentionPolicy', + 'RetentionSetting', 'SourceProviderAttributes', 'SourceRepositories', 'SourceRepository', 'SourceRepositoryItem', + 'StageReference', 'SupportedTrigger', 'TaskAgentPoolReference', 'TaskDefinitionReference', @@ -82,6 +92,9 @@ 'TimelineAttempt', 'TimelineRecord', 'TimelineReference', + 'UpdateProjectRetentionSettingModel', + 'UpdateRetentionSettingModel', + 'UpdateStageParameters', 'VariableGroup', 'VariableGroupReference', 'WebApiConnectedServiceRef', diff --git a/azure-devops/azure/devops/released/build/build_client.py b/azure-devops/azure/devops/released/build/build_client.py index 1c2e98b8..74e368f9 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_1.build import models +from ...v6_0.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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('Build', response) @@ -212,7 +212,7 @@ def get_builds(self, project, definitions=None, queues=None, build_number=None, :param [int] build_ids: A comma-delimited list that specifies the IDs of builds to retrieve. :param str repository_id: If specified, filters to builds that built from this repository. :param str repository_type: If specified, filters to builds that built from repositories of this type. - :rtype: :class:`` + :rtype: :class:`<[Build]> ` """ route_values = {} if project is not None: @@ -265,35 +265,21 @@ def get_builds(self, project, definitions=None, queues=None, build_number=None, query_parameters['repositoryType'] = self._serialize.query('repository_type', repository_type, 'str') response = self._send(http_method='GET', location_id='0cd358e1-9217-4d94-8269-1c1ee6f93dcf', - version='5.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) - response_value = self._deserialize('[Build]', self._unwrap_collection(response)) - continuation_token = self._get_continuation_token(response) - return self.GetBuildsResponseValue(response_value, continuation_token) - - class GetBuildsResponseValue(object): - def __init__(self, value, continuation_token): - """ - Response for the get_builds method - - :param value: - :type value: :class:`<[Build]> ` - :param continuation_token: The continuation token to be used to get the next page of results. - :type continuation_token: str - """ - self.value = value - self.continuation_token = continuation_token + 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): + def queue_build(self, build, project, ignore_warnings=None, check_in_ticket=None, source_build_id=None, definition_id=None): """QueueBuild. Queues a build - :param :class:` ` build: + :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:` ` + :param int definition_id: Optional definition id to queue a build without a body. Ignored if there's a valid body + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -305,10 +291,12 @@ def queue_build(self, build, project, ignore_warnings=None, check_in_ticket=None query_parameters['checkInTicket'] = self._serialize.query('check_in_ticket', check_in_ticket, 'str') if source_build_id is not None: query_parameters['sourceBuildId'] = self._serialize.query('source_build_id', source_build_id, 'int') + if definition_id is not None: + query_parameters['definitionId'] = self._serialize.query('definition_id', definition_id, 'int') content = self._serialize.body(build, 'Build') response = self._send(http_method='POST', location_id='0cd358e1-9217-4d94-8269-1c1ee6f93dcf', - version='5.1', + version='6.0', route_values=route_values, query_parameters=query_parameters, content=content) @@ -317,11 +305,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: @@ -334,7 +322,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', + version='6.0', route_values=route_values, query_parameters=query_parameters, content=content) @@ -353,7 +341,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.1', + version='6.0', route_values=route_values, content=content) return self._deserialize('[Build]', self._unwrap_collection(response)) @@ -366,7 +354,7 @@ def get_build_changes(self, project, build_id, continuation_token=None, top=None :param str continuation_token: :param int top: The maximum number of changes to return :param bool include_source_change: - :rtype: :class:`` + :rtype: :class:`<[Change]> ` """ route_values = {} if project is not None: @@ -382,38 +370,23 @@ 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', + version='6.0', route_values=route_values, query_parameters=query_parameters) - response_value = self._deserialize('[Change]', self._unwrap_collection(response)) - continuation_token = self._get_continuation_token(response) - return self.GetBuildChangesResponseValue(response_value, continuation_token) - - class GetBuildChangesResponseValue(object): - def __init__(self, value, continuation_token): - """ - Response for the get_build_changes method - - :param value: - :type value: :class:`<[Change]> ` - :param continuation_token: The continuation token to be used to get the next page of results. - :type continuation_token: str - """ - self.value = value - self.continuation_token = continuation_token + return self._deserialize('[Change]', self._unwrap_collection(response)) 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.1', + version='6.0', route_values=route_values) return self._deserialize('BuildController', response) @@ -428,18 +401,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.1', + version='6.0', 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: @@ -452,7 +425,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', + version='6.0', route_values=route_values, query_parameters=query_parameters, content=content) @@ -471,7 +444,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.1', + version='6.0', route_values=route_values) def get_definition(self, project, definition_id, revision=None, min_metrics_time=None, property_filters=None, include_latest_builds=None): @@ -483,7 +456,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: @@ -502,7 +475,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.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('BuildDefinition', response) @@ -527,7 +500,7 @@ def get_definitions(self, project, name=None, repository_id=None, repository_typ :param str task_id_filter: If specified, filters to definitions that use the specified task. :param int process_type: If specified, filters to definitions with the given process type. :param str yaml_filename: If specified, filters to YAML definitions that match the given filename. - :rtype: :class:`` + :rtype: :class:`<[BuildDefinitionReference]> ` """ route_values = {} if project is not None: @@ -568,25 +541,10 @@ 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', + version='6.0', route_values=route_values, query_parameters=query_parameters) - response_value = self._deserialize('[BuildDefinitionReference]', self._unwrap_collection(response)) - continuation_token = self._get_continuation_token(response) - return self.GetDefinitionsResponseValue(response_value, continuation_token) - - class GetDefinitionsResponseValue(object): - def __init__(self, value, continuation_token): - """ - Response for the get_definitions method - - :param value: - :type value: :class:`<[BuildDefinitionReference]> ` - :param continuation_token: The continuation token to be used to get the next page of results. - :type continuation_token: str - """ - self.value = value - self.continuation_token = continuation_token + return self._deserialize('[BuildDefinitionReference]', self._unwrap_collection(response)) def restore_definition(self, project, definition_id, deleted): """RestoreDefinition. @@ -594,7 +552,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: @@ -606,7 +564,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.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('BuildDefinition', response) @@ -614,12 +572,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 definition. + :param :class:` ` definition: The new version of the definition. :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: @@ -634,7 +592,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', + version='6.0', route_values=route_values, query_parameters=query_parameters, content=content) @@ -664,7 +622,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', + version='6.0', route_values=route_values, query_parameters=query_parameters, accept_media_type='text/plain') @@ -698,7 +656,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.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[str]', self._unwrap_collection(response)) @@ -717,7 +675,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.1', + version='6.0', route_values=route_values) return self._deserialize('[BuildLog]', self._unwrap_collection(response)) @@ -735,7 +693,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', + version='6.0', route_values=route_values, accept_media_type='application/zip') if "callback" in kwargs: @@ -768,7 +726,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', + version='6.0', route_values=route_values, query_parameters=query_parameters, accept_media_type='application/zip') @@ -789,7 +747,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', + version='6.0', route_values=route_values) return self._deserialize('[BuildOptionDefinition]', self._unwrap_collection(response)) @@ -807,7 +765,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.1', + version='6.0', route_values=route_values) return self._deserialize('[BuildDefinitionRevision]', self._unwrap_collection(response)) @@ -815,23 +773,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.1', + version='6.0', 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: @@ -839,7 +797,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', + version='6.0', route_values=route_values, content=content) return self._deserialize('BuildSettings', response) @@ -861,7 +819,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.1', + version='6.0', route_values=route_values) return self._deserialize('[str]', self._unwrap_collection(response)) @@ -881,7 +839,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.1', + version='6.0', route_values=route_values, content=content) return self._deserialize('[str]', self._unwrap_collection(response)) @@ -903,7 +861,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.1', + version='6.0', route_values=route_values) return self._deserialize('[str]', self._unwrap_collection(response)) @@ -921,13 +879,31 @@ 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', + version='6.0', + route_values=route_values) + return self._deserialize('[str]', self._unwrap_collection(response)) + + def delete_tag(self, project, tag): + """DeleteTag. + Removes a tag from builds, definitions, and from the tag store + :param str project: Project ID or project name + :param str tag: The tag to remove. + :rtype: [str] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if tag is not None: + route_values['tag'] = self._serialize.url('tag', tag, 'str') + response = self._send(http_method='DELETE', + location_id='d84ac5c6-edc7-43d5-adc9-1b34be5dea09', + version='6.0', 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. + Gets a list of all build tags in the project. :param str project: Project ID or project name :rtype: [str] """ @@ -936,7 +912,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.1', + version='6.0', route_values=route_values) return self._deserialize('[str]', self._unwrap_collection(response)) @@ -953,7 +929,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.1', + version='6.0', route_values=route_values) def get_template(self, project, template_id): @@ -961,7 +937,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: @@ -970,7 +946,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.1', + version='6.0', route_values=route_values) return self._deserialize('BuildDefinitionTemplate', response) @@ -985,17 +961,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.1', + version='6.0', 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: @@ -1005,7 +981,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.1', + version='6.0', route_values=route_values, content=content) return self._deserialize('BuildDefinitionTemplate', response) @@ -1018,7 +994,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: @@ -1034,7 +1010,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', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('Timeline', response) @@ -1057,7 +1033,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.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[ResourceRef]', self._unwrap_collection(response)) @@ -1082,7 +1058,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', + version='6.0', 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 3940d35b..d4c493bd 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.1 released clients. + A factory class to get the 6.0 released clients. """ def __init__(self, connection): @@ -17,155 +17,393 @@ def __init__(self, connection): def get_accounts_client(self): """get_accounts_client. - Gets the 5.1 version of the AccountsClient - :rtype: :class:` ` + Gets the 6.0 version of the AccountsClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.released.accounts.accounts_client.AccountsClient') + return self._connection.get_client('azure.devops.v6_0.accounts.accounts_client.AccountsClient') + + def get_audit_client(self): + """get_audit_client. + Gets the 6.0 version of the AuditClient + :rtype: :class:` ` + """ + return self._connection.get_client('azure.devops.v6_0.audit.audit_client.AuditClient') def get_build_client(self): """get_build_client. - Gets the 5.1 version of the BuildClient - :rtype: :class:` ` + Gets the 6.0 version of the BuildClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.released.build.build_client.BuildClient') + return self._connection.get_client('azure.devops.v6_0.build.build_client.BuildClient') + + def get_cix_client(self): + """get_cix_client. + Gets the 6.0 version of the CixClient + :rtype: :class:` ` + """ + return self._connection.get_client('azure.devops.v6_0.cix.cix_client.CixClient') + + def get_client_trace_client(self): + """get_client_trace_client. + Gets the 6.0 version of the ClientTraceClient + :rtype: :class:` ` + """ + return self._connection.get_client('azure.devops.v6_0.client_trace.client_trace_client.ClientTraceClient') def get_cloud_load_test_client(self): """get_cloud_load_test_client. - Gets the 5.1 version of the CloudLoadTestClient - :rtype: :class:` ` + Gets the 6.0 version of the CloudLoadTestClient + :rtype: :class:` ` + """ + return self._connection.get_client('azure.devops.v6_0.cloud_load_test.cloud_load_test_client.CloudLoadTestClient') + + def get_contributions_client(self): + """get_contributions_client. + Gets the 6.0 version of the ContributionsClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.released.cloud_load_test.cloud_load_test_client.CloudLoadTestClient') + return self._connection.get_client('azure.devops.v6_0.contributions.contributions_client.ContributionsClient') def get_core_client(self): """get_core_client. - Gets the 5.1 version of the CoreClient - :rtype: :class:` ` + Gets the 6.0 version of the CoreClient + :rtype: :class:` ` + """ + return self._connection.get_client('azure.devops.v6_0.core.core_client.CoreClient') + + def get_customer_intelligence_client(self): + """get_customer_intelligence_client. + Gets the 6.0 version of the CustomerIntelligenceClient + :rtype: :class:` ` + """ + return self._connection.get_client('azure.devops.v6_0.customer_intelligence.customer_intelligence_client.CustomerIntelligenceClient') + + def get_dashboard_client(self): + """get_dashboard_client. + Gets the 6.0 version of the DashboardClient + :rtype: :class:` ` + """ + return self._connection.get_client('azure.devops.v6_0.dashboard.dashboard_client.DashboardClient') + + def get_extension_management_client(self): + """get_extension_management_client. + Gets the 6.0 version of the ExtensionManagementClient + :rtype: :class:` ` + """ + return self._connection.get_client('azure.devops.v6_0.extension_management.extension_management_client.ExtensionManagementClient') + + def get_feature_availability_client(self): + """get_feature_availability_client. + Gets the 6.0 version of the FeatureAvailabilityClient + :rtype: :class:` ` + """ + return self._connection.get_client('azure.devops.v6_0.feature_availability.feature_availability_client.FeatureAvailabilityClient') + + def get_feature_management_client(self): + """get_feature_management_client. + Gets the 6.0 version of the FeatureManagementClient + :rtype: :class:` ` + """ + return self._connection.get_client('azure.devops.v6_0.feature_management.feature_management_client.FeatureManagementClient') + + def get_feed_client(self): + """get_feed_client. + Gets the 6.0 version of the FeedClient + :rtype: :class:` ` + """ + return self._connection.get_client('azure.devops.v6_0.feed.feed_client.FeedClient') + + def get_file_container_client(self): + """get_file_container_client. + Gets the 6.0 version of the FileContainerClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.released.core.core_client.CoreClient') + return self._connection.get_client('azure.devops.v6_0.file_container.file_container_client.FileContainerClient') + + def get_gallery_client(self): + """get_gallery_client. + Gets the 6.0 version of the GalleryClient + :rtype: :class:` ` + """ + return self._connection.get_client('azure.devops.v6_0.gallery.gallery_client.GalleryClient') def get_git_client(self): """get_git_client. - Gets the 5.1 version of the GitClient - :rtype: :class:` ` + Gets the 6.0 version of the GitClient + :rtype: :class:` ` + """ + return self._connection.get_client('azure.devops.v6_0.git.git_client.GitClient') + + def get_graph_client(self): + """get_graph_client. + Gets the 6.0 version of the GraphClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.released.git.git_client.GitClient') + return self._connection.get_client('azure.devops.v6_0.graph.graph_client.GraphClient') def get_identity_client(self): """get_identity_client. - Gets the 5.1 version of the IdentityClient - :rtype: :class:` ` + Gets the 6.0 version of the IdentityClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.released.identity.identity_client.IdentityClient') + return self._connection.get_client('azure.devops.v6_0.identity.identity_client.IdentityClient') + + def get_location_client(self): + """get_location_client. + Gets the 6.0 version of the LocationClient + :rtype: :class:` ` + """ + return self._connection.get_client('azure.devops.v6_0.location.location_client.LocationClient') + + def get_maven_client(self): + """get_maven_client. + Gets the 6.0 version of the MavenClient + :rtype: :class:` ` + """ + return self._connection.get_client('azure.devops.v6_0.maven.maven_client.MavenClient') + + def get_member_entitlement_management_client(self): + """get_member_entitlement_management_client. + Gets the 6.0 version of the MemberEntitlementManagementClient + :rtype: :class:` ` + """ + return self._connection.get_client('azure.devops.v6_0.member_entitlement_management.member_entitlement_management_client.MemberEntitlementManagementClient') def get_notification_client(self): """get_notification_client. - Gets the 5.1 version of the NotificationClient - :rtype: :class:` ` + Gets the 6.0 version of the NotificationClient + :rtype: :class:` ` + """ + return self._connection.get_client('azure.devops.v6_0.notification.notification_client.NotificationClient') + + def get_npm_client(self): + """get_npm_client. + Gets the 6.0 version of the NpmClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.released.notification.notification_client.NotificationClient') + return self._connection.get_client('azure.devops.v6_0.npm.npm_client.NpmClient') + + def get_nuget_client(self): + """get_nuget_client. + Gets the 6.0 version of the NuGetClient + :rtype: :class:` ` + """ + return self._connection.get_client('azure.devops.v6_0.nuget.nuget_client.NuGetClient') def get_operations_client(self): """get_operations_client. - Gets the 5.1 version of the OperationsClient - :rtype: :class:` ` + Gets the 6.0 version of the OperationsClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.released.operations.operations_client.OperationsClient') + return self._connection.get_client('azure.devops.v6_0.operations.operations_client.OperationsClient') + + def get_pipeline_permissions_client(self): + """get_pipeline_permissions_client. + Gets the 6.0 version of the PipelinePermissionsClient + :rtype: :class:` ` + """ + return self._connection.get_client('azure.devops.v6_0.pipeline_permissions.pipeline_permissions_client.PipelinePermissionsClient') + + def get_pipelines_client(self): + """get_pipelines_client. + Gets the 6.0 version of the PipelinesClient + :rtype: :class:` ` + """ + return self._connection.get_client('azure.devops.v6_0.pipelines.pipelines_client.PipelinesClient') + + def get_pipelines_checks_client(self): + """get_pipelines_checks_client. + Gets the 6.0 version of the PipelinesChecksClient + :rtype: :class:` ` + """ + return self._connection.get_client('azure.devops.v6_0.pipelines_checks.pipelines_checks_client.PipelinesChecksClient') def get_policy_client(self): """get_policy_client. - Gets the 5.1 version of the PolicyClient - :rtype: :class:` ` + Gets the 6.0 version of the PolicyClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.released.policy.policy_client.PolicyClient') + return self._connection.get_client('azure.devops.v6_0.policy.policy_client.PolicyClient') def get_profile_client(self): """get_profile_client. - Gets the 5.1 version of the ProfileClient - :rtype: :class:` ` + Gets the 6.0 version of the ProfileClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.released.profile.profile_client.ProfileClient') + return self._connection.get_client('azure.devops.v6_0.profile.profile_client.ProfileClient') + + def get_profile_regions_client(self): + """get_profile_regions_client. + Gets the 6.0 version of the ProfileRegionsClient + :rtype: :class:` ` + """ + return self._connection.get_client('azure.devops.v6_0.profile_regions.profile_regions_client.ProfileRegionsClient') + + def get_project_analysis_client(self): + """get_project_analysis_client. + Gets the 6.0 version of the ProjectAnalysisClient + :rtype: :class:` ` + """ + return self._connection.get_client('azure.devops.v6_0.project_analysis.project_analysis_client.ProjectAnalysisClient') + + def get_provenance_client(self): + """get_provenance_client. + Gets the 6.0 version of the ProvenanceClient + :rtype: :class:` ` + """ + return self._connection.get_client('azure.devops.v6_0.provenance.provenance_client.ProvenanceClient') + + def get_py_pi_api_client(self): + """get_py_pi_api_client. + Gets the 6.0 version of the PyPiApiClient + :rtype: :class:` ` + """ + return self._connection.get_client('azure.devops.v6_0.py_pi_api.py_pi_api_client.PyPiApiClient') def get_release_client(self): """get_release_client. - Gets the 5.1 version of the ReleaseClient - :rtype: :class:` ` + Gets the 6.0 version of the ReleaseClient + :rtype: :class:` ` + """ + return self._connection.get_client('azure.devops.v6_0.release.release_client.ReleaseClient') + + def get_search_client(self): + """get_search_client. + Gets the 6.0 version of the SearchClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.released.release.release_client.ReleaseClient') + return self._connection.get_client('azure.devops.v6_0.search.search_client.SearchClient') def get_security_client(self): """get_security_client. - Gets the 5.1 version of the SecurityClient - :rtype: :class:` ` + Gets the 6.0 version of the SecurityClient + :rtype: :class:` ` + """ + return self._connection.get_client('azure.devops.v6_0.security.security_client.SecurityClient') + + def get_service_endpoint_client(self): + """get_service_endpoint_client. + Gets the 6.0 version of the ServiceEndpointClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.released.security.security_client.SecurityClient') + return self._connection.get_client('azure.devops.v6_0.service_endpoint.service_endpoint_client.ServiceEndpointClient') def get_service_hooks_client(self): """get_service_hooks_client. - Gets the 5.1 version of the ServiceHooksClient - :rtype: :class:` ` + Gets the 6.0 version of the ServiceHooksClient + :rtype: :class:` ` + """ + return self._connection.get_client('azure.devops.v6_0.service_hooks.service_hooks_client.ServiceHooksClient') + + def get_settings_client(self): + """get_settings_client. + Gets the 6.0 version of the SettingsClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.released.service_hooks.service_hooks_client.ServiceHooksClient') + return self._connection.get_client('azure.devops.v6_0.settings.settings_client.SettingsClient') + + def get_symbol_client(self): + """get_symbol_client. + Gets the 6.0 version of the SymbolClient + :rtype: :class:` ` + """ + return self._connection.get_client('azure.devops.v6_0.symbol.symbol_client.SymbolClient') def get_task_client(self): """get_task_client. - Gets the 5.1 version of the TaskClient - :rtype: :class:` ` + Gets the 6.0 version of the TaskClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.released.task.task_client.TaskClient') + return self._connection.get_client('azure.devops.v6_0.task.task_client.TaskClient') def get_task_agent_client(self): """get_task_agent_client. - Gets the 5.1 version of the TaskAgentClient - :rtype: :class:` ` + Gets the 6.0 version of the TaskAgentClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.released.task_agent.task_agent_client.TaskAgentClient') + return self._connection.get_client('azure.devops.v6_0.task_agent.task_agent_client.TaskAgentClient') def get_test_client(self): """get_test_client. - Gets the 5.1 version of the TestClient - :rtype: :class:` ` + Gets the 6.0 version of the TestClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.released.test.test_client.TestClient') + return self._connection.get_client('azure.devops.v6_0.test.test_client.TestClient') def get_test_plan_client(self): """get_test_plan_client. - Gets the 5.1 version of the TestPlanClient - :rtype: :class:` ` + Gets the 6.0 version of the TestPlanClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.released.test_plan.test_plan_client.TestPlanClient') + return self._connection.get_client('azure.devops.v6_0.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:` ` + Gets the 6.0 version of the TestResultsClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.released.test_results.test_results_client.TestResultsClient') + return self._connection.get_client('azure.devops.v6_0.test_results.test_results_client.TestResultsClient') def get_tfvc_client(self): """get_tfvc_client. - Gets the 5.1 version of the TfvcClient - :rtype: :class:` ` + Gets the 6.0 version of the TfvcClient + :rtype: :class:` ` + """ + return self._connection.get_client('azure.devops.v6_0.tfvc.tfvc_client.TfvcClient') + + def get_token_admin_client(self): + """get_token_admin_client. + Gets the 6.0 version of the TokenAdminClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.released.tfvc.tfvc_client.TfvcClient') + return self._connection.get_client('azure.devops.v6_0.token_admin.token_admin_client.TokenAdminClient') + + def get_upack_api_client(self): + """get_upack_api_client. + Gets the 6.0 version of the UPackApiClient + :rtype: :class:` ` + """ + return self._connection.get_client('azure.devops.v6_0.upack_api.upack_api_client.UPackApiClient') + + def get_upack_packaging_client(self): + """get_upack_packaging_client. + Gets the 6.0 version of the UPackPackagingClient + :rtype: :class:` ` + """ + return self._connection.get_client('azure.devops.v6_0.upack_packaging.upack_packaging_client.UPackPackagingClient') def get_wiki_client(self): """get_wiki_client. - Gets the 5.1 version of the WikiClient - :rtype: :class:` ` + Gets the 6.0 version of the WikiClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.released.wiki.wiki_client.WikiClient') + return self._connection.get_client('azure.devops.v6_0.wiki.wiki_client.WikiClient') def get_work_client(self): """get_work_client. - Gets the 5.1 version of the WorkClient - :rtype: :class:` ` + Gets the 6.0 version of the WorkClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.released.work.work_client.WorkClient') + return self._connection.get_client('azure.devops.v6_0.work.work_client.WorkClient') def get_work_item_tracking_client(self): """get_work_item_tracking_client. - Gets the 5.1 version of the WorkItemTrackingClient - :rtype: :class:` ` + Gets the 6.0 version of the WorkItemTrackingClient + :rtype: :class:` ` + """ + return self._connection.get_client('azure.devops.v6_0.work_item_tracking.work_item_tracking_client.WorkItemTrackingClient') + + def get_work_item_tracking_process_client(self): + """get_work_item_tracking_process_client. + Gets the 6.0 version of the WorkItemTrackingProcessClient + :rtype: :class:` ` + """ + return self._connection.get_client('azure.devops.v6_0.work_item_tracking_process.work_item_tracking_process_client.WorkItemTrackingProcessClient') + + def get_work_item_tracking_process_template_client(self): + """get_work_item_tracking_process_template_client. + Gets the 6.0 version of the WorkItemTrackingProcessTemplateClient + :rtype: :class:` ` """ - return self._connection.get_client('azure.devops.released.work_item_tracking.work_item_tracking_client.WorkItemTrackingClient') + return self._connection.get_client('azure.devops.v6_0.work_item_tracking_process_template.work_item_tracking_process_template_client.WorkItemTrackingProcessTemplateClient') 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 0f19b61e..c62f4740 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_1.cloud_load_test.models import * +from ...v6_0.cloud_load_test.models import * from .cloud_load_test_client import CloudLoadTestClient __all__ = [ 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 d1554263..d500aad8 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_1.cloud_load_test import models +from ...v6_0.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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1') + version='6.0') 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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 193a2d3c..10b476e4 100644 --- a/azure-devops/azure/devops/released/core/__init__.py +++ b/azure-devops/azure/devops/released/core/__init__.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------------------------- -from ...v5_1.core.models import * +from ...v6_0.core.models import * from .core_client import CoreClient __all__ = [ diff --git a/azure-devops/azure/devops/released/core/core_client.py b/azure-devops/azure/devops/released/core/core_client.py index d5ca0c16..d36dc7df 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_1.core import models +from ...v6_0.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.1', + version='6.0', 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.1', + version='6.0', 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.1') + version='6.0') 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('TeamProject', response) @@ -140,7 +140,7 @@ def get_projects(self, state_filter=None, top=None, skip=None, continuation_toke :param int skip: :param str continuation_token: :param bool get_default_team_image_url: - :rtype: :class:`` + :rtype: :class:`<[TeamProjectReference]> ` """ query_parameters = {} if state_filter is not None: @@ -155,35 +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.1', + version='6.0', query_parameters=query_parameters) - response_value = self._deserialize('[TeamProjectReference]', self._unwrap_collection(response)) - continuation_token = self._get_continuation_token(response) - return self.GetProjectsResponseValue(response_value, continuation_token) - - class GetProjectsResponseValue(object): - def __init__(self, value, continuation_token): - """ - Response for the get_projects method - - :param value: - :type value: :class:`<[TeamProjectReference]> ` - :param continuation_token: The continuation token to be used to get the next page of results. - :type continuation_token: str - """ - self.value = value - self.continuation_token = continuation_token + 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.1', + version='6.0', content=content) return self._deserialize('OperationReference', response) @@ -191,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.1', + version='6.0', route_values=route_values) return self._deserialize('OperationReference', response) def update_project(self, project_update, project_id): """UpdateProject. Update an existing project's name, abbreviation, description, or restore a project. - :param :class:` ` project_update: The updates for the project. The state must be set to wellFormed to restore the project. + :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: @@ -215,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.1', + version='6.0', route_values=route_values, content=content) return self._deserialize('OperationReference', response) @@ -223,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: @@ -233,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.1', + version='6.0', route_values=route_values, content=content) return self._deserialize('WebApiTeam', response) @@ -251,7 +236,7 @@ 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', + version='6.0', route_values=route_values) def get_team(self, project_id, team_id, expand_identity=None): @@ -260,7 +245,7 @@ def get_team(self, project_id, team_id, expand_identity=None): :param str project_id: The name or ID (GUID) of the team project containing the team. :param str team_id: The name or ID (GUID) of the team. :param bool expand_identity: A value indicating whether or not to expand Identity information in the result WebApiTeam object. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project_id is not None: @@ -272,7 +257,7 @@ 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', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('WebApiTeam', response) @@ -301,7 +286,7 @@ 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', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[WebApiTeam]', self._unwrap_collection(response)) @@ -309,10 +294,10 @@ def get_teams(self, project_id, mine=None, top=None, skip=None, expand_identity= 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: @@ -322,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.1', + version='6.0', 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 581a92e4..0566f3a7 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_1.git.models import * +from ...v6_0.git.models import * from .git_client import GitClient __all__ = [ diff --git a/azure-devops/azure/devops/released/git/git_client.py b/azure-devops/azure/devops/released/git/git_client.py deleted file mode 100644 index b2900002..00000000 --- a/azure-devops/azure/devops/released/git/git_client.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 - -from .git_client_base import GitClientBase - - -class GitClient(GitClientBase): - """Git - :param str base_url: Service URL - :param Authentication creds: Authenticated credentials. - """ - - def __init__(self, base_url=None, creds=None): - super(GitClient, self).__init__(base_url, creds) 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 38158300..b2a114d9 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_1.git import models +from ...v6_0.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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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: @@ -384,13 +384,15 @@ def get_commits(self, repository_id, search_criteria, project=None, skip=None, t query_parameters['searchCriteria.includePushData'] = search_criteria.include_push_data if search_criteria.history_mode is not None: query_parameters['searchCriteria.historyMode'] = search_criteria.history_mode + if search_criteria.show_oldest_commits_first is not None: + query_parameters['searchCriteria.showOldestCommitsFirst'] = search_criteria.show_oldest_commits_first if skip is not None: query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') if top is not None: query_parameters['$top'] = self._serialize.query('top', top, 'int') response = self._send(http_method='GET', location_id='c2570c3b-5b3f-41b8-98bf-5407bfde8d58', - version='5.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[GitCommitRef]', self._unwrap_collection(response)) @@ -422,7 +424,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.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[GitCommitRef]', self._unwrap_collection(response)) @@ -430,7 +432,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,13 +455,13 @@ 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', + version='6.0', route_values=route_values, query_parameters=query_parameters, content=content) return self._deserialize('[GitCommitRef]', self._unwrap_collection(response)) - def get_item(self, repository_id, path, project=None, scope_path=None, recursion_level=None, include_content_metadata=None, latest_processed_change=None, download=None, version_descriptor=None, include_content=None, resolve_lfs=None): + def get_item(self, repository_id, path, project=None, scope_path=None, recursion_level=None, include_content_metadata=None, latest_processed_change=None, download=None, version_descriptor=None, include_content=None, resolve_lfs=None, sanitize=None): """GetItem. Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content, which is always returned as a download. :param str repository_id: The name or ID of the repository. @@ -470,10 +472,11 @@ def get_item(self, repository_id, path, project=None, scope_path=None, recursion :param bool include_content_metadata: Set to true to include content metadata. Default is false. :param bool latest_processed_change: Set to true to include the latest changes. Default is false. :param bool download: Set to true to download the response as a file. Default is false. - :param :class:` ` version_descriptor: Version descriptor. Default is the default branch for the repository. + :param :class:` ` version_descriptor: Version descriptor. Default is the default branch for the repository. :param bool include_content: Set to true to include item content when requesting json. Default is false. :param bool resolve_lfs: Set to true to resolve Git LFS pointer files to return actual content from Git LFS. Default is false. - :rtype: :class:` ` + :param bool sanitize: Set to true to sanitize an svg file and return it as image. Useful only if requested for svg file. Default is false. + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -504,14 +507,16 @@ def get_item(self, repository_id, path, project=None, scope_path=None, recursion query_parameters['includeContent'] = self._serialize.query('include_content', include_content, 'bool') if resolve_lfs is not None: query_parameters['resolveLfs'] = self._serialize.query('resolve_lfs', resolve_lfs, 'bool') + if sanitize is not None: + query_parameters['sanitize'] = self._serialize.query('sanitize', sanitize, 'bool') response = self._send(http_method='GET', location_id='fb93c0db-47ed-4a31-8c20-47552878fb44', - version='5.1', + version='6.0', 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): + def get_item_content(self, repository_id, path, project=None, scope_path=None, recursion_level=None, include_content_metadata=None, latest_processed_change=None, download=None, version_descriptor=None, include_content=None, resolve_lfs=None, sanitize=None, **kwargs): """GetItemContent. Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content, which is always returned as a download. :param str repository_id: The name or ID of the repository. @@ -522,9 +527,10 @@ def get_item_content(self, repository_id, path, project=None, scope_path=None, r :param bool include_content_metadata: Set to true to include content metadata. Default is false. :param bool latest_processed_change: Set to true to include the latest changes. Default is false. :param bool download: Set to true to download the response as a file. Default is false. - :param :class:` ` version_descriptor: Version descriptor. Default is the default branch for the repository. + :param :class:` ` version_descriptor: Version descriptor. Default is the default branch for the repository. :param bool include_content: Set to true to include item content when requesting json. Default is false. :param bool resolve_lfs: Set to true to resolve Git LFS pointer files to return actual content from Git LFS. Default is false. + :param bool sanitize: Set to true to sanitize an svg file and return it as image. Useful only if requested for svg file. Default is false. :rtype: object """ route_values = {} @@ -556,9 +562,11 @@ def get_item_content(self, repository_id, path, project=None, scope_path=None, r query_parameters['includeContent'] = self._serialize.query('include_content', include_content, 'bool') if resolve_lfs is not None: query_parameters['resolveLfs'] = self._serialize.query('resolve_lfs', resolve_lfs, 'bool') + if sanitize is not None: + query_parameters['sanitize'] = self._serialize.query('sanitize', sanitize, 'bool') response = self._send(http_method='GET', location_id='fb93c0db-47ed-4a31-8c20-47552878fb44', - version='5.1', + version='6.0', route_values=route_values, query_parameters=query_parameters, accept_media_type='application/octet-stream') @@ -579,7 +587,7 @@ def get_items(self, repository_id, project=None, scope_path=None, recursion_leve :param bool latest_processed_change: Set to true to include the latest changes. Default is false. :param bool download: Set to true to download the response as a file. Default is false. :param bool include_links: Set to true to include links to items. Default is false. - :param :class:` ` version_descriptor: Version descriptor. Default is the default branch for the repository. + :param :class:` ` version_descriptor: Version descriptor. Default is the default branch for the repository. :rtype: [GitItem] """ route_values = {} @@ -609,12 +617,12 @@ 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', + version='6.0', 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): + def get_item_text(self, repository_id, path, project=None, scope_path=None, recursion_level=None, include_content_metadata=None, latest_processed_change=None, download=None, version_descriptor=None, include_content=None, resolve_lfs=None, sanitize=None, **kwargs): """GetItemText. Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content, which is always returned as a download. :param str repository_id: The name or ID of the repository. @@ -625,9 +633,10 @@ def get_item_text(self, repository_id, path, project=None, scope_path=None, recu :param bool include_content_metadata: Set to true to include content metadata. Default is false. :param bool latest_processed_change: Set to true to include the latest changes. Default is false. :param bool download: Set to true to download the response as a file. Default is false. - :param :class:` ` version_descriptor: Version descriptor. Default is the default branch for the repository. + :param :class:` ` version_descriptor: Version descriptor. Default is the default branch for the repository. :param bool include_content: Set to true to include item content when requesting json. Default is false. :param bool resolve_lfs: Set to true to resolve Git LFS pointer files to return actual content from Git LFS. Default is false. + :param bool sanitize: Set to true to sanitize an svg file and return it as image. Useful only if requested for svg file. Default is false. :rtype: object """ route_values = {} @@ -659,9 +668,11 @@ def get_item_text(self, repository_id, path, project=None, scope_path=None, recu query_parameters['includeContent'] = self._serialize.query('include_content', include_content, 'bool') if resolve_lfs is not None: query_parameters['resolveLfs'] = self._serialize.query('resolve_lfs', resolve_lfs, 'bool') + if sanitize is not None: + query_parameters['sanitize'] = self._serialize.query('sanitize', sanitize, 'bool') response = self._send(http_method='GET', location_id='fb93c0db-47ed-4a31-8c20-47552878fb44', - version='5.1', + version='6.0', route_values=route_values, query_parameters=query_parameters, accept_media_type='text/plain') @@ -671,7 +682,7 @@ def get_item_text(self, repository_id, path, project=None, scope_path=None, recu callback = None return self._client.stream_download(response, callback=callback) - 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): + def get_item_zip(self, repository_id, path, project=None, scope_path=None, recursion_level=None, include_content_metadata=None, latest_processed_change=None, download=None, version_descriptor=None, include_content=None, resolve_lfs=None, sanitize=None, **kwargs): """GetItemZip. Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content, which is always returned as a download. :param str repository_id: The name or ID of the repository. @@ -682,9 +693,10 @@ def get_item_zip(self, repository_id, path, project=None, scope_path=None, recur :param bool include_content_metadata: Set to true to include content metadata. Default is false. :param bool latest_processed_change: Set to true to include the latest changes. Default is false. :param bool download: Set to true to download the response as a file. Default is false. - :param :class:` ` version_descriptor: Version descriptor. Default is the default branch for the repository. + :param :class:` ` version_descriptor: Version descriptor. Default is the default branch for the repository. :param bool include_content: Set to true to include item content when requesting json. Default is false. :param bool resolve_lfs: Set to true to resolve Git LFS pointer files to return actual content from Git LFS. Default is false. + :param bool sanitize: Set to true to sanitize an svg file and return it as image. Useful only if requested for svg file. Default is false. :rtype: object """ route_values = {} @@ -716,9 +728,11 @@ def get_item_zip(self, repository_id, path, project=None, scope_path=None, recur query_parameters['includeContent'] = self._serialize.query('include_content', include_content, 'bool') if resolve_lfs is not None: query_parameters['resolveLfs'] = self._serialize.query('resolve_lfs', resolve_lfs, 'bool') + if sanitize is not None: + query_parameters['sanitize'] = self._serialize.query('sanitize', sanitize, 'bool') response = self._send(http_method='GET', location_id='fb93c0db-47ed-4a31-8c20-47552878fb44', - version='5.1', + version='6.0', route_values=route_values, query_parameters=query_parameters, accept_media_type='application/zip') @@ -731,7 +745,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,7 +758,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', + version='6.0', route_values=route_values, content=content) return self._deserialize('[[GitItem]]', self._unwrap_collection(response)) @@ -776,7 +790,7 @@ 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', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[GitCommitRef]', self._unwrap_collection(response)) @@ -789,7 +803,7 @@ def get_pull_request_commits(self, repository_id, pull_request_id, project=None, :param str project: Project ID or project name :param int top: Maximum number of commits to return. :param str continuation_token: The continuation token used for pagination. - :rtype: :class:`` + :rtype: :class:`<[GitCommitRef]> ` """ route_values = {} if project is not None: @@ -805,25 +819,10 @@ def get_pull_request_commits(self, repository_id, pull_request_id, project=None, query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'str') response = self._send(http_method='GET', location_id='52823034-34a8-4576-922c-8d8b77e9e4c4', - version='5.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) - response_value = self._deserialize('[GitCommitRef]', self._unwrap_collection(response)) - continuation_token = self._get_continuation_token(response) - return self.GetPullRequestCommitsResponseValue(response_value, continuation_token) - - class GetPullRequestCommitsResponseValue(object): - def __init__(self, value, continuation_token): - """ - Response for the get_pull_request_commits method - - :param value: - :type value: :class:`<[GitCommitRef]> ` - :param continuation_token: The continuation token to be used to get the next page of results. - :type continuation_token: str - """ - self.value = value - self.continuation_token = continuation_token + 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. @@ -835,7 +834,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: @@ -855,7 +854,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.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('GitPullRequestIterationChanges', response) @@ -867,7 +866,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: @@ -880,7 +879,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.1', + version='6.0', route_values=route_values) return self._deserialize('GitPullRequestIteration', response) @@ -905,7 +904,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', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[GitPullRequestIteration]', self._unwrap_collection(response)) @@ -913,10 +912,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: @@ -926,7 +925,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.1', + version='6.0', route_values=route_values, content=content) return self._deserialize('GitPullRequestQuery', response) @@ -934,12 +933,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 str repository_id: The repository ID of the pull request’s target branch. + :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: @@ -953,7 +952,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.1', + version='6.0', route_values=route_values, content=content) return self._deserialize('IdentityRefWithVote', response) @@ -962,7 +961,7 @@ def create_pull_request_reviewers(self, reviewers, repository_id, pull_request_i """CreatePullRequestReviewers. 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 str repository_id: The repository ID of the pull request's target branch. :param int pull_request_id: ID of the pull request. :param str project: Project ID or project name :rtype: [IdentityRefWithVote] @@ -977,15 +976,39 @@ 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', + version='6.0', route_values=route_values, content=content) return self._deserialize('[IdentityRefWithVote]', self._unwrap_collection(response)) + def create_unmaterialized_pull_request_reviewer(self, reviewer, repository_id, pull_request_id, project=None): + """CreateUnmaterializedPullRequestReviewer. + Add an unmaterialized identity to the reviewers of a pull request. + :param :class:` ` reviewer: Reviewer to add to the pull request. + :param str repository_id: The repository ID of the pull request's target branch. + :param int pull_request_id: ID of the pull request. + :param str project: Project ID or project name + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') + content = self._serialize.body(reviewer, 'IdentityRefWithVote') + response = self._send(http_method='PUT', + location_id='4b6702c7-aa35-4b89-9c96-b9abf6d3e540', + version='6.0', + route_values=route_values, + content=content) + return self._deserialize('IdentityRefWithVote', response) + def delete_pull_request_reviewer(self, repository_id, pull_request_id, reviewer_id, project=None): """DeletePullRequestReviewer. Remove a reviewer from a pull request. - :param str repository_id: The repository ID of the pull request’s target branch. + :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. :param str project: Project ID or project name @@ -1001,17 +1024,17 @@ def delete_pull_request_reviewer(self, repository_id, pull_request_id, reviewer_ route_values['reviewerId'] = self._serialize.url('reviewer_id', reviewer_id, 'str') self._send(http_method='DELETE', location_id='4b6702c7-aa35-4b89-9c96-b9abf6d3e540', - version='5.1', + version='6.0', route_values=route_values) def get_pull_request_reviewer(self, repository_id, pull_request_id, reviewer_id, project=None): """GetPullRequestReviewer. Retrieve information about a particular reviewer on a pull request - :param str repository_id: The repository ID of the pull request’s target branch. + :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: @@ -1024,14 +1047,14 @@ 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', + version='6.0', route_values=route_values) return self._deserialize('IdentityRefWithVote', response) def get_pull_request_reviewers(self, repository_id, pull_request_id, project=None): """GetPullRequestReviewers. Retrieve the reviewers for a pull request - :param str repository_id: The repository ID of the pull request’s target branch. + :param str repository_id: The repository ID of the pull request's target branch. :param int pull_request_id: ID of the pull request. :param str project: Project ID or project name :rtype: [IdentityRefWithVote] @@ -1045,15 +1068,42 @@ 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', + version='6.0', route_values=route_values) return self._deserialize('[IdentityRefWithVote]', self._unwrap_collection(response)) + def update_pull_request_reviewer(self, reviewer, repository_id, pull_request_id, reviewer_id, project=None): + """UpdatePullRequestReviewer. + Edit a reviewer entry. These fields are patchable: isFlagged, hasDeclined + :param :class:` ` reviewer: Reviewer data.
If the reviewer's ID is included here, it must match the reviewerID parameter. + :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:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') + if reviewer_id is not None: + route_values['reviewerId'] = self._serialize.url('reviewer_id', reviewer_id, 'str') + content = self._serialize.body(reviewer, 'IdentityRefWithVote') + response = self._send(http_method='PATCH', + location_id='4b6702c7-aa35-4b89-9c96-b9abf6d3e540', + version='6.0', + route_values=route_values, + content=content) + return self._deserialize('IdentityRefWithVote', response) + def update_pull_request_reviewers(self, patch_votes, repository_id, pull_request_id, project=None): """UpdatePullRequestReviewers. Reset the votes of multiple reviewers on a pull request. NOTE: This endpoint only supports updating votes, but does not support updating required reviewers (use policy) or display names. :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 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 """ @@ -1067,7 +1117,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.1', + version='6.0', route_values=route_values, content=content) @@ -1076,7 +1126,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: @@ -1085,7 +1135,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.1', + version='6.0', route_values=route_values) return self._deserialize('GitPullRequest', response) @@ -1093,7 +1143,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. @@ -1128,7 +1178,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.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[GitPullRequest]', self._unwrap_collection(response)) @@ -1136,11 +1186,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: @@ -1153,7 +1203,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', + version='6.0', route_values=route_values, query_parameters=query_parameters, content=content) @@ -1170,7 +1220,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: @@ -1192,7 +1242,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.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('GitPullRequest', response) @@ -1201,7 +1251,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. @@ -1239,7 +1289,7 @@ 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', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[GitPullRequest]', self._unwrap_collection(response)) @@ -1247,11 +1297,11 @@ def get_pull_requests(self, repository_id, search_criteria, project=None, max_co def update_pull_request(self, git_pull_request_to_update, repository_id, pull_request_id, project=None): """UpdatePullRequest. Update a pull request - :param :class:` ` git_pull_request_to_update: The pull request content that should be updated. + :param :class:` ` git_pull_request_to_update: The pull request content that should be updated. :param str repository_id: The repository ID of the pull request's target branch. :param int pull_request_id: ID of the pull request to update. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -1263,7 +1313,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', + version='6.0', route_values=route_values, content=content) return self._deserialize('GitPullRequest', response) @@ -1271,12 +1321,12 @@ def update_pull_request(self, git_pull_request_to_update, repository_id, pull_re def create_comment(self, comment, repository_id, pull_request_id, thread_id, project=None): """CreateComment. Create a comment on a specific thread in a pull request (up to 500 comments can be created per thread). - :param :class:` ` comment: The comment to create. Comments can be up to 150,000 characters. + :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: @@ -1290,7 +1340,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.1', + version='6.0', route_values=route_values, content=content) return self._deserialize('Comment', response) @@ -1317,7 +1367,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.1', + version='6.0', route_values=route_values) def get_comment(self, repository_id, pull_request_id, thread_id, comment_id, project=None): @@ -1328,7 +1378,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: @@ -1343,7 +1393,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.1', + version='6.0', route_values=route_values) return self._deserialize('Comment', response) @@ -1367,20 +1417,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.1', + version='6.0', route_values=route_values) return self._deserialize('[Comment]', self._unwrap_collection(response)) def update_comment(self, comment, repository_id, pull_request_id, thread_id, comment_id, project=None): """UpdateComment. Update a comment associated with a specific thread in a pull request. - :param :class:` ` comment: The comment content that should be updated. Comments can be up to 150,000 characters. + :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: @@ -1396,7 +1446,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.1', + version='6.0', route_values=route_values, content=content) return self._deserialize('Comment', response) @@ -1404,11 +1454,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: @@ -1420,7 +1470,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.1', + version='6.0', route_values=route_values, content=content) return self._deserialize('GitPullRequestCommentThread', response) @@ -1434,7 +1484,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: @@ -1452,7 +1502,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.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('GitPullRequestCommentThread', response) @@ -1481,7 +1531,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.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[GitPullRequestCommentThread]', self._unwrap_collection(response)) @@ -1489,12 +1539,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: @@ -1508,7 +1558,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.1', + version='6.0', route_values=route_values, content=content) return self._deserialize('GitPullRequestCommentThread', response) @@ -1530,17 +1580,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.1', + version='6.0', 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: @@ -1550,7 +1600,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.1', + version='6.0', route_values=route_values, content=content) return self._deserialize('GitPush', response) @@ -1563,7 +1613,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: @@ -1579,7 +1629,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.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('GitPush', response) @@ -1591,7 +1641,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 = {} @@ -1619,7 +1669,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', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[GitPush]', self._unwrap_collection(response)) @@ -1638,7 +1688,7 @@ def get_refs(self, repository_id, project=None, filter=None, include_links=None, :param str filter_contains: [optional] A filter to apply to the refs (contains). :param int top: [optional] Maximum number of refs to return. It cannot be bigger than 1000. If it is not provided but continuationToken is, top will default to 100. :param str continuation_token: The continuation token used for pagination. - :rtype: :class:`` + :rtype: :class:`<[GitRef]> ` """ route_values = {} if project is not None: @@ -1666,35 +1716,20 @@ def get_refs(self, repository_id, project=None, filter=None, include_links=None, query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'str') response = self._send(http_method='GET', location_id='2d874a60-a811-4f62-9c9f-963a6ea0a55b', - version='5.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) - response_value = self._deserialize('[GitRef]', self._unwrap_collection(response)) - continuation_token = self._get_continuation_token(response) - return self.GetRefsResponseValue(response_value, continuation_token) - - class GetRefsResponseValue(object): - def __init__(self, value, continuation_token): - """ - Response for the get_refs method - - :param value: - :type value: :class:`<[GitRef]> ` - :param continuation_token: The continuation token to be used to get the next page of results. - :type continuation_token: str - """ - self.value = value - self.continuation_token = continuation_token + return self._deserialize('[GitRef]', self._unwrap_collection(response)) def update_ref(self, new_ref_info, repository_id, filter, project=None, project_id=None): """UpdateRef. Lock or Unlock a branch. - :param :class:` ` new_ref_info: The ref update action (lock/unlock) to perform + :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: @@ -1709,7 +1744,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', + version='6.0', route_values=route_values, query_parameters=query_parameters, content=content) @@ -1735,7 +1770,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', + version='6.0', route_values=route_values, query_parameters=query_parameters, content=content) @@ -1744,10 +1779,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 omitted 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 omitted from gitRepositoryToCreate if the request is project-scoped (i.e., includes project Id). :param str project: Project ID or project name :param str source_ref: [optional] Specify the source refs to use while creating a fork repo - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -1758,7 +1793,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', + version='6.0', route_values=route_values, query_parameters=query_parameters, content=content) @@ -1767,7 +1802,7 @@ def create_repository(self, git_repository_to_create, project=None, source_ref=N def delete_repository(self, repository_id, project=None): """DeleteRepository. Delete a git repository - :param str repository_id: The name or ID of the repository. + :param str repository_id: The ID of the repository. :param str project: Project ID or project name """ route_values = {} @@ -1777,7 +1812,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.1', + version='6.0', route_values=route_values) def get_repositories(self, project=None, include_links=None, include_all_urls=None, include_hidden=None): @@ -1801,7 +1836,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.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[GitRepository]', self._unwrap_collection(response)) @@ -1811,7 +1846,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: @@ -1820,7 +1855,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.1', + version='6.0', route_values=route_values) return self._deserialize('GitRepository', response) @@ -1830,7 +1865,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: @@ -1842,7 +1877,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.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('GitRepository', response) @@ -1850,10 +1885,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 str repository_id: The name or ID 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 ID of the repository. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -1863,7 +1898,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', + version='6.0', route_values=route_values, content=content) return self._deserialize('GitRepository', response) @@ -1871,11 +1906,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: @@ -1887,7 +1922,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.1', + version='6.0', route_values=route_values, content=content) return self._deserialize('GitStatus', response) @@ -1919,7 +1954,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', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[GitStatus]', self._unwrap_collection(response)) @@ -1933,7 +1968,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: @@ -1951,7 +1986,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.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('GitTreeRef', response) @@ -1983,7 +2018,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', + version='6.0', 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 5cedcefb..d7f6aca5 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_1.identity.models import * +from ...v6_0.identity.models import * from .identity_client import IdentityClient __all__ = [ @@ -20,12 +20,14 @@ 'Identity', 'IdentityBase', 'IdentityBatchInfo', + 'IdentityRightsTransferData', 'IdentityScope', 'IdentitySelf', 'IdentitySnapshot', 'IdentityUpdateData', 'JsonPatchOperation', 'JsonWebToken', + 'PagedIdentities', 'RefreshTokenGrant', 'SwapIdentityInfo', 'TenantInfo', diff --git a/azure-devops/azure/devops/released/identity/identity_client.py b/azure-devops/azure/devops/released/identity/identity_client.py index fe0745b1..be55250d 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_1.identity import models +from ...v6_0.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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', query_parameters=query_parameters) return self._deserialize('ChangedIdentities', response) @@ -108,19 +108,20 @@ 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', + version='6.0', 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. - :param str descriptors: - :param str identity_ids: - :param str subject_descriptors: + Resolve legacy identity information for use with older APIs such as the Security APIs + :param str descriptors: A comma separated list of identity descriptors to resolve + :param str identity_ids: A comma seperated list of storage keys to resolve + :param str subject_descriptors: A comma seperated list of subject descriptors to resolve :param str social_descriptors: - :param str search_filter: - :param str filter_value: - :param str query_membership: + :param str search_filter: The type of search to perform. Values can be AccountName (domain\alias), DisplayName, MailAddress, General (display name, account name, or unique name), or LocalGroupName (only search Azure Devops groups). + :param str filter_value: The search value, as specified by the searchFilter. + :param str query_membership: The membership information to include with the identities. Values can be None for no membership data or Direct to include the groups that the identity is a member of and the identities that are a member of this identity (groups only) :param str properties: :param bool include_restricted_visibility: :param str options: @@ -149,7 +150,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.1', + version='6.0', query_parameters=query_parameters) return self._deserialize('[Identity]', self._unwrap_collection(response)) @@ -169,7 +170,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.1', + version='6.0', query_parameters=query_parameters) return self._deserialize('[Identity]', self._unwrap_collection(response)) @@ -178,7 +179,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: @@ -190,26 +191,31 @@ 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', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('Identity', response) - def update_identities(self, identities): + def update_identities(self, identities, allow_meta_data_update=None): """UpdateIdentities. - :param :class:` ` identities: + :param :class:` ` identities: + :param bool allow_meta_data_update: :rtype: [IdentityUpdateData] """ + query_parameters = {} + if allow_meta_data_update is not None: + query_parameters['allowMetaDataUpdate'] = self._serialize.query('allow_meta_data_update', allow_meta_data_update, 'bool') content = self._serialize.body(identities, 'VssJsonCollectionWrapper') response = self._send(http_method='PUT', location_id='28010c54-d0c0-4c89-a5b0-1c9e188b9fb7', - version='5.1', + version='6.0', + query_parameters=query_parameters, content=content) return self._deserialize('[IdentityUpdateData]', self._unwrap_collection(response)) def update_identity(self, identity, identity_id): """UpdateIdentity. - :param :class:` ` identity: + :param :class:` ` identity: :param str identity_id: """ route_values = {} @@ -218,19 +224,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', + version='6.0', 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.1', + version='6.0', content=content) return self._deserialize('Identity', response) @@ -241,16 +247,16 @@ def get_max_sequence_id(self): """ response = self._send(http_method='GET', location_id='e4a70778-cb2c-4e85-b7cc-3f3c7ae2d408', - version='5.1') + version='6.0') 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.1') + version='6.0') return self._deserialize('IdentitySelf', response) diff --git a/azure-devops/azure/devops/released/notification/__init__.py b/azure-devops/azure/devops/released/notification/__init__.py index a6a19d06..643078a1 100644 --- a/azure-devops/azure/devops/released/notification/__init__.py +++ b/azure-devops/azure/devops/released/notification/__init__.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------------------------- -from ...v5_1.notification.models import * +from ...v6_0.notification.models import * from .notification_client import NotificationClient __all__ = [ diff --git a/azure-devops/azure/devops/released/notification/notification_client.py b/azure-devops/azure/devops/released/notification/notification_client.py index 12a2656f..1bf954d0 100644 --- a/azure-devops/azure/devops/released/notification/notification_client.py +++ b/azure-devops/azure/devops/released/notification/notification_client.py @@ -8,7 +8,7 @@ from msrest import Serializer, Deserializer from ...client import Client -from ...v5_1.notification import models +from ...v6_0.notification import models class NotificationClient(Client): @@ -46,7 +46,7 @@ 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', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[INotificationDiagnosticLog]', self._unwrap_collection(response)) @@ -55,23 +55,23 @@ def get_subscription_diagnostics(self, subscription_id): """GetSubscriptionDiagnostics. Get the diagnostics settings for a subscription. :param str subscription_id: The id of the notifications subscription. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if subscription_id is not None: route_values['subscriptionId'] = self._serialize.url('subscription_id', subscription_id, 'str') response = self._send(http_method='GET', location_id='20f1929d-4be7-4c2e-a74e-d47640ff3418', - version='5.1', + version='6.0', route_values=route_values) return self._deserialize('SubscriptionDiagnostics', response) def update_subscription_diagnostics(self, update_parameters, subscription_id): """UpdateSubscriptionDiagnostics. Update the diagnostics settings for a subscription. - :param :class:` ` update_parameters: + :param :class:` ` update_parameters: :param str subscription_id: The id of the notifications subscription. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if subscription_id is not None: @@ -79,7 +79,7 @@ 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', + version='6.0', route_values=route_values, content=content) return self._deserialize('SubscriptionDiagnostics', response) @@ -88,14 +88,14 @@ def get_event_type(self, event_type): """GetEventType. Get a specific event type. :param str event_type: The ID of the event type. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if event_type is not None: route_values['eventType'] = self._serialize.url('event_type', event_type, 'str') response = self._send(http_method='GET', location_id='cc84fb5f-6247-4c7a-aeae-e5a3c3fddb21', - version='5.1', + version='6.0', route_values=route_values) return self._deserialize('NotificationEventType', response) @@ -110,28 +110,28 @@ 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', + version='6.0', query_parameters=query_parameters) return self._deserialize('[NotificationEventType]', self._unwrap_collection(response)) def get_settings(self): """GetSettings. - :rtype: :class:` ` + :rtype: :class:` ` """ response = self._send(http_method='GET', location_id='cbe076d8-2803-45ff-8d8d-44653686ea2a', - version='5.1') + version='6.0') return self._deserialize('NotificationAdminSettings', response) def update_settings(self, update_parameters): """UpdateSettings. - :param :class:` ` update_parameters: - :rtype: :class:` ` + :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', + version='6.0', content=content) return self._deserialize('NotificationAdminSettings', response) @@ -139,23 +139,23 @@ def get_subscriber(self, subscriber_id): """GetSubscriber. Get delivery preferences of a notifications subscriber. :param str subscriber_id: ID of the user or group. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if subscriber_id is not None: route_values['subscriberId'] = self._serialize.url('subscriber_id', subscriber_id, 'str') response = self._send(http_method='GET', location_id='4d5caff1-25ba-430b-b808-7a1f352cc197', - version='5.1', + version='6.0', route_values=route_values) return self._deserialize('NotificationSubscriber', response) def update_subscriber(self, update_parameters, subscriber_id): """UpdateSubscriber. Update delivery preferences of a notifications subscriber. - :param :class:` ` update_parameters: + :param :class:` ` update_parameters: :param str subscriber_id: ID of the user or group. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if subscriber_id is not None: @@ -163,7 +163,7 @@ 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', + version='6.0', route_values=route_values, content=content) return self._deserialize('NotificationSubscriber', response) @@ -171,26 +171,26 @@ def update_subscriber(self, update_parameters, subscriber_id): def query_subscriptions(self, subscription_query): """QuerySubscriptions. Query for subscriptions. A subscription is returned if it matches one or more of the specified conditions. - :param :class:` ` subscription_query: + :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', + version='6.0', content=content) return self._deserialize('[NotificationSubscription]', self._unwrap_collection(response)) def create_subscription(self, create_parameters): """CreateSubscription. Create a new subscription. - :param :class:` ` create_parameters: - :rtype: :class:` ` + :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', + version='6.0', content=content) return self._deserialize('NotificationSubscription', response) @@ -204,7 +204,7 @@ 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', + version='6.0', route_values=route_values) def get_subscription(self, subscription_id, query_flags=None): @@ -212,7 +212,7 @@ def get_subscription(self, subscription_id, query_flags=None): Get a notification subscription by its ID. :param str subscription_id: :param str query_flags: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if subscription_id is not None: @@ -222,7 +222,7 @@ 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', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('NotificationSubscription', response) @@ -245,16 +245,16 @@ def list_subscriptions(self, target_id=None, ids=None, query_flags=None): query_parameters['queryFlags'] = self._serialize.query('query_flags', query_flags, 'str') response = self._send(http_method='GET', location_id='70f911d6-abac-488c-85b3-a206bf57e165', - version='5.1', + version='6.0', query_parameters=query_parameters) return self._deserialize('[NotificationSubscription]', self._unwrap_collection(response)) def update_subscription(self, update_parameters, subscription_id): """UpdateSubscription. Update an existing subscription. Depending on the type of subscription and permissions, the caller can update the description, filter settings, channel (delivery) settings and more. - :param :class:` ` update_parameters: + :param :class:` ` update_parameters: :param str subscription_id: - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if subscription_id is not None: @@ -262,7 +262,7 @@ 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', + version='6.0', route_values=route_values, content=content) return self._deserialize('NotificationSubscription', response) @@ -274,16 +274,16 @@ def get_subscription_templates(self): """ response = self._send(http_method='GET', location_id='fa5d24ba-7484-4f3d-888d-4ec6b1974082', - version='5.1') + version='6.0') return self._deserialize('[NotificationSubscriptionTemplate]', self._unwrap_collection(response)) def update_subscription_user_settings(self, user_settings, subscription_id, user_id): """UpdateSubscriptionUserSettings. Update the specified user's settings for the specified subscription. This API is typically used to opt in or out of a shared subscription. User settings can only be applied to shared subscriptions, like team subscriptions or default subscriptions. - :param :class:` ` user_settings: + :param :class:` ` user_settings: :param str subscription_id: :param str user_id: ID of the user - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if subscription_id is not None: @@ -293,7 +293,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', + version='6.0', route_values=route_values, content=content) return self._deserialize('SubscriptionUserSettings', response) diff --git a/azure-devops/azure/devops/released/operations/__init__.py b/azure-devops/azure/devops/released/operations/__init__.py index 3f90db75..fa718848 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_1.operations.models import * +from ...v6_0.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 257a8de2..6cc85cc0 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_1.operations import models +from ...v6_0.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.1', + version='6.0', 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 4e5b9b52..755bd86b 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_1.policy.models import * +from ...v6_0.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 31feca13..be8b63f2 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_1.policy import models +from ...v6_0.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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', route_values=route_values) return self._deserialize('PolicyConfiguration', response) @@ -88,7 +88,7 @@ def get_policy_configurations(self, project, scope=None, top=None, continuation_ :param int top: Maximum number of policies to return. :param str continuation_token: The continuation token used for pagination. :param str policy_type: Filter returned policies to only this type - :rtype: :class:`` + :rtype: :class:`<[PolicyConfiguration]> ` """ route_values = {} if project is not None: @@ -104,33 +104,18 @@ def get_policy_configurations(self, project, scope=None, top=None, continuation_ query_parameters['policyType'] = self._serialize.query('policy_type', policy_type, 'str') response = self._send(http_method='GET', location_id='dad91cbe-d183-45f8-9c6e-9c1164472121', - version='5.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) - response_value = self._deserialize('[PolicyConfiguration]', self._unwrap_collection(response)) - continuation_token = self._get_continuation_token(response) - return self.GetPolicyConfigurationsResponseValue(response_value, continuation_token) - - class GetPolicyConfigurationsResponseValue(object): - def __init__(self, value, continuation_token): - """ - Response for the get_policy_configurations method - - :param value: - :type value: :class:`<[PolicyConfiguration]> ` - :param continuation_token: The continuation token to be used to get the next page of results. - :type continuation_token: str - """ - self.value = value - self.continuation_token = continuation_token + return self._deserialize('[PolicyConfiguration]', self._unwrap_collection(response)) def update_policy_configuration(self, configuration, project, configuration_id): """UpdatePolicyConfiguration. Update a policy configuration by its ID. - :param :class:` ` configuration: The policy configuration to update. + :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: @@ -140,7 +125,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', + version='6.0', route_values=route_values, content=content) return self._deserialize('PolicyConfiguration', response) @@ -151,7 +136,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: @@ -162,7 +147,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.1', + version='6.0', route_values=route_values) return self._deserialize('PolicyConfiguration', response) @@ -187,7 +172,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.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[PolicyConfiguration]', self._unwrap_collection(response)) @@ -197,7 +182,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: @@ -206,7 +191,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.1', + version='6.0', route_values=route_values) return self._deserialize('PolicyType', response) @@ -221,7 +206,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', + version='6.0', 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 fc3a3f65..91ced253 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_1.profile.models import * +from ...v6_0.profile.models import * from .profile_client import ProfileClient __all__ = [ diff --git a/azure-devops/azure/devops/released/profile/profile_client.py b/azure-devops/azure/devops/released/profile/profile_client.py index 40c7e3f0..11404eed 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_1.profile import models +from ...v6_0.profile import models class ProfileClient(Client): @@ -34,7 +34,7 @@ def get_profile(self, id, details=None, with_attributes=None, partition=None, co :param str partition: The partition (named group) of attributes to return. :param str core_attributes: A comma-delimited list of core profile attributes to return. Valid values are Email, Avatar, DisplayName, and ContactWithOffers. :param bool force_refresh: Not used in this version of the API. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if id is not None: @@ -52,7 +52,7 @@ def get_profile(self, id, details=None, with_attributes=None, partition=None, co query_parameters['forceRefresh'] = self._serialize.query('force_refresh', force_refresh, 'bool') response = self._send(http_method='GET', location_id='f83735dc-483f-4238-a291-d45f6080a9af', - version='5.1', + version='6.0', 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 24436a3f..94903b6c 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_1.release.models import * +from ...v6_0.release.models import * from .release_client import ReleaseClient __all__ = [ @@ -54,8 +54,12 @@ 'ManualIntervention', 'ManualInterventionUpdateMetadata', 'Metric', + 'OrgPipelineReleaseSettings', + 'OrgPipelineReleaseSettingsUpdateParameters', 'PipelineProcess', 'ProcessParameters', + 'ProjectPipelineReleaseSettings', + 'ProjectPipelineReleaseSettingsUpdateParameters', 'ProjectReference', 'QueuedReleaseData', 'ReferenceLinks', @@ -102,6 +106,7 @@ 'TaskInputValidation', 'TaskSourceDefinitionBase', 'VariableGroup', + 'VariableGroupProjectReference', 'VariableGroupProviderData', 'VariableValue', 'WorkflowTask', diff --git a/azure-devops/azure/devops/released/release/release_client.py b/azure-devops/azure/devops/released/release/release_client.py index bf611a2d..a1c2146e 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_1.release import models +from ...v6_0.release import models class ReleaseClient(Client): @@ -37,7 +37,7 @@ def get_approvals(self, project, assigned_to_filter=None, status_filter=None, re :param int continuation_token: Gets the approvals after the continuation token provided. :param str query_order: Gets the results in the defined order of created approvals. Default is 'descending'. :param bool include_my_group_approvals: 'true' to include my group approvals. Default is 'false'. - :rtype: :class:`` + :rtype: :class:`<[ReleaseApproval]> ` """ route_values = {} if project is not None: @@ -62,33 +62,18 @@ def get_approvals(self, project, assigned_to_filter=None, status_filter=None, re query_parameters['includeMyGroupApprovals'] = self._serialize.query('include_my_group_approvals', include_my_group_approvals, 'bool') response = self._send(http_method='GET', location_id='b47c6458-e73b-47cb-a770-4df1e8813a91', - version='5.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) - response_value = self._deserialize('[ReleaseApproval]', self._unwrap_collection(response)) - continuation_token = self._get_continuation_token(response) - return self.GetApprovalsResponseValue(response_value, continuation_token) - - class GetApprovalsResponseValue(object): - def __init__(self, value, continuation_token): - """ - Response for the get_approvals method - - :param value: - :type value: :class:`<[ReleaseApproval]> ` - :param continuation_token: The continuation token to be used to get the next page of results. - :type continuation_token: str - """ - self.value = value - self.continuation_token = continuation_token + return self._deserialize('[ReleaseApproval]', self._unwrap_collection(response)) def update_release_approval(self, approval, project, approval_id): """UpdateReleaseApproval. Update status of an approval - :param :class:` ` approval: ReleaseApproval object having status, approver and comments. + :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: @@ -98,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', + version='6.0', route_values=route_values, content=content) return self._deserialize('ReleaseApproval', response) @@ -106,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: @@ -116,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.1', + version='6.0', route_values=route_values, content=content) return self._deserialize('ReleaseDefinition', response) @@ -141,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.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) @@ -151,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: @@ -164,7 +149,7 @@ 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', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('ReleaseDefinition', response) @@ -187,7 +172,7 @@ def get_release_definitions(self, project, search_text=None, expand=None, artifa :param [str] definition_id_filter: A comma-delimited list of release definitions to retrieve. :param bool is_deleted: 'true' to get release definitions that has been deleted. Default is 'false' :param bool search_text_contains_folder_name: 'true' to get the release definitions under the folder with name as specified in searchText. Default is 'false'. - :rtype: :class:`` + :rtype: :class:`<[ReleaseDefinition]> ` """ route_values = {} if project is not None: @@ -226,32 +211,17 @@ def get_release_definitions(self, project, search_text=None, expand=None, artifa query_parameters['searchTextContainsFolderName'] = self._serialize.query('search_text_contains_folder_name', search_text_contains_folder_name, 'bool') response = self._send(http_method='GET', location_id='d8f96f24-8ea7-4cb6-baab-2df8fc515665', - version='5.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) - response_value = self._deserialize('[ReleaseDefinition]', self._unwrap_collection(response)) - continuation_token = self._get_continuation_token(response) - return self.GetReleaseDefinitionsResponseValue(response_value, continuation_token) - - class GetReleaseDefinitionsResponseValue(object): - def __init__(self, value, continuation_token): - """ - Response for the get_release_definitions method - - :param value: - :type value: :class:`<[ReleaseDefinition]> ` - :param continuation_token: The continuation token to be used to get the next page of results. - :type continuation_token: str - """ - self.value = value - self.continuation_token = continuation_token + return self._deserialize('[ReleaseDefinition]', self._unwrap_collection(response)) def update_release_definition(self, release_definition, project): """UpdateReleaseDefinition. Update a release definition. - :param :class:` ` release_definition: Release definition object to update. + :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: @@ -259,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.1', + version='6.0', route_values=route_values, content=content) return self._deserialize('ReleaseDefinition', response) @@ -282,7 +252,7 @@ def get_deployments(self, project, definition_id=None, definition_environment_id :param datetime min_started_time: :param datetime max_started_time: :param str source_branch: - :rtype: :class:`` + :rtype: :class:`<[Deployment]> ` """ route_values = {} if project is not None: @@ -320,25 +290,10 @@ 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', + version='6.0', route_values=route_values, query_parameters=query_parameters) - response_value = self._deserialize('[Deployment]', self._unwrap_collection(response)) - continuation_token = self._get_continuation_token(response) - return self.GetDeploymentsResponseValue(response_value, continuation_token) - - class GetDeploymentsResponseValue(object): - def __init__(self, value, continuation_token): - """ - Response for the get_deployments method - - :param value: - :type value: :class:`<[Deployment]> ` - :param continuation_token: The continuation token to be used to get the next page of results. - :type continuation_token: str - """ - self.value = value - self.continuation_token = continuation_token + return self._deserialize('[Deployment]', self._unwrap_collection(response)) def get_manual_intervention(self, project, release_id, manual_intervention_id): """GetManualIntervention. @@ -346,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: @@ -357,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.1', + version='6.0', route_values=route_values) return self._deserialize('ManualIntervention', response) @@ -375,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.1', + version='6.0', 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: @@ -398,7 +353,7 @@ 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', + version='6.0', route_values=route_values, content=content) return self._deserialize('ManualIntervention', response) @@ -428,7 +383,7 @@ def get_releases(self, project=None, definition_id=None, definition_environment_ :param [str] property_filters: A comma-delimited list of extended properties to be retrieved. If set, the returned Releases will contain values for the specified property Ids (if they exist). If not set, properties will not be included. Note that this will not filter out any Release from results irrespective of whether it has property set or not. :param [int] release_id_filter: A comma-delimited list of releases Ids. Only releases with these Ids will be returned. :param str path: Releases under this folder path will be returned - :rtype: :class:`` + :rtype: :class:`<[Release]> ` """ route_values = {} if project is not None: @@ -481,32 +436,17 @@ def get_releases(self, project=None, definition_id=None, definition_environment_ query_parameters['path'] = self._serialize.query('path', path, 'str') response = self._send(http_method='GET', location_id='a166fde7-27ad-408e-ba75-703c2cc9d500', - version='5.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) - response_value = self._deserialize('[Release]', self._unwrap_collection(response)) - continuation_token = self._get_continuation_token(response) - return self.GetReleasesResponseValue(response_value, continuation_token) - - class GetReleasesResponseValue(object): - def __init__(self, value, continuation_token): - """ - Response for the get_releases method - - :param value: - :type value: :class:`<[Release]> ` - :param continuation_token: The continuation token to be used to get the next page of results. - :type continuation_token: str - """ - self.value = value - self.continuation_token = continuation_token + return self._deserialize('[Release]', self._unwrap_collection(response)) def create_release(self, release_start_metadata, project): """CreateRelease. Create a release. - :param :class:` ` release_start_metadata: Metadata to create a release. + :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: @@ -514,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.1', + version='6.0', route_values=route_values, content=content) return self._deserialize('Release', response) @@ -528,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: @@ -547,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.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('Release', response) @@ -570,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.1', + version='6.0', route_values=route_values, query_parameters=query_parameters, accept_media_type='text/plain') @@ -583,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: @@ -596,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.1', + version='6.0', route_values=route_values, content=content) return self._deserialize('Release', response) @@ -604,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: @@ -617,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.1', + version='6.0', 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 90e045e2..72ae48a9 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_1.security.models import * +from ...v6_0.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 e380a4ba..56a0c747 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_1.security import models +from ...v6_0.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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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 043375c0..eae55563 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_1.service_hooks.models import * +from ...v6_0.service_hooks.models import * from .service_hooks_client import ServiceHooksClient __all__ = [ 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 b6849b6c..d445d1fd 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_1.service_hooks import models +from ...v6_0.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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1') + version='6.0') 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', route_values=route_values) return self._deserialize('Subscription', response) @@ -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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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 5c3ad971..700b5da2 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_1.task.models import * +from ...v6_0.task.models import * from .task_client import TaskClient __all__ = [ diff --git a/azure-devops/azure/devops/released/task/task_client.py b/azure-devops/azure/devops/released/task/task_client.py index 000ea769..aa69f35a 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_1.task import models +from ...v6_0.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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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 3fd6378d..eb1fe3bd 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_1.task_agent.models import * +from ...v6_0.task_agent.models import * from .task_agent_client import TaskAgentClient __all__ = [ @@ -57,7 +57,6 @@ 'InputValuesError', 'KubernetesResource', 'KubernetesResourceCreateParameters', - 'MarketplacePurchasedLicense', 'MetricsColumnMetaData', 'MetricsColumnsHeader', 'MetricsRow', @@ -112,6 +111,7 @@ 'TaskGroupRevision', 'TaskGroupStep', 'TaskGroupUpdateParameter', + 'TaskGroupUpdatePropertiesBase', 'TaskHubLicenseDetails', 'TaskInputDefinition', 'TaskInputDefinitionBase', @@ -126,6 +126,7 @@ 'ValidationItem', 'VariableGroup', 'VariableGroupParameters', + 'VariableGroupProjectReference', 'VariableGroupProviderData', 'VariableValue', 'VirtualMachine', 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 4550fde4..409f6a17 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_1.task_agent import models +from ...v6_0.task_agent import models class TaskAgentClient(Client): @@ -28,9 +28,9 @@ def __init__(self, base_url=None, creds=None): 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 :class:` ` agent: Details about the agent being added :param int pool_id: The agent pool in which to add the agent - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if pool_id is not None: @@ -38,7 +38,7 @@ 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', + version='6.0', route_values=route_values, content=content) return self._deserialize('TaskAgent', response) @@ -56,7 +56,7 @@ 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', + version='6.0', 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): @@ -68,7 +68,7 @@ def get_agent(self, pool_id, agent_id, include_capabilities=None, include_assign :param bool include_assigned_request: Whether to include details about the agent's current work :param bool include_last_completed_request: Whether to include details about the agents' most recent completed work :param [str] property_filters: Filter which custom properties will be returned - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if pool_id is not None: @@ -87,7 +87,7 @@ 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', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('TaskAgent', response) @@ -124,7 +124,7 @@ 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', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TaskAgent]', self._unwrap_collection(response)) @@ -132,10 +132,10 @@ def get_agents(self, pool_id, agent_name=None, include_capabilities=None, includ 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 :class:` ` agent: Updated details about the replacing agent :param int pool_id: The agent pool to use :param int agent_id: The agent to replace - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if pool_id is not None: @@ -145,7 +145,7 @@ 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', + version='6.0', route_values=route_values, content=content) return self._deserialize('TaskAgent', response) @@ -153,10 +153,10 @@ def replace_agent(self, agent, pool_id, agent_id): def update_agent(self, agent, pool_id, agent_id): """UpdateAgent. Update agent details. - :param :class:` ` agent: Updated details about the agent + :param :class:` ` agent: Updated details about the agent :param int pool_id: The agent pool to use :param int agent_id: The agent to update - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if pool_id is not None: @@ -166,7 +166,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', + version='6.0', route_values=route_values, content=content) return self._deserialize('TaskAgent', response) @@ -174,13 +174,13 @@ def update_agent(self, agent, pool_id, agent_id): def add_agent_pool(self, pool): """AddAgentPool. Create an agent pool. - :param :class:` ` pool: Details about the new agent pool - :rtype: :class:` ` + :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', + version='6.0', content=content) return self._deserialize('TaskAgentPool', response) @@ -194,7 +194,7 @@ 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', + version='6.0', route_values=route_values) def get_agent_pool(self, pool_id, properties=None, action_filter=None): @@ -203,7 +203,7 @@ def get_agent_pool(self, pool_id, properties=None, action_filter=None): :param int pool_id: An agent pool ID :param [str] properties: Agent pool properties (comma-separated) :param str action_filter: Filter by whether the calling user has use or manage permissions - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if pool_id is not None: @@ -216,7 +216,7 @@ 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', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('TaskAgentPool', response) @@ -242,7 +242,7 @@ 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', + version='6.0', query_parameters=query_parameters) return self._deserialize('[TaskAgentPool]', self._unwrap_collection(response)) @@ -261,16 +261,16 @@ def get_agent_pools_by_ids(self, pool_ids, action_filter=None): query_parameters['actionFilter'] = self._serialize.query('action_filter', action_filter, 'str') response = self._send(http_method='GET', location_id='a8c47e17-4d56-4a56-92bb-de7ea7dc65be', - version='5.1', + version='6.0', 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 :class:` ` pool: Updated agent pool details :param int pool_id: The agent pool to update - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if pool_id is not None: @@ -278,17 +278,23 @@ 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', + version='6.0', route_values=route_values, content=content) return self._deserialize('TaskAgentPool', response) - def get_yaml_schema(self): + def get_yaml_schema(self, validate_task_names=None): """GetYamlSchema. + GET the Yaml schema used for Yaml file validation. + :param bool validate_task_names: Whether the schema should validate that tasks are actually installed (useful for offline tools where you don't want validation). :rtype: object """ + query_parameters = {} + if validate_task_names is not None: + query_parameters['validateTaskNames'] = self._serialize.query('validate_task_names', validate_task_names, 'bool') response = self._send(http_method='GET', location_id='1f9990b9-1dba-441f-9c2e-6485888c42b6', - version='5.1') + version='6.0', + query_parameters=query_parameters) 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 d333f47f..546a5ac4 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_1.test.models import * +from ...v6_0.test.models import * from .test_client import TestClient __all__ = [ diff --git a/azure-devops/azure/devops/released/test/test_client.py b/azure-devops/azure/devops/released/test/test_client.py index e5546c11..7061d974 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_1.test import models +from ...v6_0.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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TestIterationDetailsModel]', self._unwrap_collection(response)) @@ -131,7 +131,7 @@ 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', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TestResultParameterModel]', self._unwrap_collection(response)) @@ -144,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: @@ -160,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.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('TestPoint', response) @@ -204,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.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TestPoint]', self._unwrap_collection(response)) @@ -212,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. @@ -231,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.1', + version='6.0', route_values=route_values, content=content) return self._deserialize('[TestPoint]', self._unwrap_collection(response)) @@ -252,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.1', + version='6.0', route_values=route_values, content=content) return self._deserialize('[TestCaseResult]', self._unwrap_collection(response)) @@ -264,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: @@ -278,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.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('TestCaseResult', response) @@ -311,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.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TestCaseResult]', self._unwrap_collection(response)) @@ -332,7 +332,7 @@ 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', + version='6.0', route_values=route_values, content=content) return self._deserialize('[TestCaseResult]', self._unwrap_collection(response)) @@ -342,7 +342,7 @@ def get_test_run_statistics(self, project, run_id): 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: @@ -351,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.1', + version='6.0', 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: @@ -368,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.1', + version='6.0', route_values=route_values, content=content) return self._deserialize('TestRun', response) @@ -386,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.1', + version='6.0', route_values=route_values) def get_test_run_by_id(self, project, run_id, include_details=None): @@ -395,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: Default value is true. It includes details like run statistics, release, build, test environment, post process state, and more. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -407,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.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('TestRun', response) @@ -448,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.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TestRun]', self._unwrap_collection(response)) @@ -473,7 +473,7 @@ def query_test_runs(self, project, min_last_updated_date, max_last_updated_date, :param str run_title: Run Title of the Runs to be queried. :param int top: Number of runs to be queried. Limit is 100 :param str continuation_token: continuationToken received from previous batch or null for first batch. It is not supposed to be created (or altered, if received from last batch) by user. - :rtype: :class:`` + :rtype: :class:`<[TestRun]> ` """ route_values = {} if project is not None: @@ -520,33 +520,18 @@ def query_test_runs(self, project, min_last_updated_date, max_last_updated_date, query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'str') response = self._send(http_method='GET', location_id='cadb3810-d47d-4a3c-a234-fe5f3be50138', - version='5.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) - response_value = self._deserialize('[TestRun]', self._unwrap_collection(response)) - continuation_token = self._get_continuation_token(response) - return self.QueryTestRunsResponseValue(response_value, continuation_token) - - class QueryTestRunsResponseValue(object): - def __init__(self, value, continuation_token): - """ - Response for the query_test_runs method - - :param value: - :type value: :class:`<[TestRun]> ` - :param continuation_token: The continuation token to be used to get the next page of results. - :type continuation_token: str - """ - self.value = value - self.continuation_token = continuation_token + return self._deserialize('[TestRun]', self._unwrap_collection(response)) def update_test_run(self, run_update_model, project, run_id): """UpdateTestRun. Update test run by its ID. - :param :class:` ` run_update_model: Run details RunUpdateModel + :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: @@ -556,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.1', + version='6.0', route_values=route_values, content=content) return self._deserialize('TestRun', response) @@ -582,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.1', + version='6.0', route_values=route_values) return self._deserialize('[SuiteTestCase]', self._unwrap_collection(response)) @@ -593,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: @@ -607,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.1', + version='6.0', route_values=route_values) return self._deserialize('SuiteTestCase', response) @@ -629,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.1', + version='6.0', route_values=route_values) return self._deserialize('[SuiteTestCase]', self._unwrap_collection(response)) @@ -653,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.1', + version='6.0', 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. @@ -679,7 +664,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', + version='6.0', route_values=route_values, content=content) return self._deserialize('[SuiteTestCase]', self._unwrap_collection(response)) diff --git a/azure-devops/azure/devops/released/test_plan/__init__.py b/azure-devops/azure/devops/released/test_plan/__init__.py index 8cb4bb05..dc781ed7 100644 --- a/azure-devops/azure/devops/released/test_plan/__init__.py +++ b/azure-devops/azure/devops/released/test_plan/__init__.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------------------------- -from ...v5_1.test_plan.models import * +from ...v6_0.test_plan.models import * from .test_plan_client import TestPlanClient __all__ = [ @@ -14,6 +14,9 @@ 'CloneOperationCommonResponse', 'CloneOptions', 'CloneStatistics', + 'CloneTestCaseOperationInformation', + 'CloneTestCaseOptions', + 'CloneTestCaseParams', 'CloneTestPlanOperationInformation', 'CloneTestPlanParams', 'CloneTestSuiteOperationInformation', @@ -24,6 +27,8 @@ 'GraphSubjectBase', 'IdentityRef', 'LastResultDetails', + 'LibraryWorkItemsData', + 'LibraryWorkItemsDataProviderRequest', 'NameValuePair', 'PointAssignment', 'ReferenceLinks', @@ -32,15 +37,19 @@ 'SourceTestPlanInfo', 'SourceTestplanResponse', 'SourceTestSuiteInfo', + 'SourceTestSuiteResponse', 'SuiteEntry', 'SuiteEntryUpdateParams', 'SuiteTestCaseCreateUpdateParameters', 'TeamProjectReference', 'TestCase', + 'TestCaseAssociatedResult', 'TestCaseReference', + 'TestCaseResultsData', 'TestConfiguration', 'TestConfigurationCreateUpdateParameters', 'TestConfigurationReference', + 'TestEntityCount', 'TestEnvironment', 'TestOutcomeSettings', 'TestPlan', @@ -48,9 +57,10 @@ 'TestPlanDetailedReference', 'TestPlanReference', 'TestPlansHubRefreshData', + 'TestPlansLibraryWorkItemFilter', 'TestPlanUpdateParams', 'TestPoint', - 'TestPointCount', + 'TestPointDetailedReference', 'TestPointResults', 'TestPointUpdateParams', 'TestSettings', diff --git a/azure-devops/azure/devops/released/test_plan/test_plan_client.py b/azure-devops/azure/devops/released/test_plan/test_plan_client.py index 660441a8..620b0ec6 100644 --- a/azure-devops/azure/devops/released/test_plan/test_plan_client.py +++ b/azure-devops/azure/devops/released/test_plan/test_plan_client.py @@ -8,7 +8,7 @@ from msrest import Serializer, Deserializer from ...client import Client -from ...v5_1.test_plan import models +from ...v6_0.test_plan import models class TestPlanClient(Client): @@ -36,7 +36,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', + version='6.0', query_parameters=query_parameters) return self._deserialize('[TestSuite]', self._unwrap_collection(response)) diff --git a/azure-devops/azure/devops/released/test_results/__init__.py b/azure-devops/azure/devops/released/test_results/__init__.py index 27388e6d..f3a6aa58 100644 --- a/azure-devops/azure/devops/released/test_results/__init__.py +++ b/azure-devops/azure/devops/released/test_results/__init__.py @@ -6,11 +6,12 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------------------------- -from ...v5_1.test_results.models import * +from ...v6_0.test_results.models import * from .test_results_client import TestResultsClient __all__ = [ 'AggregatedDataForResultTrend', + 'AggregatedResultDetailsByOutcome', 'AggregatedResultsAnalysis', 'AggregatedResultsByOutcome', 'AggregatedResultsDifference', @@ -36,15 +37,21 @@ 'IdentityRef', 'JobReference', 'ModuleCoverage', + 'NewTestResultLoggingSettings', 'PhaseReference', 'PipelineReference', + 'PipelineTestMetrics', 'QueryModel', 'ReferenceLinks', 'ReleaseReference', + 'ResultsAnalysis', 'ResultsFilter', + 'ResultsSummaryByOutcome', + 'ResultSummary', 'RunCreateModel', 'RunFilter', 'RunStatistic', + 'RunSummary', 'RunSummaryModel', 'RunUpdateModel', 'ShallowReference', @@ -73,6 +80,7 @@ 'TestOperationReference', 'TestResolutionState', 'TestResultDocument', + 'TestResultFailuresAnalysis', 'TestResultHistory', 'TestResultHistoryDetailsForGroup', 'TestResultHistoryForGroup', diff --git a/azure-devops/azure/devops/released/test_results/test_results_client.py b/azure-devops/azure/devops/released/test_results/test_results_client.py index c533accd..7139cff3 100644 --- a/azure-devops/azure/devops/released/test_results/test_results_client.py +++ b/azure-devops/azure/devops/released/test_results/test_results_client.py @@ -8,7 +8,7 @@ from msrest import Serializer, Deserializer from ...client import Client -from ...v5_1.test_results import models +from ...v6_0.test_results import models class TestResultsClient(Client): @@ -23,23 +23,5 @@ def __init__(self, base_url=None, creds=None): self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) - resource_area_identifier = None - - 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) + resource_area_identifier = 'c83eaf52-edf3-4034-ae11-17d38f25404c' diff --git a/azure-devops/azure/devops/released/tfvc/__init__.py b/azure-devops/azure/devops/released/tfvc/__init__.py index 34f51057..0a577819 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_1.tfvc.models import * +from ...v6_0.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 eccd9eef..68b5a4df 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_1.tfvc import models +from ...v6_0.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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TfvcBranchRef]', self._unwrap_collection(response)) @@ -113,7 +113,7 @@ def get_changeset_changes(self, id=None, skip=None, top=None, continuation_token :param int skip: Number of results to skip. Default: null :param int top: The maximum number of results to return. Default: null :param str continuation_token: Return the next page of results. Default: null - :rtype: :class:`` + :rtype: :class:`<[TfvcChange]> ` """ route_values = {} if id is not None: @@ -127,32 +127,17 @@ def get_changeset_changes(self, id=None, skip=None, top=None, continuation_token query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'str') response = self._send(http_method='GET', location_id='f32b86f2-15b9-4fe6-81b1-6f8938617ee5', - version='5.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) - response_value = self._deserialize('[TfvcChange]', self._unwrap_collection(response)) - continuation_token = self._get_continuation_token(response) - return self.GetChangesetChangesResponseValue(response_value, continuation_token) - - class GetChangesetChangesResponseValue(object): - def __init__(self, value, continuation_token): - """ - Response for the get_changeset_changes method - - :param value: - :type value: :class:`<[TfvcChange]> ` - :param continuation_token: The continuation token to be used to get the next page of results. - :type continuation_token: str - """ - self.value = value - self.continuation_token = continuation_token + return self._deserialize('[TfvcChange]', self._unwrap_collection(response)) 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: @@ -160,7 +145,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.1', + version='6.0', route_values=route_values, content=content) return self._deserialize('TfvcChangesetRef', response) @@ -178,8 +163,8 @@ def get_changeset(self, id, project=None, max_change_count=None, include_details :param int skip: Number of results to skip. Default: null :param int top: The maximum number of results to return. Default: null :param str orderby: Results are sorted by ID in descending order by default. Use id asc to sort by ID in ascending order. - :param :class:` ` search_criteria: Following criteria available (.itemPath, .version, .versionType, .versionOption, .author, .fromId, .toId, .fromDate, .toDate) Default: null - :rtype: :class:` ` + :param :class:` ` search_criteria: Following criteria available (.itemPath, .version, .versionType, .versionOption, .author, .fromId, .toId, .fromDate, .toDate) Default: null + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -224,7 +209,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.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('TfvcChangeset', response) @@ -237,7 +222,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 = {} @@ -273,7 +258,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.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TfvcChangesetRef]', self._unwrap_collection(response)) @@ -281,20 +266,20 @@ 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.1', + version='6.0', content=content) return self._deserialize('[TfvcChangesetRef]', self._unwrap_collection(response)) def get_changeset_work_items(self, id=None): """GetChangesetWorkItems. Retrieves the work items associated with a particular changeset. - :param int id: ID of the changeset. Default: null + :param int id: ID of the changeset. :rtype: [AssociatedWorkItem] """ route_values = {} @@ -302,14 +287,14 @@ def get_changeset_work_items(self, id=None): route_values['id'] = self._serialize.url('id', id, 'int') response = self._send(http_method='GET', location_id='64ae0bea-1d71-47c9-a9e5-fe73f5ea0ff4', - version='5.1', + version='6.0', 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]] """ @@ -319,7 +304,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.1', + version='6.0', route_values=route_values, content=content) return self._deserialize('[[TfvcItem]]', self._unwrap_collection(response)) @@ -327,7 +312,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 """ @@ -337,7 +322,7 @@ def get_items_batch_zip(self, item_request_data, project=None, **kwargs): content = self._serialize.body(item_request_data, 'TfvcItemRequestData') response = self._send(http_method='POST', location_id='fe6f827b-5f64-480f-b8af-1eca3b80e833', - version='5.1', + version='6.0', route_values=route_values, content=content, accept_media_type='application/zip') @@ -356,9 +341,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: @@ -385,7 +370,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.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('TfvcItem', response) @@ -399,7 +384,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 """ @@ -428,7 +413,7 @@ def get_item_content(self, path, project=None, file_name=None, download=None, sc query_parameters['includeContent'] = self._serialize.query('include_content', include_content, 'bool') response = self._send(http_method='GET', location_id='ba9fc436-9a38-4578-89d6-e4f3241f5040', - version='5.1', + version='6.0', route_values=route_values, query_parameters=query_parameters, accept_media_type='application/octet-stream') @@ -445,7 +430,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 = {} @@ -467,7 +452,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.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TfvcItem]', self._unwrap_collection(response)) @@ -481,7 +466,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 """ @@ -510,7 +495,7 @@ def get_item_text(self, path, project=None, file_name=None, download=None, scope query_parameters['includeContent'] = self._serialize.query('include_content', include_content, 'bool') response = self._send(http_method='GET', location_id='ba9fc436-9a38-4578-89d6-e4f3241f5040', - version='5.1', + version='6.0', route_values=route_values, query_parameters=query_parameters, accept_media_type='text/plain') @@ -529,7 +514,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 """ @@ -558,7 +543,7 @@ def get_item_zip(self, path, project=None, file_name=None, download=None, scope_ query_parameters['includeContent'] = self._serialize.query('include_content', include_content, 'bool') response = self._send(http_method='GET', location_id='ba9fc436-9a38-4578-89d6-e4f3241f5040', - version='5.1', + version='6.0', route_values=route_values, query_parameters=query_parameters, accept_media_type='application/zip') @@ -586,7 +571,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.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TfvcItem]', self._unwrap_collection(response)) @@ -595,9 +580,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: @@ -620,7 +605,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.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('TfvcLabel', response) @@ -628,7 +613,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, defaults to 100 when undefined :param int skip: Number of labels to skip @@ -657,7 +642,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.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TfvcLabelRef]', self._unwrap_collection(response)) @@ -679,7 +664,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.1', + version='6.0', query_parameters=query_parameters) return self._deserialize('[TfvcChange]', self._unwrap_collection(response)) @@ -687,8 +672,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: @@ -710,14 +695,14 @@ def get_shelveset(self, shelveset_id, request_data=None): query_parameters['requestData.includeLinks'] = request_data.include_links response = self._send(http_method='GET', location_id='e36d44fb-e907-4b0a-b194-f83f1ed32ad3', - version='5.1', + version='6.0', 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] @@ -744,7 +729,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.1', + version='6.0', query_parameters=query_parameters) return self._deserialize('[TfvcShelvesetRef]', self._unwrap_collection(response)) @@ -759,7 +744,7 @@ def get_shelveset_work_items(self, shelveset_id): query_parameters['shelvesetId'] = self._serialize.query('shelveset_id', shelveset_id, 'str') response = self._send(http_method='GET', location_id='a7a0c1c1-373e-425a-b031-a519474d743d', - version='5.1', + version='6.0', 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 c75bf8e3..ed8d92f7 100644 --- a/azure-devops/azure/devops/released/wiki/__init__.py +++ b/azure-devops/azure/devops/released/wiki/__init__.py @@ -6,13 +6,23 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------------------------- -from ...v5_1.wiki.models import * +from ...v6_0.wiki.models import * from .wiki_client import WikiClient __all__ = [ + 'Comment', + 'CommentAttachment', + 'CommentCreateParameters', + 'CommentList', + 'CommentMention', + 'CommentReaction', + 'CommentResourceReference', + 'CommentUpdateParameters', 'GitRepository', 'GitRepositoryRef', 'GitVersionDescriptor', + 'GraphSubjectBase', + 'IdentityRef', 'ReferenceLinks', 'TeamProjectCollectionReference', 'TeamProjectReference', @@ -22,10 +32,13 @@ 'WikiCreateParametersV2', 'WikiPage', 'WikiPageCreateOrUpdateParameters', + 'WikiPageDetail', 'WikiPageMove', 'WikiPageMoveParameters', 'WikiPageMoveResponse', 'WikiPageResponse', + 'WikiPagesBatchRequest', + 'WikiPageStat', 'WikiPageViewStats', 'WikiUpdateParameters', 'WikiV2', diff --git a/azure-devops/azure/devops/released/wiki/wiki_client.py b/azure-devops/azure/devops/released/wiki/wiki_client.py index 92cf8916..e6cb6a78 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_1.wiki import models +from ...v6_0.wiki import models class WikiClient(Client): @@ -30,10 +30,10 @@ def create_attachment(self, upload_stream, project, wiki_identifier, name, versi 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 wiki_identifier: Wiki ID or wiki name. :param str name: Wiki attachment name. - :param :class:` ` version_descriptor: GitVersionDescriptor for the page. (Optional in case of ProjectWiki). - :rtype: :class:` ` + :param :class:` ` version_descriptor: GitVersionDescriptor for the page. (Optional in case of ProjectWiki). + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -57,7 +57,7 @@ def create_attachment(self, upload_stream, project, wiki_identifier, name, versi content = self._client.stream_upload(upload_stream, callback=callback) response = self._send(http_method='PUT', location_id='c4382d8d-fefc-40e0-92c5-49852e9e17c0', - version='5.1', + version='6.0', route_values=route_values, query_parameters=query_parameters, content=content, @@ -70,12 +70,12 @@ def create_attachment(self, upload_stream, project, wiki_identifier, name, versi def create_page_move(self, page_move_parameters, project, wiki_identifier, comment=None, version_descriptor=None): """CreatePageMove. Creates a page move operation that updates the path and order of the page as provided in the parameters. - :param :class:` ` page_move_parameters: Page more operation parameters. + :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 wiki_identifier: Wiki ID or wiki name. :param str comment: Comment that is to be associated with this page move. - :param :class:` ` version_descriptor: GitVersionDescriptor for the page. (Optional in case of ProjectWiki). - :rtype: :class:` ` + :param :class:` ` version_descriptor: GitVersionDescriptor for the page. (Optional in case of ProjectWiki). + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -95,7 +95,7 @@ def create_page_move(self, page_move_parameters, project, wiki_identifier, comme content = self._serialize.body(page_move_parameters, 'WikiPageMoveParameters') response = self._send(http_method='POST', location_id='e37bbe71-cbae-49e5-9a4e-949143b9d910', - version='5.1', + version='6.0', route_values=route_values, query_parameters=query_parameters, content=content) @@ -107,14 +107,14 @@ def create_page_move(self, page_move_parameters, project, wiki_identifier, comme def create_or_update_page(self, parameters, project, wiki_identifier, path, version, comment=None, version_descriptor=None): """CreateOrUpdatePage. Creates or edits a wiki page. - :param :class:` ` parameters: Wiki create or update operation parameters. + :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 wiki_identifier: Wiki ID or wiki name. :param str path: Wiki page path. :param String version: Version of the page on which the change is to be made. Mandatory for `Edit` scenario. To be populated in the If-Match header of the request. :param str comment: Comment to be associated with the page operation. - :param :class:` ` version_descriptor: GitVersionDescriptor for the page. (Optional in case of ProjectWiki). - :rtype: :class:` ` + :param :class:` ` version_descriptor: GitVersionDescriptor for the page. (Optional in case of ProjectWiki). + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -139,7 +139,7 @@ def create_or_update_page(self, parameters, project, wiki_identifier, path, vers content = self._serialize.body(parameters, 'WikiPageCreateOrUpdateParameters') response = self._send(http_method='PUT', location_id='25d3fbc7-fe3d-46cb-b5a5-0b6f79caf27b', - version='5.1', + version='6.0', route_values=route_values, query_parameters=query_parameters, additional_headers=additional_headers, @@ -153,11 +153,11 @@ def delete_page(self, project, wiki_identifier, path, comment=None, version_desc """DeletePage. Deletes a wiki page. :param str project: Project ID or project name - :param str wiki_identifier: Wiki Id or name. + :param str wiki_identifier: Wiki ID or wiki name. :param str path: Wiki page path. :param str comment: Comment to be associated with this page delete. - :param :class:` ` version_descriptor: GitVersionDescriptor for the page. (Optional in case of ProjectWiki). - :rtype: :class:` ` + :param :class:` ` version_descriptor: GitVersionDescriptor for the page. (Optional in case of ProjectWiki). + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -178,7 +178,7 @@ def delete_page(self, project, wiki_identifier, path, comment=None, version_desc query_parameters['versionDescriptor.versionOptions'] = version_descriptor.version_options response = self._send(http_method='DELETE', location_id='25d3fbc7-fe3d-46cb-b5a5-0b6f79caf27b', - version='5.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) response_object = models.WikiPageResponse() @@ -190,12 +190,12 @@ def get_page(self, project, wiki_identifier, path=None, recursion_level=None, ve """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 str wiki_identifier: Wiki ID or wiki name. :param str path: Wiki page path. :param str recursion_level: Recursion level for subpages retrieval. Defaults to `None` (Optional). - :param :class:` ` version_descriptor: GitVersionDescriptor for the page. Defaults to the default branch (Optional). + :param :class:` ` version_descriptor: GitVersionDescriptor for the page. Defaults to the default branch (Optional). :param bool include_content: True to include the content of the page in the response for Json content type. Defaults to false (Optional) - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -218,7 +218,7 @@ def get_page(self, project, wiki_identifier, path=None, recursion_level=None, ve query_parameters['includeContent'] = self._serialize.query('include_content', include_content, 'bool') response = self._send(http_method='GET', location_id='25d3fbc7-fe3d-46cb-b5a5-0b6f79caf27b', - version='5.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) response_object = models.WikiPageResponse() @@ -230,10 +230,10 @@ def get_page_text(self, project, wiki_identifier, path=None, recursion_level=Non """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 str wiki_identifier: Wiki ID or wiki name. :param str path: Wiki page path. :param str recursion_level: Recursion level for subpages retrieval. Defaults to `None` (Optional). - :param :class:` ` version_descriptor: GitVersionDescriptor for the page. Defaults to the default branch (Optional). + :param :class:` ` version_descriptor: GitVersionDescriptor for the page. Defaults to the default branch (Optional). :param bool include_content: True to include the content of the page in the response for Json content type. Defaults to false (Optional) :rtype: object """ @@ -258,7 +258,7 @@ def get_page_text(self, project, wiki_identifier, path=None, recursion_level=Non query_parameters['includeContent'] = self._serialize.query('include_content', include_content, 'bool') response = self._send(http_method='GET', location_id='25d3fbc7-fe3d-46cb-b5a5-0b6f79caf27b', - version='5.1', + version='6.0', route_values=route_values, query_parameters=query_parameters, accept_media_type='text/plain') @@ -272,10 +272,10 @@ def get_page_zip(self, project, wiki_identifier, path=None, recursion_level=None """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 str wiki_identifier: Wiki ID or wiki name. :param str path: Wiki page path. :param str recursion_level: Recursion level for subpages retrieval. Defaults to `None` (Optional). - :param :class:` ` version_descriptor: GitVersionDescriptor for the page. Defaults to the default branch (Optional). + :param :class:` ` version_descriptor: GitVersionDescriptor for the page. Defaults to the default branch (Optional). :param bool include_content: True to include the content of the page in the response for Json content type. Defaults to false (Optional) :rtype: object """ @@ -300,7 +300,7 @@ def get_page_zip(self, project, wiki_identifier, path=None, recursion_level=None query_parameters['includeContent'] = self._serialize.query('include_content', include_content, 'bool') response = self._send(http_method='GET', location_id='25d3fbc7-fe3d-46cb-b5a5-0b6f79caf27b', - version='5.1', + version='6.0', route_values=route_values, query_parameters=query_parameters, accept_media_type='application/zip') @@ -313,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: @@ -323,17 +323,17 @@ def create_wiki(self, wiki_create_params, project=None): content = self._serialize.body(wiki_create_params, 'WikiCreateParametersV2') response = self._send(http_method='POST', location_id='288d122c-dbd4-451d-aa5f-7dbbba070728', - version='5.1', + version='6.0', route_values=route_values, content=content) return self._deserialize('WikiV2', response) def delete_wiki(self, wiki_identifier, project=None): """DeleteWiki. - Deletes the wiki corresponding to the wiki name or Id provided. - :param str wiki_identifier: Wiki name or Id. + Deletes the wiki corresponding to the wiki ID or wiki name provided. + :param str wiki_identifier: Wiki ID or wiki name. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -342,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.1', + version='6.0', route_values=route_values) return self._deserialize('WikiV2', response) @@ -357,16 +357,16 @@ def get_all_wikis(self, project=None): route_values['project'] = self._serialize.url('project', project, 'str') response = self._send(http_method='GET', location_id='288d122c-dbd4-451d-aa5f-7dbbba070728', - version='5.1', + version='6.0', route_values=route_values) return self._deserialize('[WikiV2]', self._unwrap_collection(response)) def get_wiki(self, wiki_identifier, project=None): """GetWiki. - Gets the wiki corresponding to the wiki name or Id provided. - :param str wiki_identifier: Wiki name or id. + Gets the wiki corresponding to the wiki ID or wiki name provided. + :param str wiki_identifier: Wiki ID or wiki name. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -375,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.1', + version='6.0', 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 str wiki_identifier: Wiki name or Id. + Updates the wiki corresponding to the wiki ID or wiki name provided using the update parameters. + :param :class:` ` update_parameters: Update parameters. + :param str wiki_identifier: Wiki ID or wiki name. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -395,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.1', + version='6.0', 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 80fb2ca9..357da084 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_1.work.models import * +from ...v6_0.work.models import * from .work_client import WorkClient __all__ = [ @@ -39,6 +39,7 @@ 'FilterClause', 'GraphSubjectBase', 'IdentityRef', + 'ITaskboardColumnMapping', 'IterationWorkItems', 'Link', 'Member', @@ -51,6 +52,10 @@ 'ReorderOperation', 'ReorderResult', 'Rule', + 'TaskboardColumn', + 'TaskboardColumnMapping', + 'TaskboardColumns', + 'TaskboardWorkItemColumn', 'TeamContext', 'TeamFieldValue', 'TeamFieldValues', @@ -70,6 +75,8 @@ 'TimelineTeamIteration', 'TimelineTeamStatus', 'UpdatePlan', + 'UpdateTaskboardColumn', + 'UpdateTaskboardWorkItemColumn', 'WorkItem', 'WorkItemColor', 'WorkItemCommentVersionRef', diff --git a/azure-devops/azure/devops/released/work/work_client.py b/azure-devops/azure/devops/released/work/work_client.py index ca53c38d..3267a2dc 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_1.work import models +from ...v6_0.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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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,7 +175,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', + version='6.0', route_values=route_values, content=content) return self._deserialize('{str}', self._unwrap_collection(response)) @@ -183,7 +183,7 @@ def set_board_options(self, options, team_context, id): 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: [TeamMemberCapacityIdentityRef] """ @@ -208,17 +208,17 @@ 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', + version='6.0', 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. 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,7 +243,7 @@ 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', + version='6.0', route_values=route_values) return self._deserialize('TeamMemberCapacityIdentityRef', response) @@ -251,7 +251,7 @@ def replace_capacities_with_identity_ref(self, capacities, team_context, iterati """ReplaceCapacitiesWithIdentityRef. Replace a team's capacity :param [TeamMemberCapacityIdentityRef] capacities: Team capacity to replace - :param :class:` ` team_context: The team context for the operation + :param :class:` ` team_context: The team context for the operation :param str iteration_id: ID of the iteration :rtype: [TeamMemberCapacityIdentityRef] """ @@ -277,7 +277,7 @@ 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', + version='6.0', route_values=route_values, content=content) return self._deserialize('[TeamMemberCapacityIdentityRef]', self._unwrap_collection(response)) @@ -285,11 +285,11 @@ def replace_capacities_with_identity_ref(self, capacities, team_context, iterati 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,7 +315,7 @@ 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', + version='6.0', route_values=route_values, content=content) return self._deserialize('TeamMemberCapacityIdentityRef', response) @@ -323,9 +323,9 @@ def update_capacity_with_identity_ref(self, patch, team_context, iteration_id, t 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', route_values=route_values) return self._deserialize('TeamSettingsDaysOff', response) def update_team_days_off(self, days_off_patch, team_context, iteration_id): """UpdateTeamDaysOff. Set a team's days off for an iteration - :param :class:` ` days_off_patch: Team's days off patch containing a list of start and end dates - :param :class:` ` team_context: The team context for the operation + :param :class:` ` days_off_patch: Team's days off patch containing a list of start and end dates + :param :class:` ` team_context: The team context for the operation :param str iteration_id: ID of the iteration - :rtype: :class:` ` + :rtype: :class:` ` """ project = None team = None @@ -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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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 40999905..7d84b174 100644 --- a/azure-devops/azure/devops/released/work_item_tracking/__init__.py +++ b/azure-devops/azure/devops/released/work_item_tracking/__init__.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------------------------- -from ...v5_1.work_item_tracking.models import * +from ...v6_0.work_item_tracking.models import * from .work_item_tracking_client import WorkItemTrackingClient __all__ = [ @@ -26,13 +26,17 @@ 'CommentReaction', 'CommentUpdate', 'CommentVersion', + 'ExternalDeployment', + 'ExternalEnvironment', + 'ExternalPipeline', 'FieldDependentRule', - 'FieldsToEvaluate', 'GraphSubjectBase', 'IdentityRef', 'IdentityReference', 'JsonPatchOperation', 'Link', + 'ProcessIdModel', + 'ProcessMigrationResultModel', 'ProjectWorkItemStateColors', 'ProvisioningResult', 'QueryBatchGetRequest', @@ -44,6 +48,7 @@ 'ReportingWorkItemRevisionsFilter', 'StreamedBatch', 'TeamContext', + 'UpdateWorkItemField', 'Wiql', 'WorkArtifactLink', 'WorkItem', @@ -73,6 +78,7 @@ 'WorkItemRelationUpdates', 'WorkItemStateColor', 'WorkItemStateTransition', + 'WorkItemTagDefinition', 'WorkItemTemplate', 'WorkItemTemplateReference', 'WorkItemTrackingReference', 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 8e2675ce..3c4a04d5 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_1.work_item_tracking import models +from ...v6_0.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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', route_values=route_values, query_parameters=query_parameters, accept_media_type='application/zip') @@ -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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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.1', + version='6.0', 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,14 +279,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', + version='6.0', route_values=route_values, content=content) return self._deserialize('WorkItemField', response) def delete_field(self, field_name_or_ref_name, project=None): """DeleteField. - Deletes the field. + Deletes the field. To undelete a filed, see "Update Field" API. :param str field_name_or_ref_name: Field simple name or reference name :param str project: Project ID or project name """ @@ -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.1', + version='6.0', 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,13 +314,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', + version='6.0', route_values=route_values) return self._deserialize('WorkItemField', response) def get_fields(self, project=None, expand=None): """GetFields. - Returns information for all fields. + Returns information for all fields. The project ID/name parameter is optional. :param str project: Project ID or project name :param str expand: Use ExtensionFields to include extension fields, otherwise exclude them. Unless the feature flag for this parameter is enabled, extension fields are always included. :rtype: [WorkItemField] @@ -333,19 +333,40 @@ 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', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[WorkItemField]', self._unwrap_collection(response)) + def update_field(self, payload, field_name_or_ref_name, project=None): + """UpdateField. + Update a field. + :param :class:` ` payload: Payload contains desired value of the field's properties + :param str field_name_or_ref_name: Name/reference name of the field to be updated + :param str project: Project ID or project name + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if field_name_or_ref_name is not None: + route_values['fieldNameOrRefName'] = self._serialize.url('field_name_or_ref_name', field_name_or_ref_name, 'str') + content = self._serialize.body(payload, 'UpdateWorkItemField') + response = self._send(http_method='PATCH', + location_id='b51fd764-e5c2-4b9b-aaf7-3395cf4bdd94', + version='6.0', + route_values=route_values, + content=content) + return self._deserialize('WorkItemField', response) + def create_query(self, posted_query, project, query, validate_wiql_only=None): """CreateQuery. Creates a query, or moves a query. - :param :class:` ` posted_query: The query to create. + :param :class:` ` posted_query: The query to create. :param str project: Project ID or project name :param str query: The parent id or path under which the query is to be created. :param bool validate_wiql_only: If you only want to validate your WIQL query without actually creating one, set it to true. Default is false. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -358,7 +379,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', + version='6.0', route_values=route_values, query_parameters=query_parameters, content=content) @@ -377,7 +398,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.1', + version='6.0', route_values=route_values) def get_queries(self, project, expand=None, depth=None, include_deleted=None): @@ -401,7 +422,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.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[QueryHierarchyItem]', self._unwrap_collection(response)) @@ -414,7 +435,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: @@ -430,7 +451,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.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('QueryHierarchyItem', response) @@ -443,7 +464,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: @@ -459,7 +480,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.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('QueryHierarchyItemsResult', response) @@ -467,11 +488,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: @@ -484,7 +505,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', + version='6.0', route_values=route_values, query_parameters=query_parameters, content=content) @@ -493,7 +514,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] """ @@ -503,7 +524,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.1', + version='6.0', route_values=route_values, content=content) return self._deserialize('[QueryHierarchyItem]', self._unwrap_collection(response)) @@ -521,7 +542,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.1', + version='6.0', route_values=route_values) def get_deleted_work_item(self, id, project=None): @@ -529,7 +550,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: @@ -538,7 +559,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.1', + version='6.0', route_values=route_values) return self._deserialize('WorkItemDelete', response) @@ -558,7 +579,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.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[WorkItemDeleteReference]', self._unwrap_collection(response)) @@ -574,17 +595,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.1', + version='6.0', 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: @@ -594,7 +615,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.1', + version='6.0', route_values=route_values, content=content) return self._deserialize('WorkItemDelete', response) @@ -606,7 +627,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: @@ -620,7 +641,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.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('WorkItem', response) @@ -649,7 +670,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', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[WorkItem]', self._unwrap_collection(response)) @@ -660,7 +681,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: @@ -671,7 +692,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.1', + version='6.0', route_values=route_values) return self._deserialize('WorkItemUpdate', response) @@ -696,7 +717,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.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[WorkItemUpdate]', self._unwrap_collection(response)) @@ -704,11 +725,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 @@ -735,7 +756,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', + version='6.0', route_values=route_values, query_parameters=query_parameters, content=content) @@ -745,7 +766,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 @@ -776,7 +797,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.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('int', response) @@ -785,10 +806,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 @@ -816,7 +837,7 @@ 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', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('WorkItemQueryResult', response) @@ -827,7 +848,7 @@ def get_work_item_icon_json(self, icon, color=None, v=None): :param str icon: The name of the icon :param str color: The 6-digit hex color for the icon :param int v: The version of the icon (used only for cache invalidation) - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if icon is not None: @@ -839,7 +860,7 @@ 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', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('WorkItemIcon', response) @@ -851,7 +872,7 @@ def get_work_item_icons(self): """ response = self._send(http_method='GET', location_id='4e1eb4a5-1970-4228-a682-ec48eb2dca30', - version='5.1') + version='6.0') return self._deserialize('[WorkItemIcon]', self._unwrap_collection(response)) def get_work_item_icon_svg(self, icon, color=None, v=None, **kwargs): @@ -872,7 +893,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', + version='6.0', route_values=route_values, query_parameters=query_parameters, accept_media_type='image/svg+xml') @@ -900,7 +921,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', + version='6.0', route_values=route_values, query_parameters=query_parameters, accept_media_type='image/xaml+xml') @@ -918,7 +939,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: @@ -936,7 +957,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.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('ReportingWorkItemLinksBatch', response) @@ -945,14 +966,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.1', + version='6.0', route_values=route_values) return self._deserialize('WorkItemRelationType', response) @@ -963,7 +984,7 @@ def get_relation_types(self): """ response = self._send(http_method='GET', location_id='f5d33bc9-5b49-4a3c-a9bd-f3cd46dd2165', - version='5.1') + version='6.0') 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): @@ -981,7 +1002,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: @@ -1013,7 +1034,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.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('ReportingWorkItemRevisionsBatch', response) @@ -1021,12 +1042,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: @@ -1041,7 +1062,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', + version='6.0', route_values=route_values, query_parameters=query_parameters, content=content) @@ -1050,14 +1071,14 @@ def read_reporting_revisions_post(self, filter, project=None, continuation_token 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 :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: @@ -1076,7 +1097,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', + version='6.0', route_values=route_values, query_parameters=query_parameters, content=content, @@ -1091,7 +1112,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: @@ -1107,7 +1128,7 @@ 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', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('WorkItem', response) @@ -1118,7 +1139,7 @@ def delete_work_item(self, id, project=None, destroy=None): :param int id: ID of the work item to be deleted :param str project: Project ID or project name :param bool destroy: Optional parameter, if set to true, the work item is deleted permanently. Please note: the destroy action is PERMANENT and cannot be undone. - :rtype: :class:` ` + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -1130,7 +1151,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.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('WorkItemDelete', response) @@ -1143,7 +1164,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: @@ -1160,7 +1181,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.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('WorkItem', response) @@ -1194,7 +1215,7 @@ 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', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[WorkItem]', self._unwrap_collection(response)) @@ -1202,14 +1223,14 @@ def get_work_items(self, ids, project=None, fields=None, as_of=None, expand=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 :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: @@ -1228,7 +1249,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', + version='6.0', route_values=route_values, query_parameters=query_parameters, content=content, @@ -1238,7 +1259,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] """ @@ -1248,7 +1269,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', + version='6.0', route_values=route_values, content=content) return self._deserialize('[WorkItem]', self._unwrap_collection(response)) @@ -1264,7 +1285,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.1', + version='6.0', route_values=route_values) return self._deserialize('[WorkItemTypeCategory]', self._unwrap_collection(response)) @@ -1273,7 +1294,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: @@ -1282,7 +1303,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.1', + version='6.0', route_values=route_values) return self._deserialize('WorkItemTypeCategory', response) @@ -1291,7 +1312,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: @@ -1300,7 +1321,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.1', + version='6.0', route_values=route_values) return self._deserialize('WorkItemType', response) @@ -1315,7 +1336,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.1', + version='6.0', route_values=route_values) return self._deserialize('[WorkItemType]', self._unwrap_collection(response)) @@ -1337,7 +1358,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.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[WorkItemTypeFieldWithReferences]', self._unwrap_collection(response)) @@ -1349,7 +1370,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: @@ -1363,7 +1384,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', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('WorkItemTypeFieldWithReferences', response) diff --git a/azure-devops/azure/devops/v6_0/accounts/accounts_client.py b/azure-devops/azure/devops/v6_0/accounts/accounts_client.py index b70744c1..8c7c8e48 100644 --- a/azure-devops/azure/devops/v6_0/accounts/accounts_client.py +++ b/azure-devops/azure/devops/v6_0/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. One of the following parameters is required: ownerId, memberId. :param str owner_id: ID for the owner of the accounts. :param str member_id: ID for a member of the accounts. :param str properties: @@ -42,7 +42,7 @@ def get_accounts(self, owner_id=None, member_id=None, properties=None): query_parameters['properties'] = self._serialize.query('properties', properties, 'str') response = self._send(http_method='GET', location_id='229a6a53-b428-4ffb-a835-e8f36b5b4b1e', - version='6.0-preview.1', + version='6.0', query_parameters=query_parameters) return self._deserialize('[Account]', self._unwrap_collection(response)) diff --git a/azure-devops/azure/devops/v6_0/audit/models.py b/azure-devops/azure/devops/v6_0/audit/models.py index 7bdcda32..c6df3726 100644 --- a/azure-devops/azure/devops/v6_0/audit/models.py +++ b/azure-devops/azure/devops/v6_0/audit/models.py @@ -40,6 +40,8 @@ class AuditLogEntry(Model): :type activity_id: str :param actor_cUID: The Actor's CUID :type actor_cUID: str + :param actor_uPN: The Actor's UPN + :type actor_uPN: str :param actor_user_id: The Actor's User Id :type actor_user_id: str :param authentication_mechanism: Type of authentication used by the author @@ -68,6 +70,7 @@ class AuditLogEntry(Model): 'action_id': {'key': 'actionId', 'type': 'str'}, 'activity_id': {'key': 'activityId', 'type': 'str'}, 'actor_cUID': {'key': 'actorCUID', 'type': 'str'}, + 'actor_uPN': {'key': 'actorUPN', 'type': 'str'}, 'actor_user_id': {'key': 'actorUserId', 'type': 'str'}, 'authentication_mechanism': {'key': 'authenticationMechanism', 'type': 'str'}, 'correlation_id': {'key': 'correlationId', 'type': 'str'}, @@ -81,11 +84,12 @@ class AuditLogEntry(Model): 'user_agent': {'key': 'userAgent', 'type': 'str'} } - def __init__(self, action_id=None, activity_id=None, actor_cUID=None, actor_user_id=None, authentication_mechanism=None, correlation_id=None, data=None, id=None, ip_address=None, project_id=None, scope_id=None, scope_type=None, timestamp=None, user_agent=None): + def __init__(self, action_id=None, activity_id=None, actor_cUID=None, actor_uPN=None, actor_user_id=None, authentication_mechanism=None, correlation_id=None, data=None, id=None, ip_address=None, project_id=None, scope_id=None, scope_type=None, timestamp=None, user_agent=None): super(AuditLogEntry, self).__init__() self.action_id = action_id self.activity_id = activity_id self.actor_cUID = actor_cUID + self.actor_uPN = actor_uPN self.actor_user_id = actor_user_id self.authentication_mechanism = authentication_mechanism self.correlation_id = correlation_id @@ -181,6 +185,8 @@ class DecoratedAuditLogEntry(Model): :type actor_display_name: str :param actor_image_url: URL of Actor's Profile image :type actor_image_url: str + :param actor_uPN: The Actor's UPN + :type actor_uPN: str :param actor_user_id: The Actor's User Id :type actor_user_id: str :param area: Area of Azure DevOps the action occurred @@ -223,6 +229,7 @@ class DecoratedAuditLogEntry(Model): 'actor_cUID': {'key': 'actorCUID', 'type': 'str'}, 'actor_display_name': {'key': 'actorDisplayName', 'type': 'str'}, 'actor_image_url': {'key': 'actorImageUrl', 'type': 'str'}, + 'actor_uPN': {'key': 'actorUPN', 'type': 'str'}, 'actor_user_id': {'key': 'actorUserId', 'type': 'str'}, 'area': {'key': 'area', 'type': 'str'}, 'authentication_mechanism': {'key': 'authenticationMechanism', 'type': 'str'}, @@ -242,13 +249,14 @@ class DecoratedAuditLogEntry(Model): 'user_agent': {'key': 'userAgent', 'type': 'str'} } - def __init__(self, action_id=None, activity_id=None, actor_cUID=None, actor_display_name=None, actor_image_url=None, actor_user_id=None, area=None, authentication_mechanism=None, category=None, category_display_name=None, correlation_id=None, data=None, details=None, id=None, ip_address=None, project_id=None, project_name=None, scope_display_name=None, scope_id=None, scope_type=None, timestamp=None, user_agent=None): + def __init__(self, action_id=None, activity_id=None, actor_cUID=None, actor_display_name=None, actor_image_url=None, actor_uPN=None, actor_user_id=None, area=None, authentication_mechanism=None, category=None, category_display_name=None, correlation_id=None, data=None, details=None, id=None, ip_address=None, project_id=None, project_name=None, scope_display_name=None, scope_id=None, scope_type=None, timestamp=None, user_agent=None): super(DecoratedAuditLogEntry, self).__init__() self.action_id = action_id self.activity_id = activity_id self.actor_cUID = actor_cUID self.actor_display_name = actor_display_name self.actor_image_url = actor_image_url + self.actor_uPN = actor_uPN self.actor_user_id = actor_user_id self.area = area self.authentication_mechanism = authentication_mechanism diff --git a/azure-devops/azure/devops/v6_0/build/__init__.py b/azure-devops/azure/devops/v6_0/build/__init__.py index 09d0d63a..16d1b55d 100644 --- a/azure-devops/azure/devops/v6_0/build/__init__.py +++ b/azure-devops/azure/devops/v6_0/build/__init__.py @@ -58,8 +58,10 @@ 'Issue', 'JobReference', 'JsonPatchOperation', + 'MinimalRetentionLease', 'NewRetentionLease', 'PhaseReference', + 'PipelineGeneralSettings', 'PipelineReference', 'ProcessParameters', 'ProjectRetentionSetting', diff --git a/azure-devops/azure/devops/v6_0/build/build_client.py b/azure-devops/azure/devops/v6_0/build/build_client.py index 4b4cf381..79f80eb5 100644 --- a/azure-devops/azure/devops/v6_0/build/build_client.py +++ b/azure-devops/azure/devops/v6_0/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='6.0-preview.5', + version='6.0', 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='6.0-preview.5', + version='6.0', 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='6.0-preview.5', + version='6.0', 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='6.0-preview.5', + version='6.0', 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='6.0-preview.5', + version='6.0', 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='6.0-preview.5', + version='6.0', 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='6.0-preview.5', + version='6.0', 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,19 +443,20 @@ 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='6.0-preview.5', + version='6.0', 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): + def queue_build(self, build, project, ignore_warnings=None, check_in_ticket=None, source_build_id=None, definition_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: :param str check_in_ticket: :param int source_build_id: + :param int definition_id: Optional definition id to queue a build without a body. Ignored if there's a valid body :rtype: :class:` ` """ route_values = {} @@ -468,10 +469,12 @@ def queue_build(self, build, project, ignore_warnings=None, check_in_ticket=None query_parameters['checkInTicket'] = self._serialize.query('check_in_ticket', check_in_ticket, 'str') if source_build_id is not None: query_parameters['sourceBuildId'] = self._serialize.query('source_build_id', source_build_id, 'int') + if definition_id is not None: + query_parameters['definitionId'] = self._serialize.query('definition_id', definition_id, 'int') content = self._serialize.body(build, 'Build') response = self._send(http_method='POST', location_id='0cd358e1-9217-4d94-8269-1c1ee6f93dcf', - version='6.0-preview.5', + version='6.0', route_values=route_values, query_parameters=query_parameters, content=content) @@ -479,7 +482,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 +500,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='6.0-preview.5', + version='6.0', route_values=route_values, query_parameters=query_parameters, content=content) @@ -505,7 +508,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 +519,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='6.0-preview.5', + version='6.0', 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 +548,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='6.0-preview.2', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[Change]', self._unwrap_collection(response)) @@ -578,7 +581,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 +590,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='6.0-preview.2', + version='6.0', 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 +605,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='6.0-preview.2', + version='6.0', 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 +629,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='6.0-preview.7', + version='6.0', route_values=route_values, query_parameters=query_parameters, content=content) @@ -634,7 +637,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 +648,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='6.0-preview.7', + version='6.0', 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 +679,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='6.0-preview.7', + version='6.0', 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 +745,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='6.0-preview.7', + version='6.0', 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 +768,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='6.0-preview.7', + version='6.0', 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 definition. :param str project: Project ID or project name :param int definition_id: The ID of the definition. @@ -793,7 +796,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='6.0-preview.7', + version='6.0', route_values=route_values, query_parameters=query_parameters, content=content) @@ -923,6 +926,39 @@ def update_folder(self, folder, project, path): content=content) return self._deserialize('Folder', response) + def get_build_general_settings(self, project): + """GetBuildGeneralSettings. + [Preview API] Gets pipeline general settings. + :param str project: Project ID or project name + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + response = self._send(http_method='GET', + location_id='c4aefd19-30ff-405b-80ad-aca021e7242a', + version='6.0-preview.1', + route_values=route_values) + return self._deserialize('PipelineGeneralSettings', response) + + def update_build_general_settings(self, new_settings, project): + """UpdateBuildGeneralSettings. + [Preview API] Updates pipeline general settings. + :param :class:` ` new_settings: + :param str project: Project ID or project name + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(new_settings, 'PipelineGeneralSettings') + response = self._send(http_method='PATCH', + location_id='c4aefd19-30ff-405b-80ad-aca021e7242a', + version='6.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('PipelineGeneralSettings', response) + def get_latest_build(self, project, definition, branch_name=None): """GetLatestBuild. [Preview API] Gets the latest build for a definition, optionally scoped to a specific branch. @@ -1001,6 +1037,27 @@ def get_retention_lease(self, project, lease_id): route_values=route_values) return self._deserialize('RetentionLease', response) + def get_retention_leases_by_minimal_retention_leases(self, project, leases_to_fetch): + """GetRetentionLeasesByMinimalRetentionLeases. + [Preview API] Returns any leases matching the specified MinimalRetentionLeases + :param str project: Project ID or project name + :param [MinimalRetentionLease] leases_to_fetch: List of JSON-serialized MinimalRetentionLeases separated by '|' + :rtype: [RetentionLease] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if leases_to_fetch is not None: + leases_to_fetch = "|".join(map(str, leases_to_fetch)) + query_parameters['leasesToFetch'] = self._serialize.query('leases_to_fetch', leases_to_fetch, 'str') + response = self._send(http_method='GET', + location_id='272051e4-9af1-45b5-ae22-8d960a5539d4', + version='6.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('[RetentionLease]', self._unwrap_collection(response)) + def get_retention_leases_by_owner_id(self, project, owner_id=None, definition_id=None, run_id=None): """GetRetentionLeasesByOwnerId. [Preview API] Returns any leases owned by the specified entity, optionally scoped to a single pipeline definition and run. @@ -1055,7 +1112,7 @@ def get_retention_leases_by_user_id(self, project, user_owner_id, definition_id= 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. @@ -1077,7 +1134,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='6.0-preview.2', + version='6.0', route_values=route_values, query_parameters=query_parameters, accept_media_type='text/plain') @@ -1089,7 +1146,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. @@ -1111,14 +1168,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='6.0-preview.2', + version='6.0', 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] @@ -1130,13 +1187,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='6.0-preview.2', + version='6.0', 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 @@ -1148,7 +1205,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='6.0-preview.2', + version='6.0', route_values=route_values, accept_media_type='application/zip') if "callback" in kwargs: @@ -1159,7 +1216,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. @@ -1181,7 +1238,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='6.0-preview.2', + version='6.0', route_values=route_values, query_parameters=query_parameters, accept_media_type='application/zip') @@ -1239,7 +1296,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] """ @@ -1248,7 +1305,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='6.0-preview.2', + version='6.0', route_values=route_values) return self._deserialize('[BuildOptionDefinition]', self._unwrap_collection(response)) @@ -1575,7 +1632,7 @@ def update_retention_settings(self, update_model, project): 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] @@ -1587,13 +1644,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='6.0-preview.3', + version='6.0', 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:` ` """ @@ -1602,13 +1659,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='6.0-preview.1', + version='6.0', 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:` ` @@ -1619,7 +1676,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='6.0-preview.1', + version='6.0', route_values=route_values, content=content) return self._deserialize('BuildSettings', response) @@ -1698,7 +1755,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. @@ -1713,13 +1770,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='6.0-preview.2', + version='6.0', 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. @@ -1733,14 +1790,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='6.0-preview.2', + version='6.0', 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. @@ -1755,13 +1812,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='6.0-preview.2', + version='6.0', 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] @@ -1773,7 +1830,40 @@ 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='6.0-preview.2', + version='6.0', + route_values=route_values) + return self._deserialize('[str]', self._unwrap_collection(response)) + + def delete_tag(self, project, tag): + """DeleteTag. + Removes a tag from builds, definitions, and from the tag store + :param str project: Project ID or project name + :param str tag: The tag to remove. + :rtype: [str] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if tag is not None: + route_values['tag'] = self._serialize.url('tag', tag, 'str') + response = self._send(http_method='DELETE', + location_id='d84ac5c6-edc7-43d5-adc9-1b34be5dea09', + version='6.0', + route_values=route_values) + return self._deserialize('[str]', self._unwrap_collection(response)) + + def get_tags(self, project): + """GetTags. + Gets a list of all build tags in the project. + :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='6.0', route_values=route_values) return self._deserialize('[str]', self._unwrap_collection(response)) @@ -1863,42 +1953,9 @@ def get_definition_tags(self, project, definition_id, revision=None): query_parameters=query_parameters) return self._deserialize('[str]', self._unwrap_collection(response)) - def delete_tag(self, project, tag): - """DeleteTag. - [Preview API] Removes a tag from builds, definitions, and from the tag store - :param str project: Project ID or project name - :param str tag: The tag to remove. - :rtype: [str] - """ - route_values = {} - if project is not None: - route_values['project'] = self._serialize.url('project', project, 'str') - if tag is not None: - route_values['tag'] = self._serialize.url('tag', tag, 'str') - response = self._send(http_method='DELETE', - location_id='d84ac5c6-edc7-43d5-adc9-1b34be5dea09', - version='6.0-preview.2', - route_values=route_values) - return self._deserialize('[str]', self._unwrap_collection(response)) - - def get_tags(self, project): - """GetTags. - [Preview API] Gets a list of all build 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='6.0-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. """ @@ -1909,12 +1966,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='6.0-preview.3', + version='6.0', 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:` ` @@ -1926,13 +1983,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='6.0-preview.3', + version='6.0', 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] """ @@ -1941,13 +1998,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='6.0-preview.3', + version='6.0', 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. @@ -1961,14 +2018,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='6.0-preview.3', + version='6.0', 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: @@ -1990,7 +2047,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='6.0-preview.2', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('Timeline', response) @@ -2050,7 +2107,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. @@ -2066,14 +2123,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='6.0-preview.2', + version='6.0', 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. @@ -2091,7 +2148,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='6.0-preview.2', + version='6.0', route_values=route_values, query_parameters=query_parameters, content=content) diff --git a/azure-devops/azure/devops/v6_0/build/models.py b/azure-devops/azure/devops/v6_0/build/models.py index dd914001..33cd2852 100644 --- a/azure-devops/azure/devops/v6_0/build/models.py +++ b/azure-devops/azure/devops/v6_0/build/models.py @@ -1520,6 +1520,29 @@ def __init__(self, from_=None, op=None, path=None, value=None): self.value = value +class MinimalRetentionLease(Model): + """ + :param definition_id: The pipeline definition of the run. + :type definition_id: int + :param owner_id: User-provided string that identifies the owner of a retention lease. + :type owner_id: str + :param run_id: The pipeline run to protect. + :type run_id: int + """ + + _attribute_map = { + 'definition_id': {'key': 'definitionId', 'type': 'int'}, + 'owner_id': {'key': 'ownerId', 'type': 'str'}, + 'run_id': {'key': 'runId', 'type': 'int'} + } + + def __init__(self, definition_id=None, owner_id=None, run_id=None): + super(MinimalRetentionLease, self).__init__() + self.definition_id = definition_id + self.owner_id = owner_id + self.run_id = run_id + + class NewRetentionLease(Model): """ :param days_valid: The number of days to consider the lease valid. @@ -1572,6 +1595,39 @@ def __init__(self, attempt=None, phase_name=None): self.phase_name = phase_name +class PipelineGeneralSettings(Model): + """ + Contains pipeline general settings. + + :param enforce_job_auth_scope: If enabled, scope of access for all pipelines reduces to the current project. + :type enforce_job_auth_scope: bool + :param enforce_referenced_repo_scoped_token: Restricts the scope of access for all pipelines to only repositories explicitly referenced by the pipeline. + :type enforce_referenced_repo_scoped_token: bool + :param enforce_settable_var: If enabled, only those variables that are explicitly marked as "Settable at queue time" can be set at queue time. + :type enforce_settable_var: bool + :param publish_pipeline_metadata: Allows pipelines to record metadata. + :type publish_pipeline_metadata: bool + :param status_badges_are_private: Anonymous users can access the status badge API for all pipelines unless this option is enabled. + :type status_badges_are_private: bool + """ + + _attribute_map = { + 'enforce_job_auth_scope': {'key': 'enforceJobAuthScope', 'type': 'bool'}, + 'enforce_referenced_repo_scoped_token': {'key': 'enforceReferencedRepoScopedToken', 'type': 'bool'}, + 'enforce_settable_var': {'key': 'enforceSettableVar', 'type': 'bool'}, + 'publish_pipeline_metadata': {'key': 'publishPipelineMetadata', 'type': 'bool'}, + 'status_badges_are_private': {'key': 'statusBadgesArePrivate', 'type': 'bool'} + } + + def __init__(self, enforce_job_auth_scope=None, enforce_referenced_repo_scoped_token=None, enforce_settable_var=None, publish_pipeline_metadata=None, status_badges_are_private=None): + super(PipelineGeneralSettings, self).__init__() + self.enforce_job_auth_scope = enforce_job_auth_scope + self.enforce_referenced_repo_scoped_token = enforce_referenced_repo_scoped_token + self.enforce_settable_var = enforce_settable_var + self.publish_pipeline_metadata = publish_pipeline_metadata + self.status_badges_are_private = status_badges_are_private + + class PipelineReference(Model): """ Pipeline reference @@ -2443,6 +2499,8 @@ class TimelineRecord(Model): :type percent_complete: int :param previous_attempts: :type previous_attempts: list of :class:`TimelineAttempt ` + :param queue_id: The queue ID of the queue that the operation ran on. + :type queue_id: int :param result: The result. :type result: object :param result_code: The result code. @@ -2481,6 +2539,7 @@ class TimelineRecord(Model): 'parent_id': {'key': 'parentId', 'type': 'str'}, 'percent_complete': {'key': 'percentComplete', 'type': 'int'}, 'previous_attempts': {'key': 'previousAttempts', 'type': '[TimelineAttempt]'}, + 'queue_id': {'key': 'queueId', 'type': 'int'}, 'result': {'key': 'result', 'type': 'object'}, 'result_code': {'key': 'resultCode', 'type': 'str'}, 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, @@ -2492,7 +2551,7 @@ class TimelineRecord(Model): 'worker_name': {'key': 'workerName', 'type': 'str'} } - def __init__(self, _links=None, attempt=None, change_id=None, current_operation=None, details=None, error_count=None, finish_time=None, id=None, identifier=None, issues=None, last_modified=None, log=None, name=None, order=None, parent_id=None, percent_complete=None, previous_attempts=None, result=None, result_code=None, start_time=None, state=None, task=None, type=None, url=None, warning_count=None, worker_name=None): + def __init__(self, _links=None, attempt=None, change_id=None, current_operation=None, details=None, error_count=None, finish_time=None, id=None, identifier=None, issues=None, last_modified=None, log=None, name=None, order=None, parent_id=None, percent_complete=None, previous_attempts=None, queue_id=None, result=None, result_code=None, start_time=None, state=None, task=None, type=None, url=None, warning_count=None, worker_name=None): super(TimelineRecord, self).__init__() self._links = _links self.attempt = attempt @@ -2511,6 +2570,7 @@ def __init__(self, _links=None, attempt=None, change_id=None, current_operation= self.parent_id = parent_id self.percent_complete = percent_complete self.previous_attempts = previous_attempts + self.queue_id = queue_id self.result = result self.result_code = result_code self.start_time = start_time @@ -3338,8 +3398,10 @@ def __init__(self, created_date=None, id=None, name=None, path=None, project=Non 'Issue', 'JobReference', 'JsonPatchOperation', + 'MinimalRetentionLease', 'NewRetentionLease', 'PhaseReference', + 'PipelineGeneralSettings', 'PipelineReference', 'ProcessParameters', 'ProjectRetentionSetting', diff --git a/azure-devops/azure/devops/v6_0/client_factory.py b/azure-devops/azure/devops/v6_0/client_factory.py index 239f437a..68ccfc63 100644 --- a/azure-devops/azure/devops/v6_0/client_factory.py +++ b/azure-devops/azure/devops/v6_0/client_factory.py @@ -9,7 +9,7 @@ class ClientFactoryV6_0(object): """ClientFactoryV6_0. - A factory class to get the 6.0 preview clients. + A factory class to get the 6.0 clients. """ def __init__(self, connection): @@ -113,13 +113,6 @@ def get_feed_client(self): """ return self._connection.get_client('azure.devops.v6_0.feed.feed_client.FeedClient') - def get_feed_token_client(self): - """get_feed_token_client. - Gets the 6.0 version of the FeedTokenClient - :rtype: :class:` ` - """ - return self._connection.get_client('azure.devops.v6_0.feed_token.feed_token_client.FeedTokenClient') - def get_file_container_client(self): """get_file_container_client. Gets the 6.0 version of the FileContainerClient @@ -204,6 +197,13 @@ def get_operations_client(self): """ return self._connection.get_client('azure.devops.v6_0.operations.operations_client.OperationsClient') + def get_pipeline_permissions_client(self): + """get_pipeline_permissions_client. + Gets the 6.0 version of the PipelinePermissionsClient + :rtype: :class:` ` + """ + return self._connection.get_client('azure.devops.v6_0.pipeline_permissions.pipeline_permissions_client.PipelinePermissionsClient') + def get_pipelines_client(self): """get_pipelines_client. Gets the 6.0 version of the PipelinesClient @@ -211,6 +211,13 @@ def get_pipelines_client(self): """ return self._connection.get_client('azure.devops.v6_0.pipelines.pipelines_client.PipelinesClient') + def get_pipelines_checks_client(self): + """get_pipelines_checks_client. + Gets the 6.0 version of the PipelinesChecksClient + :rtype: :class:` ` + """ + return self._connection.get_client('azure.devops.v6_0.pipelines_checks.pipelines_checks_client.PipelinesChecksClient') + def get_policy_client(self): """get_policy_client. Gets the 6.0 version of the PolicyClient @@ -351,13 +358,6 @@ def get_token_admin_client(self): """ return self._connection.get_client('azure.devops.v6_0.token_admin.token_admin_client.TokenAdminClient') - def get_token_administration_client(self): - """get_token_administration_client. - Gets the 6.0 version of the TokenAdministrationClient - :rtype: :class:` ` - """ - return self._connection.get_client('azure.devops.v6_0.token_administration.token_administration_client.TokenAdministrationClient') - def get_upack_api_client(self): """get_upack_api_client. Gets the 6.0 version of the UPackApiClient diff --git a/azure-devops/azure/devops/v6_0/cloud_load_test/cloud_load_test_client.py b/azure-devops/azure/devops/v6_0/cloud_load_test/cloud_load_test_client.py index 822a6f53..b2fa93f1 100644 --- a/azure-devops/azure/devops/v6_0/cloud_load_test/cloud_load_test_client.py +++ b/azure-devops/azure/devops/v6_0/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='6.0-preview.1', + version='6.0', 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 identifier :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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.2', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1') + version='6.0') 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', route_values=route_values, content=content) diff --git a/azure-devops/azure/devops/v6_0/core/core_client.py b/azure-devops/azure/devops/v6_0/core/core_client.py index 57867fae..e0b12040 100644 --- a/azure-devops/azure/devops/v6_0/core/core_client.py +++ b/azure-devops/azure/devops/v6_0/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='6.0-preview.2', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1') + version='6.0') 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='6.0-preview.2', + version='6.0', 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='6.0-preview.2', + version='6.0', 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='6.0-preview.4', + version='6.0', 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='6.0-preview.4', + version='6.0', 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='6.0-preview.4', + version='6.0', 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='6.0-preview.4', + version='6.0', 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='6.0-preview.4', + version='6.0', 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='6.0-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,14 +385,14 @@ def create_team(self, team, project_id): content = self._serialize.body(team, 'WebApiTeam') response = self._send(http_method='POST', location_id='d30a3dd1-f8ba-442a-b86a-bd0c0c383e59', - version='6.0-preview.3', + version='6.0', 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 or ID of the team to delete. """ @@ -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='6.0-preview.3', + version='6.0', 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='6.0-preview.3', + version='6.0', 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='6.0-preview.3', + version='6.0', 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='6.0-preview.3', + version='6.0', 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='6.0-preview.3', + query_parameters=query_parameters) + return self._deserialize('[WebApiTeam]', self._unwrap_collection(response)) + diff --git a/azure-devops/azure/devops/v6_0/core/models.py b/azure-devops/azure/devops/v6_0/core/models.py index 311c830f..89a19eeb 100644 --- a/azure-devops/azure/devops/v6_0/core/models.py +++ b/azure-devops/azure/devops/v6_0/core/models.py @@ -44,15 +44,15 @@ class IdentityBase(Model): :type custom_display_name: str :param descriptor: :type descriptor: :class:`str ` - :param id: + :param id: Identity Identifier. Also called Storage Key, or VSID :type id: str - :param is_active: + :param is_active: True if the identity has a membership in any Azure Devops group in the organization. :type is_active: bool - :param is_container: + :param is_container: True if the identity is a group. :type is_container: bool :param master_id: :type master_id: str - :param member_ids: + :param member_ids: Id of the members of the identity (groups only). :type member_ids: list of str :param member_of: :type member_of: list of :class:`str ` @@ -68,7 +68,7 @@ class IdentityBase(Model): :type resource_version: int :param social_descriptor: :type social_descriptor: :class:`str ` - :param subject_descriptor: + :param subject_descriptor: Subject descriptor of a Graph entity. :type subject_descriptor: :class:`str ` :param unique_user_id: :type unique_user_id: int @@ -627,15 +627,15 @@ class Identity(IdentityBase): :type custom_display_name: str :param descriptor: :type descriptor: :class:`str ` - :param id: + :param id: Identity Identifier. Also called Storage Key, or VSID :type id: str - :param is_active: + :param is_active: True if the identity has a membership in any Azure Devops group in the organization. :type is_active: bool - :param is_container: + :param is_container: True if the identity is a group. :type is_container: bool :param master_id: :type master_id: str - :param member_ids: + :param member_ids: Id of the members of the identity (groups only). :type member_ids: list of str :param member_of: :type member_of: list of :class:`str ` @@ -651,7 +651,7 @@ class Identity(IdentityBase): :type resource_version: int :param social_descriptor: :type social_descriptor: :class:`str ` - :param subject_descriptor: + :param subject_descriptor: Subject descriptor of a Graph entity. :type subject_descriptor: :class:`str ` :param unique_user_id: :type unique_user_id: int diff --git a/azure-devops/azure/devops/v6_0/git/git_client_base.py b/azure-devops/azure/devops/v6_0/git/git_client_base.py index b457f600..e59881ab 100644 --- a/azure-devops/azure/devops/v6_0/git/git_client_base.py +++ b/azure-devops/azure/devops/v6_0/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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('GitCommitChanges', response) @@ -315,7 +315,7 @@ def create_cherry_pick(self, cherry_pick_to_create, project, repository_id): def get_cherry_pick(self, project, cherry_pick_id, repository_id): """GetCherryPick. - [Preview API] Retrieve information about a cherry pick by cherry pick Id. + [Preview API] Retrieve information about a cherry pick operation by cherry pick Id. :param str project: Project ID or project name :param int cherry_pick_id: ID of the cherry pick. :param str repository_id: ID of the repository. @@ -336,7 +336,7 @@ def get_cherry_pick(self, project, cherry_pick_id, repository_id): def get_cherry_pick_for_ref_name(self, project, repository_id, ref_name): """GetCherryPickForRefName. - [Preview API] Retrieve information about a cherry pick for a specific branch. + [Preview API] Retrieve information about a cherry pick operation for a specific branch. This operation is expensive due to the underlying object structure, so this API only looks at the 1000 most recent cherry pick operations. :param str project: Project ID or project name :param str repository_id: ID of the repository. :param str ref_name: The GitAsyncRefOperationParameters generatedRefName used for the cherry pick operation. @@ -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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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 @@ -499,14 +499,14 @@ def get_commits(self, repository_id, search_criteria, project=None, skip=None, t query_parameters['$top'] = self._serialize.query('top', top, 'int') response = self._send(http_method='GET', location_id='c2570c3b-5b3f-41b8-98bf-5407bfde8d58', - version='6.0-preview.1', + version='6.0', 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 @@ -531,14 +531,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='6.0-preview.1', + version='6.0', 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 @@ -562,7 +562,7 @@ def get_commits_batch(self, search_criteria, repository_id, project=None, skip=N content = self._serialize.body(search_criteria, 'GitQueryCommitsCriteria') response = self._send(http_method='POST', location_id='6400dfb2-0bcb-462b-b992-5a57f8f1416c', - version='6.0-preview.1', + version='6.0', route_values=route_values, query_parameters=query_parameters, content=content) @@ -778,7 +778,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, sanitize=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 @@ -826,14 +826,14 @@ def get_item(self, repository_id, path, project=None, scope_path=None, recursion query_parameters['sanitize'] = self._serialize.query('sanitize', sanitize, 'bool') response = self._send(http_method='GET', location_id='fb93c0db-47ed-4a31-8c20-47552878fb44', - version='6.0-preview.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('GitItem', response) def get_item_content(self, repository_id, path, project=None, scope_path=None, recursion_level=None, include_content_metadata=None, latest_processed_change=None, download=None, version_descriptor=None, include_content=None, resolve_lfs=None, sanitize=None, **kwargs): """GetItemContent. - [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 @@ -881,7 +881,7 @@ def get_item_content(self, repository_id, path, project=None, scope_path=None, r query_parameters['sanitize'] = self._serialize.query('sanitize', sanitize, 'bool') response = self._send(http_method='GET', location_id='fb93c0db-47ed-4a31-8c20-47552878fb44', - version='6.0-preview.1', + version='6.0', route_values=route_values, query_parameters=query_parameters, accept_media_type='application/octet-stream') @@ -893,7 +893,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. @@ -932,14 +932,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='6.0-preview.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[GitItem]', self._unwrap_collection(response)) def get_item_text(self, repository_id, path, project=None, scope_path=None, recursion_level=None, include_content_metadata=None, latest_processed_change=None, download=None, version_descriptor=None, include_content=None, resolve_lfs=None, sanitize=None, **kwargs): """GetItemText. - [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 @@ -987,7 +987,7 @@ def get_item_text(self, repository_id, path, project=None, scope_path=None, recu query_parameters['sanitize'] = self._serialize.query('sanitize', sanitize, 'bool') response = self._send(http_method='GET', location_id='fb93c0db-47ed-4a31-8c20-47552878fb44', - version='6.0-preview.1', + version='6.0', route_values=route_values, query_parameters=query_parameters, accept_media_type='text/plain') @@ -999,7 +999,7 @@ def get_item_text(self, repository_id, path, project=None, scope_path=None, recu def get_item_zip(self, repository_id, path, project=None, scope_path=None, recursion_level=None, include_content_metadata=None, latest_processed_change=None, download=None, version_descriptor=None, include_content=None, resolve_lfs=None, sanitize=None, **kwargs): """GetItemZip. - [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 @@ -1047,7 +1047,7 @@ def get_item_zip(self, repository_id, path, project=None, scope_path=None, recur query_parameters['sanitize'] = self._serialize.query('sanitize', sanitize, 'bool') response = self._send(http_method='GET', location_id='fb93c0db-47ed-4a31-8c20-47552878fb44', - version='6.0-preview.1', + version='6.0', route_values=route_values, query_parameters=query_parameters, accept_media_type='application/zip') @@ -1059,7 +1059,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 @@ -1073,7 +1073,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='6.0-preview.1', + version='6.0', route_values=route_values, content=content) return self._deserialize('[[GitItem]]', self._unwrap_collection(response)) @@ -1409,7 +1409,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. @@ -1434,14 +1434,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='6.0-preview.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[GitCommitRef]', self._unwrap_collection(response)) def get_pull_request_commits(self, repository_id, pull_request_id, project=None, top=None, continuation_token=None): """GetPullRequestCommits. - [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 @@ -1463,14 +1463,14 @@ def get_pull_request_commits(self, repository_id, pull_request_id, project=None, query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'str') response = self._send(http_method='GET', location_id='52823034-34a8-4576-922c-8d8b77e9e4c4', - version='6.0-preview.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[GitCommitRef]', self._unwrap_collection(response)) def get_pull_request_iteration_changes(self, repository_id, pull_request_id, iteration_id, project=None, top=None, skip=None, compare_to=None): """GetPullRequestIterationChanges. - [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. @@ -1498,14 +1498,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='6.0-preview.1', + version='6.0', 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. @@ -1523,13 +1523,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='6.0-preview.1', + version='6.0', 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 @@ -1548,7 +1548,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='6.0-preview.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[GitPullRequestIteration]', self._unwrap_collection(response)) @@ -1841,7 +1841,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 @@ -1855,16 +1855,16 @@ 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='6.0-preview.1', + version='6.0', 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 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 @@ -1882,16 +1882,16 @@ 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='6.0-preview.1', + version='6.0', 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 str repository_id: The repository ID of the pull request's target branch. :param int pull_request_id: ID of the pull request. :param str project: Project ID or project name :rtype: [IdentityRefWithVote] @@ -1906,15 +1906,39 @@ 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='6.0-preview.1', + version='6.0', route_values=route_values, content=content) return self._deserialize('[IdentityRefWithVote]', self._unwrap_collection(response)) + def create_unmaterialized_pull_request_reviewer(self, reviewer, repository_id, pull_request_id, project=None): + """CreateUnmaterializedPullRequestReviewer. + Add an unmaterialized identity to the reviewers of a pull request. + :param :class:` ` reviewer: Reviewer to add to the pull request. + :param str repository_id: The repository ID of the pull request's target branch. + :param int pull_request_id: ID of the pull request. + :param str project: Project ID or project name + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') + content = self._serialize.body(reviewer, 'IdentityRefWithVote') + response = self._send(http_method='PUT', + location_id='4b6702c7-aa35-4b89-9c96-b9abf6d3e540', + version='6.0', + route_values=route_values, + content=content) + return self._deserialize('IdentityRefWithVote', response) + def delete_pull_request_reviewer(self, repository_id, pull_request_id, reviewer_id, project=None): """DeletePullRequestReviewer. - [Preview API] Remove a reviewer from a pull request. - :param str repository_id: The repository ID of the pull request’s target branch. + 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. :param str project: Project ID or project name @@ -1930,13 +1954,13 @@ 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='6.0-preview.1', + version='6.0', 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 - :param str repository_id: The repository ID of the pull request’s target branch. + Retrieve information about a particular reviewer on a pull request + :param str repository_id: The repository ID of the pull request's target branch. :param int pull_request_id: ID of the pull request. :param str reviewer_id: ID of the reviewer. :param str project: Project ID or project name @@ -1953,14 +1977,14 @@ 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='6.0-preview.1', + version='6.0', 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 - :param str repository_id: The repository ID of the pull request’s target branch. + 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 :rtype: [IdentityRefWithVote] @@ -1974,15 +1998,15 @@ 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='6.0-preview.1', + version='6.0', route_values=route_values) return self._deserialize('[IdentityRefWithVote]', self._unwrap_collection(response)) def update_pull_request_reviewer(self, reviewer, repository_id, pull_request_id, reviewer_id, project=None): """UpdatePullRequestReviewer. - [Preview API] Edit a reviewer entry. These fields are patchable: isFlagged + Edit a reviewer entry. These fields are patchable: isFlagged, hasDeclined :param :class:` ` reviewer: Reviewer data.
If the reviewer's ID is included here, it must match the reviewerID parameter. - :param str repository_id: The repository ID of the pull request’s target branch. + :param 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 @@ -2000,16 +2024,16 @@ def update_pull_request_reviewer(self, reviewer, repository_id, pull_request_id, content = self._serialize.body(reviewer, 'IdentityRefWithVote') response = self._send(http_method='PATCH', location_id='4b6702c7-aa35-4b89-9c96-b9abf6d3e540', - version='6.0-preview.1', + version='6.0', route_values=route_values, content=content) return self._deserialize('IdentityRefWithVote', response) def update_pull_request_reviewers(self, patch_votes, repository_id, pull_request_id, project=None): """UpdatePullRequestReviewers. - [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 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 """ @@ -2023,13 +2047,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='6.0-preview.1', + version='6.0', 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:` ` @@ -2041,13 +2065,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='6.0-preview.1', + version='6.0', 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. @@ -2084,14 +2108,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='6.0-preview.1', + version='6.0', 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 @@ -2109,7 +2133,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='6.0-preview.1', + version='6.0', route_values=route_values, query_parameters=query_parameters, content=content) @@ -2117,7 +2141,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 @@ -2148,14 +2172,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='6.0-preview.1', + version='6.0', 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 @@ -2195,14 +2219,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='6.0-preview.1', + version='6.0', 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. @@ -2219,7 +2243,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='6.0-preview.1', + version='6.0', route_values=route_values, content=content) return self._deserialize('GitPullRequest', response) @@ -2362,7 +2386,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. @@ -2382,14 +2406,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='6.0-preview.1', + version='6.0', 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. @@ -2409,12 +2433,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='6.0-preview.1', + version='6.0', 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. @@ -2435,13 +2459,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='6.0-preview.1', + version='6.0', 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. @@ -2459,13 +2483,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='6.0-preview.1', + version='6.0', 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. @@ -2488,14 +2512,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='6.0-preview.1', + version='6.0', 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. @@ -2512,14 +2536,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='6.0-preview.1', + version='6.0', 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. @@ -2544,14 +2568,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='6.0-preview.1', + version='6.0', 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 @@ -2573,14 +2597,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='6.0-preview.1', + version='6.0', 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. @@ -2600,14 +2624,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='6.0-preview.1', + version='6.0', 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 @@ -2622,13 +2646,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='6.0-preview.1', + version='6.0', 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 @@ -2642,14 +2666,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='6.0-preview.2', + version='6.0', 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 @@ -2671,14 +2695,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='6.0-preview.2', + version='6.0', 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. @@ -2711,7 +2735,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='6.0-preview.2', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[GitPush]', self._unwrap_collection(response)) @@ -2770,7 +2794,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, top=None, continuation_token=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). @@ -2810,14 +2834,14 @@ def get_refs(self, repository_id, project=None, filter=None, include_links=None, query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'str') response = self._send(http_method='GET', location_id='2d874a60-a811-4f62-9c9f-963a6ea0a55b', - version='6.0-preview.1', + version='6.0', 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 @@ -2838,7 +2862,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='6.0-preview.1', + version='6.0', route_values=route_values, query_parameters=query_parameters, content=content) @@ -2846,7 +2870,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 @@ -2864,7 +2888,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='6.0-preview.1', + version='6.0', route_values=route_values, query_parameters=query_parameters, content=content) @@ -2947,7 +2971,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 omitted from gitRepositoryToCreate if the request is project-scoped (i.e., includes project Id). :param str project: Project ID or project name :param str source_ref: [optional] Specify the source refs to use while creating a fork repo @@ -2962,7 +2986,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='6.0-preview.1', + version='6.0', route_values=route_values, query_parameters=query_parameters, content=content) @@ -2970,7 +2994,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 ID of the repository. :param str project: Project ID or project name """ @@ -2981,12 +3005,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='6.0-preview.1', + version='6.0', 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. @@ -3005,14 +3029,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='6.0-preview.1', + version='6.0', 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:` ` @@ -3024,13 +3048,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='6.0-preview.1', + version='6.0', 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 @@ -3046,14 +3070,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='6.0-preview.1', + version='6.0', 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 ID of the repository. :param str project: Project ID or project name @@ -3067,7 +3091,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='6.0-preview.1', + version='6.0', route_values=route_values, content=content) return self._deserialize('GitRepository', response) @@ -3157,7 +3181,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. @@ -3174,14 +3198,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='6.0-preview.1', + version='6.0', 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 @@ -3206,7 +3230,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='6.0-preview.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[GitStatus]', self._unwrap_collection(response)) @@ -3231,7 +3255,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 @@ -3256,14 +3280,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='6.0-preview.1', + version='6.0', 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 @@ -3288,7 +3312,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='6.0-preview.1', + version='6.0', route_values=route_values, query_parameters=query_parameters, accept_media_type='application/zip') diff --git a/azure-devops/azure/devops/v6_0/git/models.py b/azure-devops/azure/devops/v6_0/git/models.py index a916f537..ecccb55d 100644 --- a/azure-devops/azure/devops/v6_0/git/models.py +++ b/azure-devops/azure/devops/v6_0/git/models.py @@ -1576,6 +1576,8 @@ class GitPullRequestCompletionOptions(Model): """ Preferences about how the pull request should be completed. + :param auto_complete_ignore_config_ids: List of any policy configuration Id's which auto-complete should not wait for. Only applies to optional policies (isBlocking == false). Auto-complete always waits for required policies (isBlocking == true). + :type auto_complete_ignore_config_ids: list of int :param bypass_policy: If true, policies will be explicitly bypassed while the pull request is completed. :type bypass_policy: bool :param bypass_reason: If policies are bypassed, this reason is stored as to why bypass was used. @@ -1584,7 +1586,7 @@ class GitPullRequestCompletionOptions(Model): :type delete_source_branch: bool :param merge_commit_message: If set, this will be used as the commit message of the merge commit. :type merge_commit_message: str - :param merge_strategy: Specify the strategy used to merge the pull request during completion. If MergeStrategy is not set to any value, a no-FF merge will be created if SquashMerge == false. If MergeStrategy is not set to any value, the pull request commits will be squash if SquashMerge == true. The SquashMerge member is deprecated. It is recommended that you explicitly set MergeStrategy in all cases. If an explicit value is provided for MergeStrategy, the SquashMerge member will be ignored. + :param merge_strategy: Specify the strategy used to merge the pull request during completion. If MergeStrategy is not set to any value, a no-FF merge will be created if SquashMerge == false. If MergeStrategy is not set to any value, the pull request commits will be squashed if SquashMerge == true. The SquashMerge property is deprecated. It is recommended that you explicitly set MergeStrategy in all cases. If an explicit value is provided for MergeStrategy, the SquashMerge property will be ignored. :type merge_strategy: object :param squash_merge: SquashMerge is deprecated. You should explicitly set the value of MergeStrategy. If MergeStrategy is set to any value, the SquashMerge value will be ignored. If MergeStrategy is not set, the merge strategy will be no-fast-forward if this flag is false, or squash if true. :type squash_merge: bool @@ -1595,6 +1597,7 @@ class GitPullRequestCompletionOptions(Model): """ _attribute_map = { + 'auto_complete_ignore_config_ids': {'key': 'autoCompleteIgnoreConfigIds', 'type': '[int]'}, 'bypass_policy': {'key': 'bypassPolicy', 'type': 'bool'}, 'bypass_reason': {'key': 'bypassReason', 'type': 'str'}, 'delete_source_branch': {'key': 'deleteSourceBranch', 'type': 'bool'}, @@ -1605,8 +1608,9 @@ class GitPullRequestCompletionOptions(Model): 'triggered_by_auto_complete': {'key': 'triggeredByAutoComplete', 'type': 'bool'} } - def __init__(self, bypass_policy=None, bypass_reason=None, delete_source_branch=None, merge_commit_message=None, merge_strategy=None, squash_merge=None, transition_work_items=None, triggered_by_auto_complete=None): + def __init__(self, auto_complete_ignore_config_ids=None, bypass_policy=None, bypass_reason=None, delete_source_branch=None, merge_commit_message=None, merge_strategy=None, squash_merge=None, transition_work_items=None, triggered_by_auto_complete=None): super(GitPullRequestCompletionOptions, self).__init__() + self.auto_complete_ignore_config_ids = auto_complete_ignore_config_ids self.bypass_policy = bypass_policy self.bypass_reason = bypass_reason self.delete_source_branch = delete_source_branch @@ -1723,6 +1727,8 @@ class GitPullRequestMergeOptions(Model): """ The options which are used when a pull request merge is created. + :param conflict_authorship_commits: If true, conflict resolutions applied during the merge will be put in separate commits to preserve authorship info for git blame, etc. + :type conflict_authorship_commits: bool :param detect_rename_false_positives: :type detect_rename_false_positives: bool :param disable_renames: If true, rename detection will not be performed during the merge. @@ -1730,12 +1736,14 @@ class GitPullRequestMergeOptions(Model): """ _attribute_map = { + 'conflict_authorship_commits': {'key': 'conflictAuthorshipCommits', 'type': 'bool'}, 'detect_rename_false_positives': {'key': 'detectRenameFalsePositives', 'type': 'bool'}, 'disable_renames': {'key': 'disableRenames', 'type': 'bool'} } - def __init__(self, detect_rename_false_positives=None, disable_renames=None): + def __init__(self, conflict_authorship_commits=None, detect_rename_false_positives=None, disable_renames=None): super(GitPullRequestMergeOptions, self).__init__() + self.conflict_authorship_commits = conflict_authorship_commits self.detect_rename_false_positives = detect_rename_false_positives self.disable_renames = disable_renames @@ -2814,6 +2822,8 @@ class IdentityRefWithVote(IdentityRef): :type profile_url: str :param unique_name: Deprecated - use Domain+PrincipalName instead :type unique_name: str + :param has_declined: Indicates if this reviewer has declined to review this pull request. + :type has_declined: bool :param is_flagged: Indicates if this reviewer is flagged for attention on this pull request. :type is_flagged: bool :param is_required: Indicates if this is a required reviewer for this pull request.
Branches can have policies that require particular reviewers are required for pull requests. @@ -2840,6 +2850,7 @@ class IdentityRefWithVote(IdentityRef): 'is_deleted_in_origin': {'key': 'isDeletedInOrigin', 'type': 'bool'}, 'profile_url': {'key': 'profileUrl', 'type': 'str'}, 'unique_name': {'key': 'uniqueName', 'type': 'str'}, + 'has_declined': {'key': 'hasDeclined', 'type': 'bool'}, 'is_flagged': {'key': 'isFlagged', 'type': 'bool'}, 'is_required': {'key': 'isRequired', 'type': 'bool'}, 'reviewer_url': {'key': 'reviewerUrl', 'type': 'str'}, @@ -2847,8 +2858,9 @@ class IdentityRefWithVote(IdentityRef): 'voted_for': {'key': 'votedFor', 'type': '[IdentityRefWithVote]'} } - def __init__(self, _links=None, descriptor=None, display_name=None, url=None, directory_alias=None, id=None, image_url=None, inactive=None, is_aad_identity=None, is_container=None, is_deleted_in_origin=None, profile_url=None, unique_name=None, is_flagged=None, is_required=None, reviewer_url=None, vote=None, voted_for=None): + def __init__(self, _links=None, descriptor=None, display_name=None, url=None, directory_alias=None, id=None, image_url=None, inactive=None, is_aad_identity=None, is_container=None, is_deleted_in_origin=None, profile_url=None, unique_name=None, has_declined=None, is_flagged=None, is_required=None, reviewer_url=None, vote=None, voted_for=None): super(IdentityRefWithVote, self).__init__(_links=_links, descriptor=descriptor, display_name=display_name, url=url, directory_alias=directory_alias, id=id, image_url=image_url, inactive=inactive, is_aad_identity=is_aad_identity, is_container=is_container, is_deleted_in_origin=is_deleted_in_origin, profile_url=profile_url, unique_name=unique_name) + self.has_declined = has_declined self.is_flagged = is_flagged self.is_required = is_required self.reviewer_url = reviewer_url diff --git a/azure-devops/azure/devops/v6_0/identity/identity_client.py b/azure-devops/azure/devops/v6_0/identity/identity_client.py index 817eec7f..1bd67808 100644 --- a/azure-devops/azure/devops/v6_0/identity/identity_client.py +++ b/azure-devops/azure/devops/v6_0/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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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,20 +141,20 @@ 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='6.0-preview.1', + version='6.0', 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: + Resolve legacy identity information for use with older APIs such as the Security APIs + :param str descriptors: A comma separated list of identity descriptors to resolve + :param str identity_ids: A comma seperated list of storage keys to resolve + :param str subject_descriptors: A comma seperated list of subject descriptors to resolve :param str social_descriptors: - :param str search_filter: - :param str filter_value: - :param str query_membership: + :param str search_filter: The type of search to perform. Values can be AccountName (domain\alias), DisplayName, MailAddress, General (display name, account name, or unique name), or LocalGroupName (only search Azure Devops groups). + :param str filter_value: The search value, as specified by the searchFilter. + :param str query_membership: The membership information to include with the identities. Values can be None for no membership data or Direct to include the groups that the identity is a member of and the identities that are a member of this identity (groups only) :param str properties: :param bool include_restricted_visibility: :param str options: @@ -188,13 +183,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='6.0-preview.1', + version='6.0', 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 +203,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='6.0-preview.1', + version='6.0', 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,14 +224,13 @@ 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='6.0-preview.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('Identity', response) def update_identities(self, identities, allow_meta_data_update=None): """UpdateIdentities. - [Preview API] :param :class:` ` identities: :param bool allow_meta_data_update: :rtype: [IdentityUpdateData] @@ -249,14 +241,13 @@ def update_identities(self, identities, allow_meta_data_update=None): content = self._serialize.body(identities, 'VssJsonCollectionWrapper') response = self._send(http_method='PUT', location_id='28010c54-d0c0-4c89-a5b0-1c9e188b9fb7', - version='6.0-preview.1', + version='6.0', query_parameters=query_parameters, 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: """ @@ -266,20 +257,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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', content=content) return self._deserialize('Identity', response) @@ -313,22 +303,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='6.0-preview.1') + version='6.0') 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='6.0-preview.1') + version='6.0') return self._deserialize('IdentitySelf', response) def add_member(self, container_id, member_id): diff --git a/azure-devops/azure/devops/v6_0/identity/models.py b/azure-devops/azure/devops/v6_0/identity/models.py index 0adb9160..7e2fa28b 100644 --- a/azure-devops/azure/devops/v6_0/identity/models.py +++ b/azure-devops/azure/devops/v6_0/identity/models.py @@ -226,15 +226,15 @@ class IdentityBase(Model): :type custom_display_name: str :param descriptor: :type descriptor: :class:`str ` - :param id: + :param id: Identity Identifier. Also called Storage Key, or VSID :type id: str - :param is_active: + :param is_active: True if the identity has a membership in any Azure Devops group in the organization. :type is_active: bool - :param is_container: + :param is_container: True if the identity is a group. :type is_container: bool :param master_id: :type master_id: str - :param member_ids: + :param member_ids: Id of the members of the identity (groups only). :type member_ids: list of str :param member_of: :type member_of: list of :class:`str ` @@ -250,7 +250,7 @@ class IdentityBase(Model): :type resource_version: int :param social_descriptor: :type social_descriptor: :class:`str ` - :param subject_descriptor: + :param subject_descriptor: Subject descriptor of a Graph entity. :type subject_descriptor: :class:`str ` :param unique_user_id: :type unique_user_id: int @@ -624,15 +624,15 @@ class Identity(IdentityBase): :type custom_display_name: str :param descriptor: :type descriptor: :class:`str ` - :param id: + :param id: Identity Identifier. Also called Storage Key, or VSID :type id: str - :param is_active: + :param is_active: True if the identity has a membership in any Azure Devops group in the organization. :type is_active: bool - :param is_container: + :param is_container: True if the identity is a group. :type is_container: bool :param master_id: :type master_id: str - :param member_ids: + :param member_ids: Id of the members of the identity (groups only). :type member_ids: list of str :param member_of: :type member_of: list of :class:`str ` @@ -648,7 +648,7 @@ class Identity(IdentityBase): :type resource_version: int :param social_descriptor: :type social_descriptor: :class:`str ` - :param subject_descriptor: + :param subject_descriptor: Subject descriptor of a Graph entity. :type subject_descriptor: :class:`str ` :param unique_user_id: :type unique_user_id: int diff --git a/azure-devops/azure/devops/v6_0/location/models.py b/azure-devops/azure/devops/v6_0/location/models.py index 1d904418..1109ecca 100644 --- a/azure-devops/azure/devops/v6_0/location/models.py +++ b/azure-devops/azure/devops/v6_0/location/models.py @@ -93,15 +93,15 @@ class IdentityBase(Model): :type custom_display_name: str :param descriptor: :type descriptor: :class:`str ` - :param id: + :param id: Identity Identifier. Also called Storage Key, or VSID :type id: str - :param is_active: + :param is_active: True if the identity has a membership in any Azure Devops group in the organization. :type is_active: bool - :param is_container: + :param is_container: True if the identity is a group. :type is_container: bool :param master_id: :type master_id: str - :param member_ids: + :param member_ids: Id of the members of the identity (groups only). :type member_ids: list of str :param member_of: :type member_of: list of :class:`str ` @@ -117,7 +117,7 @@ class IdentityBase(Model): :type resource_version: int :param social_descriptor: :type social_descriptor: :class:`str ` - :param subject_descriptor: + :param subject_descriptor: Subject descriptor of a Graph entity. :type subject_descriptor: :class:`str ` :param unique_user_id: :type unique_user_id: int @@ -338,15 +338,15 @@ class Identity(IdentityBase): :type custom_display_name: str :param descriptor: :type descriptor: :class:`str ` - :param id: + :param id: Identity Identifier. Also called Storage Key, or VSID :type id: str - :param is_active: + :param is_active: True if the identity has a membership in any Azure Devops group in the organization. :type is_active: bool - :param is_container: + :param is_container: True if the identity is a group. :type is_container: bool :param master_id: :type master_id: str - :param member_ids: + :param member_ids: Id of the members of the identity (groups only). :type member_ids: list of str :param member_of: :type member_of: list of :class:`str ` @@ -362,7 +362,7 @@ class Identity(IdentityBase): :type resource_version: int :param social_descriptor: :type social_descriptor: :class:`str ` - :param subject_descriptor: + :param subject_descriptor: Subject descriptor of a Graph entity. :type subject_descriptor: :class:`str ` :param unique_user_id: :type unique_user_id: int diff --git a/azure-devops/azure/devops/v6_0/member_entitlement_management/models.py b/azure-devops/azure/devops/v6_0/member_entitlement_management/models.py index 51dd788f..036b0dc6 100644 --- a/azure-devops/azure/devops/v6_0/member_entitlement_management/models.py +++ b/azure-devops/azure/devops/v6_0/member_entitlement_management/models.py @@ -619,6 +619,8 @@ class UsersSummary(Model): :param available_access_levels: Available Access Levels :type available_access_levels: list of :class:`AccessLevel ` + :param default_access_level: Default Access Level + :type default_access_level: :class:`AccessLevel ` :param extensions: Summary of Extensions in the organization :type extensions: list of :class:`ExtensionSummaryData ` :param group_options: Group Options @@ -631,15 +633,17 @@ class UsersSummary(Model): _attribute_map = { 'available_access_levels': {'key': 'availableAccessLevels', 'type': '[AccessLevel]'}, + 'default_access_level': {'key': 'defaultAccessLevel', 'type': 'AccessLevel'}, 'extensions': {'key': 'extensions', 'type': '[ExtensionSummaryData]'}, 'group_options': {'key': 'groupOptions', 'type': '[GroupOption]'}, 'licenses': {'key': 'licenses', 'type': '[LicenseSummaryData]'}, 'project_refs': {'key': 'projectRefs', 'type': '[ProjectRef]'} } - def __init__(self, available_access_levels=None, extensions=None, group_options=None, licenses=None, project_refs=None): + def __init__(self, available_access_levels=None, default_access_level=None, extensions=None, group_options=None, licenses=None, project_refs=None): super(UsersSummary, self).__init__() self.available_access_levels = available_access_levels + self.default_access_level = default_access_level self.extensions = extensions self.group_options = group_options self.licenses = licenses diff --git a/azure-devops/azure/devops/v6_0/notification/notification_client.py b/azure-devops/azure/devops/v6_0/notification/notification_client.py index 928201d6..9a4f8b86 100644 --- a/azure-devops/azure/devops/v6_0/notification/notification_client.py +++ b/azure-devops/azure/devops/v6_0/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] Get a list of diagnostic logs for this service. + Get a list of diagnostic logs for this service. :param str source: ID specifying which type of logs to check diagnostics for. :param str entry_id: The ID of the specific log to query for. :param datetime start_time: Start time for the time range to query in. @@ -46,14 +46,14 @@ 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='6.0-preview.1', + version='6.0', 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] Get the diagnostics settings for a subscription. + Get the diagnostics settings for a subscription. :param str subscription_id: The id of the notifications subscription. :rtype: :class:` ` """ @@ -62,13 +62,13 @@ 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='6.0-preview.1', + version='6.0', route_values=route_values) return self._deserialize('SubscriptionDiagnostics', response) def update_subscription_diagnostics(self, update_parameters, subscription_id): """UpdateSubscriptionDiagnostics. - [Preview API] Update the diagnostics settings for a subscription. + Update the diagnostics settings for a subscription. :param :class:` ` update_parameters: :param str subscription_id: The id of the notifications subscription. :rtype: :class:` ` @@ -79,14 +79,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='6.0-preview.1', + version='6.0', 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: The ID of the event type. :rtype: :class:` ` """ @@ -95,13 +95,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='6.0-preview.1', + version='6.0', 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 +110,34 @@ 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1') + version='6.0') 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='6.0-preview.1', + version='6.0', content=content) return self._deserialize('NotificationAdminSettings', response) def get_subscriber(self, subscriber_id): """GetSubscriber. - [Preview API] Get delivery preferences of a notifications subscriber. + Get delivery preferences of a notifications subscriber. :param str subscriber_id: ID of the user or group. :rtype: :class:` ` """ @@ -148,13 +146,13 @@ 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='6.0-preview.1', + version='6.0', route_values=route_values) return self._deserialize('NotificationSubscriber', response) def update_subscriber(self, update_parameters, subscriber_id): """UpdateSubscriber. - [Preview API] Update delivery preferences of a notifications subscriber. + Update delivery preferences of a notifications subscriber. :param :class:` ` update_parameters: :param str subscriber_id: ID of the user or group. :rtype: :class:` ` @@ -165,40 +163,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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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 +204,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='6.0-preview.1', + version='6.0', 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 +222,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='6.0-preview.1', + version='6.0', 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 +245,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='6.0-preview.1', + version='6.0', 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 +262,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='6.0-preview.1', + version='6.0', 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='6.0-preview.1') + version='6.0') 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 +293,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='6.0-preview.1', + version='6.0', route_values=route_values, content=content) return self._deserialize('SubscriptionUserSettings', response) diff --git a/azure-devops/azure/devops/v6_0/operations/operations_client.py b/azure-devops/azure/devops/v6_0/operations/operations_client.py index 416e1887..c768cba0 100644 --- a/azure-devops/azure/devops/v6_0/operations/operations_client.py +++ b/azure-devops/azure/devops/v6_0/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='6.0-preview.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('Operation', response) diff --git a/azure-devops/azure/devops/v6_0/pipeline_permissions/__init__.py b/azure-devops/azure/devops/v6_0/pipeline_permissions/__init__.py new file mode 100644 index 00000000..7d3014fa --- /dev/null +++ b/azure-devops/azure/devops/v6_0/pipeline_permissions/__init__.py @@ -0,0 +1,21 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +# Generated file, DO NOT EDIT +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------------------------- + +from .models import * +from .pipeline_permissions_client import PipelinePermissionsClient + +__all__ = [ + 'GraphSubjectBase', + 'IdentityRef', + 'Permission', + 'PipelinePermission', + 'ReferenceLinks', + 'Resource', + 'ResourcePipelinePermissions', + 'PipelinePermissionsClient' +] diff --git a/azure-devops/azure/devops/v6_0/pipeline_permissions/models.py b/azure-devops/azure/devops/v6_0/pipeline_permissions/models.py new file mode 100644 index 00000000..4f8b3af8 --- /dev/null +++ b/azure-devops/azure/devops/v6_0/pipeline_permissions/models.py @@ -0,0 +1,216 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +# Generated file, DO NOT EDIT +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class GraphSubjectBase(Model): + """ + :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. + :type _links: :class:`ReferenceLinks ` + :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. + :type descriptor: str + :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. + :type display_name: str + :param url: This url is the full route to the source resource of this graph subject. + :type url: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'descriptor': {'key': 'descriptor', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, _links=None, descriptor=None, display_name=None, url=None): + super(GraphSubjectBase, self).__init__() + self._links = _links + self.descriptor = descriptor + self.display_name = display_name + self.url = url + + +class IdentityRef(GraphSubjectBase): + """ + :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. + :type _links: :class:`ReferenceLinks ` + :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. + :type descriptor: str + :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. + :type display_name: str + :param url: This url is the full route to the source resource of this graph subject. + :type url: str + :param directory_alias: Deprecated - Can be retrieved by querying the Graph user referenced in the "self" entry of the IdentityRef "_links" dictionary + :type directory_alias: str + :param id: + :type id: str + :param image_url: Deprecated - Available in the "avatar" entry of the IdentityRef "_links" dictionary + :type image_url: str + :param inactive: Deprecated - Can be retrieved by querying the Graph membership state referenced in the "membershipState" entry of the GraphUser "_links" dictionary + :type inactive: bool + :param is_aad_identity: Deprecated - Can be inferred from the subject type of the descriptor (Descriptor.IsAadUserType/Descriptor.IsAadGroupType) + :type is_aad_identity: bool + :param is_container: Deprecated - Can be inferred from the subject type of the descriptor (Descriptor.IsGroupType) + :type is_container: bool + :param is_deleted_in_origin: + :type is_deleted_in_origin: bool + :param profile_url: Deprecated - not in use in most preexisting implementations of ToIdentityRef + :type profile_url: str + :param unique_name: Deprecated - use Domain+PrincipalName instead + :type unique_name: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'descriptor': {'key': 'descriptor', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'directory_alias': {'key': 'directoryAlias', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'image_url': {'key': 'imageUrl', 'type': 'str'}, + 'inactive': {'key': 'inactive', 'type': 'bool'}, + 'is_aad_identity': {'key': 'isAadIdentity', 'type': 'bool'}, + 'is_container': {'key': 'isContainer', 'type': 'bool'}, + 'is_deleted_in_origin': {'key': 'isDeletedInOrigin', 'type': 'bool'}, + 'profile_url': {'key': 'profileUrl', 'type': 'str'}, + 'unique_name': {'key': 'uniqueName', 'type': 'str'} + } + + def __init__(self, _links=None, descriptor=None, display_name=None, url=None, directory_alias=None, id=None, image_url=None, inactive=None, is_aad_identity=None, is_container=None, is_deleted_in_origin=None, profile_url=None, unique_name=None): + super(IdentityRef, self).__init__(_links=_links, descriptor=descriptor, display_name=display_name, url=url) + self.directory_alias = directory_alias + self.id = id + self.image_url = image_url + self.inactive = inactive + self.is_aad_identity = is_aad_identity + self.is_container = is_container + self.is_deleted_in_origin = is_deleted_in_origin + self.profile_url = profile_url + self.unique_name = unique_name + + +class Permission(Model): + """ + :param authorized: + :type authorized: bool + :param authorized_by: + :type authorized_by: :class:`IdentityRef ` + :param authorized_on: + :type authorized_on: datetime + """ + + _attribute_map = { + 'authorized': {'key': 'authorized', 'type': 'bool'}, + 'authorized_by': {'key': 'authorizedBy', 'type': 'IdentityRef'}, + 'authorized_on': {'key': 'authorizedOn', 'type': 'iso-8601'} + } + + def __init__(self, authorized=None, authorized_by=None, authorized_on=None): + super(Permission, self).__init__() + self.authorized = authorized + self.authorized_by = authorized_by + self.authorized_on = authorized_on + + +class PipelinePermission(Permission): + """ + :param authorized: + :type authorized: bool + :param authorized_by: + :type authorized_by: :class:`IdentityRef ` + :param authorized_on: + :type authorized_on: datetime + :param id: + :type id: int + """ + + _attribute_map = { + 'authorized': {'key': 'authorized', 'type': 'bool'}, + 'authorized_by': {'key': 'authorizedBy', 'type': 'IdentityRef'}, + 'authorized_on': {'key': 'authorizedOn', 'type': 'iso-8601'}, + 'id': {'key': 'id', 'type': 'int'} + } + + def __init__(self, authorized=None, authorized_by=None, authorized_on=None, id=None): + super(PipelinePermission, self).__init__(authorized=authorized, authorized_by=authorized_by, authorized_on=authorized_on) + self.id = id + + +class ReferenceLinks(Model): + """ + The class to represent a collection of REST reference links. + + :param links: The readonly view of the links. Because Reference links are readonly, we only want to expose them as read only. + :type links: dict + """ + + _attribute_map = { + 'links': {'key': 'links', 'type': '{object}'} + } + + def __init__(self, links=None): + super(ReferenceLinks, self).__init__() + self.links = links + + +class Resource(Model): + """ + :param id: Id of the resource. + :type id: str + :param name: Name of the resource. + :type name: str + :param type: Type of the resource. + :type type: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'} + } + + def __init__(self, id=None, name=None, type=None): + super(Resource, self).__init__() + self.id = id + self.name = name + self.type = type + + +class ResourcePipelinePermissions(Model): + """ + :param all_pipelines: + :type all_pipelines: :class:`Permission ` + :param pipelines: + :type pipelines: list of :class:`PipelinePermission ` + :param resource: + :type resource: :class:`Resource ` + """ + + _attribute_map = { + 'all_pipelines': {'key': 'allPipelines', 'type': 'Permission'}, + 'pipelines': {'key': 'pipelines', 'type': '[PipelinePermission]'}, + 'resource': {'key': 'resource', 'type': 'Resource'} + } + + def __init__(self, all_pipelines=None, pipelines=None, resource=None): + super(ResourcePipelinePermissions, self).__init__() + self.all_pipelines = all_pipelines + self.pipelines = pipelines + self.resource = resource + + +__all__ = [ + 'GraphSubjectBase', + 'IdentityRef', + 'Permission', + 'PipelinePermission', + 'ReferenceLinks', + 'Resource', + 'ResourcePipelinePermissions', +] diff --git a/azure-devops/azure/devops/v6_0/pipeline_permissions/pipeline_permissions_client.py b/azure-devops/azure/devops/v6_0/pipeline_permissions/pipeline_permissions_client.py new file mode 100644 index 00000000..6d32d8d9 --- /dev/null +++ b/azure-devops/azure/devops/v6_0/pipeline_permissions/pipeline_permissions_client.py @@ -0,0 +1,90 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +# Generated file, DO NOT EDIT +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------------------------- + +from msrest import Serializer, Deserializer +from ...client import Client +from . import models + + +class PipelinePermissionsClient(Client): + """PipelinePermissions + :param str base_url: Service URL + :param Authentication creds: Authenticated credentials. + """ + + def __init__(self, base_url=None, creds=None): + super(PipelinePermissionsClient, self).__init__(base_url, creds) + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + resource_area_identifier = 'a81a0441-de52-4000-aa15-ff0e07bfbbaa' + + def get_pipeline_permissions_for_resource(self, project, resource_type, resource_id): + """GetPipelinePermissionsForResource. + [Preview API] Given a ResourceType and ResourceId, returns authorized definitions for that resource. + :param str project: Project ID or project name + :param str resource_type: + :param str resource_id: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if resource_type is not None: + route_values['resourceType'] = self._serialize.url('resource_type', resource_type, 'str') + if resource_id is not None: + route_values['resourceId'] = self._serialize.url('resource_id', resource_id, 'str') + response = self._send(http_method='GET', + location_id='b5b9a4a4-e6cd-4096-853c-ab7d8b0c4eb2', + version='6.0-preview.1', + route_values=route_values) + return self._deserialize('ResourcePipelinePermissions', response) + + def update_pipeline_permisions_for_resource(self, resource_authorization, project, resource_type, resource_id): + """UpdatePipelinePermisionsForResource. + [Preview API] Authorizes/Unauthorizes a list of definitions for a given resource. + :param :class:` ` resource_authorization: + :param str project: Project ID or project name + :param str resource_type: + :param str resource_id: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if resource_type is not None: + route_values['resourceType'] = self._serialize.url('resource_type', resource_type, 'str') + if resource_id is not None: + route_values['resourceId'] = self._serialize.url('resource_id', resource_id, 'str') + content = self._serialize.body(resource_authorization, 'ResourcePipelinePermissions') + response = self._send(http_method='PATCH', + location_id='b5b9a4a4-e6cd-4096-853c-ab7d8b0c4eb2', + version='6.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('ResourcePipelinePermissions', response) + + def update_pipeline_permisions_for_resources(self, resource_authorizations, project): + """UpdatePipelinePermisionsForResources. + [Preview API] Batch API to authorize/unauthorize a list of definitions for a multiple resources. + :param [ResourcePipelinePermissions] resource_authorizations: + :param str project: Project ID or project name + :rtype: [ResourcePipelinePermissions] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(resource_authorizations, '[ResourcePipelinePermissions]') + response = self._send(http_method='PATCH', + location_id='b5b9a4a4-e6cd-4096-853c-ab7d8b0c4eb2', + version='6.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('[ResourcePipelinePermissions]', self._unwrap_collection(response)) + diff --git a/azure-devops/azure/devops/v6_0/pipelines/__init__.py b/azure-devops/azure/devops/v6_0/pipelines/__init__.py index 2edb05f7..460732bb 100644 --- a/azure-devops/azure/devops/v6_0/pipelines/__init__.py +++ b/azure-devops/azure/devops/v6_0/pipelines/__init__.py @@ -11,14 +11,18 @@ __all__ = [ 'Artifact', + 'BuildResourceParameters', + 'ContainerResourceParameters', 'CreatePipelineConfigurationParameters', 'CreatePipelineParameters', 'Log', 'LogCollection', + 'PackageResourceParameters', 'Pipeline', 'PipelineBase', 'PipelineConfiguration', 'PipelineReference', + 'PipelineResourceParameters', 'ReferenceLinks', 'Repository', 'RepositoryResource', diff --git a/azure-devops/azure/devops/v6_0/pipelines/models.py b/azure-devops/azure/devops/v6_0/pipelines/models.py index 03150144..5075904d 100644 --- a/azure-devops/azure/devops/v6_0/pipelines/models.py +++ b/azure-devops/azure/devops/v6_0/pipelines/models.py @@ -11,6 +11,8 @@ class Artifact(Model): """ + Artifacts are collections of files produced by a pipeline. Use artifacts to share files between stages in a pipeline or between different pipelines. + :param name: The name of the artifact. :type name: str :param signed_content: Signed url for downloading this artifact @@ -32,9 +34,41 @@ def __init__(self, name=None, signed_content=None, url=None): self.url = url +class BuildResourceParameters(Model): + """ + :param version: + :type version: str + """ + + _attribute_map = { + 'version': {'key': 'version', 'type': 'str'} + } + + def __init__(self, version=None): + super(BuildResourceParameters, self).__init__() + self.version = version + + +class ContainerResourceParameters(Model): + """ + :param version: + :type version: str + """ + + _attribute_map = { + 'version': {'key': 'version', 'type': 'str'} + } + + def __init__(self, version=None): + super(ContainerResourceParameters, self).__init__() + self.version = version + + class CreatePipelineConfigurationParameters(Model): """ - :param type: + Configuration parameters of the pipeline. + + :param type: Type of configuration. :type type: object """ @@ -49,11 +83,13 @@ def __init__(self, type=None): class CreatePipelineParameters(Model): """ - :param configuration: + Parameters to create a pipeline. + + :param configuration: Configuration parameters of the pipeline. :type configuration: :class:`CreatePipelineConfigurationParameters ` - :param folder: + :param folder: Folder of the pipeline. :type folder: str - :param name: + :param name: Name of the pipeline. :type name: str """ @@ -72,6 +108,8 @@ def __init__(self, configuration=None, folder=None, name=None): class Log(Model): """ + Log for a pipeline. + :param created_on: The date and time the log was created. :type created_on: datetime :param id: The ID of the log. @@ -107,11 +145,13 @@ def __init__(self, created_on=None, id=None, last_changed_on=None, line_count=No class LogCollection(Model): """ - :param logs: + A collection of logs. + + :param logs: The list of logs. :type logs: list of :class:`Log ` :param signed_content: :type signed_content: :class:`SignedUrl ` - :param url: + :param url: URL of the log. :type url: str """ @@ -128,15 +168,30 @@ def __init__(self, logs=None, signed_content=None, url=None): self.url = url +class PackageResourceParameters(Model): + """ + :param version: + :type version: str + """ + + _attribute_map = { + 'version': {'key': 'version', 'type': 'str'} + } + + def __init__(self, version=None): + super(PackageResourceParameters, self).__init__() + self.version = version + + class PipelineBase(Model): """ - :param folder: + :param folder: Pipeline folder :type folder: str - :param id: + :param id: Pipeline ID :type id: int - :param name: + :param name: Pipeline name :type name: str - :param revision: + :param revision: Revision number :type revision: int """ @@ -174,13 +229,13 @@ class PipelineReference(PipelineBase): """ A reference to a Pipeline. - :param folder: + :param folder: Pipeline folder :type folder: str - :param id: + :param id: Pipeline ID :type id: int - :param name: + :param name: Pipeline name :type name: str - :param revision: + :param revision: Revision number :type revision: int :param url: :type url: str @@ -199,6 +254,21 @@ def __init__(self, folder=None, id=None, name=None, revision=None, url=None): self.url = url +class PipelineResourceParameters(Model): + """ + :param version: + :type version: str + """ + + _attribute_map = { + 'version': {'key': 'version', 'type': 'str'} + } + + def __init__(self, version=None): + super(PipelineResourceParameters, self).__init__() + self.version = version + + class ReferenceLinks(Model): """ The class to represent a collection of REST reference links. @@ -283,21 +353,39 @@ def __init__(self, ref_name=None, token=None, token_type=None, version=None): class RunPipelineParameters(Model): """ - :param resources: + Settings which influence pipeline runs. + + :param preview_run: If true, don't actually create a new run. Instead, return the final YAML document after parsing templates. + :type preview_run: bool + :param resources: The resources the run requires. :type resources: :class:`RunResourcesParameters ` + :param stages_to_skip: + :type stages_to_skip: list of str + :param template_parameters: + :type template_parameters: dict :param variables: :type variables: dict + :param yaml_override: If you use the preview run option, you may optionally supply different YAML. This allows you to preview the final YAML document without committing a changed file. + :type yaml_override: str """ _attribute_map = { + 'preview_run': {'key': 'previewRun', 'type': 'bool'}, 'resources': {'key': 'resources', 'type': 'RunResourcesParameters'}, - 'variables': {'key': 'variables', 'type': '{Variable}'} + 'stages_to_skip': {'key': 'stagesToSkip', 'type': '[str]'}, + 'template_parameters': {'key': 'templateParameters', 'type': '{str}'}, + 'variables': {'key': 'variables', 'type': '{Variable}'}, + 'yaml_override': {'key': 'yamlOverride', 'type': 'str'} } - def __init__(self, resources=None, variables=None): + def __init__(self, preview_run=None, resources=None, stages_to_skip=None, template_parameters=None, variables=None, yaml_override=None): super(RunPipelineParameters, self).__init__() + self.preview_run = preview_run self.resources = resources + self.stages_to_skip = stages_to_skip + self.template_parameters = template_parameters self.variables = variables + self.yaml_override = yaml_override class RunReference(Model): @@ -336,16 +424,32 @@ def __init__(self, repositories=None): class RunResourcesParameters(Model): """ + :param builds: + :type builds: dict + :param containers: + :type containers: dict + :param packages: + :type packages: dict + :param pipelines: + :type pipelines: dict :param repositories: :type repositories: dict """ _attribute_map = { + 'builds': {'key': 'builds', 'type': '{BuildResourceParameters}'}, + 'containers': {'key': 'containers', 'type': '{ContainerResourceParameters}'}, + 'packages': {'key': 'packages', 'type': '{PackageResourceParameters}'}, + 'pipelines': {'key': 'pipelines', 'type': '{PipelineResourceParameters}'}, 'repositories': {'key': 'repositories', 'type': '{RepositoryResourceParameters}'} } - def __init__(self, repositories=None): + def __init__(self, builds=None, containers=None, packages=None, pipelines=None, repositories=None): super(RunResourcesParameters, self).__init__() + self.builds = builds + self.containers = containers + self.packages = packages + self.pipelines = pipelines self.repositories = repositories @@ -368,9 +472,9 @@ class SignedUrl(Model): """ A signed url allowing limited-time anonymous access to private resources. - :param signature_expires: + :param signature_expires: Timestamp when access expires. :type signature_expires: datetime - :param url: + :param url: The URL to allow access to. :type url: str """ @@ -406,19 +510,21 @@ def __init__(self, is_secret=None, value=None): class Pipeline(PipelineBase): """ - :param folder: + Definition of a pipeline. + + :param folder: Pipeline folder :type folder: str - :param id: + :param id: Pipeline ID :type id: int - :param name: + :param name: Pipeline name :type name: str - :param revision: + :param revision: Revision number :type revision: int :param _links: :type _links: :class:`ReferenceLinks ` :param configuration: :type configuration: :class:`PipelineConfiguration ` - :param url: + :param url: URL of the pipeline :type url: str """ @@ -449,6 +555,8 @@ class Run(RunReference): :type _links: :class:`ReferenceLinks ` :param created_date: :type created_date: datetime + :param final_yaml: + :type final_yaml: str :param finished_date: :type finished_date: datetime :param pipeline: @@ -470,6 +578,7 @@ class Run(RunReference): 'name': {'key': 'name', 'type': 'str'}, '_links': {'key': '_links', 'type': 'ReferenceLinks'}, 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'final_yaml': {'key': 'finalYaml', 'type': 'str'}, 'finished_date': {'key': 'finishedDate', 'type': 'iso-8601'}, 'pipeline': {'key': 'pipeline', 'type': 'PipelineReference'}, 'resources': {'key': 'resources', 'type': 'RunResources'}, @@ -479,10 +588,11 @@ class Run(RunReference): 'variables': {'key': 'variables', 'type': '{Variable}'} } - def __init__(self, id=None, name=None, _links=None, created_date=None, finished_date=None, pipeline=None, resources=None, result=None, state=None, url=None, variables=None): + def __init__(self, id=None, name=None, _links=None, created_date=None, final_yaml=None, finished_date=None, pipeline=None, resources=None, result=None, state=None, url=None, variables=None): super(Run, self).__init__(id=id, name=name) self._links = _links self.created_date = created_date + self.final_yaml = final_yaml self.finished_date = finished_date self.pipeline = pipeline self.resources = resources @@ -494,13 +604,17 @@ def __init__(self, id=None, name=None, _links=None, created_date=None, finished_ __all__ = [ 'Artifact', + 'BuildResourceParameters', + 'ContainerResourceParameters', 'CreatePipelineConfigurationParameters', 'CreatePipelineParameters', 'Log', 'LogCollection', + 'PackageResourceParameters', 'PipelineBase', 'PipelineConfiguration', 'PipelineReference', + 'PipelineResourceParameters', 'ReferenceLinks', 'Repository', 'RepositoryResource', diff --git a/azure-devops/azure/devops/v6_0/pipelines/pipelines_client.py b/azure-devops/azure/devops/v6_0/pipelines/pipelines_client.py index 902407d1..9da27909 100644 --- a/azure-devops/azure/devops/v6_0/pipelines/pipelines_client.py +++ b/azure-devops/azure/devops/v6_0/pipelines/pipelines_client.py @@ -27,12 +27,12 @@ def __init__(self, base_url=None, creds=None): def get_artifact(self, project, pipeline_id, run_id, artifact_name, expand=None): """GetArtifact. - [Preview API] + [Preview API] Get a specific artifact from a pipeline run :param str project: Project ID or project name - :param int pipeline_id: - :param int run_id: - :param str artifact_name: - :param str expand: + :param int pipeline_id: ID of the pipeline. + :param int run_id: ID of the run of that pipeline. + :param str artifact_name: Name of the artifact. + :param str expand: Expand options. Default is None. :rtype: :class:` ` """ route_values = {} @@ -56,12 +56,12 @@ def get_artifact(self, project, pipeline_id, run_id, artifact_name, expand=None) def get_log(self, project, pipeline_id, run_id, log_id, expand=None): """GetLog. - [Preview API] + [Preview API] Get a specific log from a pipeline run :param str project: Project ID or project name - :param int pipeline_id: - :param int run_id: - :param int log_id: - :param str expand: + :param int pipeline_id: ID of the pipeline. + :param int run_id: ID of the run of that pipeline. + :param int log_id: ID of the log. + :param str expand: Expand options. Default is None. :rtype: :class:` ` """ route_values = {} @@ -85,11 +85,11 @@ def get_log(self, project, pipeline_id, run_id, log_id, expand=None): def list_logs(self, project, pipeline_id, run_id, expand=None): """ListLogs. - [Preview API] + [Preview API] Get a list of logs from a pipeline run. :param str project: Project ID or project name - :param int pipeline_id: - :param int run_id: - :param str expand: + :param int pipeline_id: ID of the pipeline. + :param int run_id: ID of the run of that pipeline. + :param str expand: Expand options. Default is None. :rtype: :class:` ` """ route_values = {} @@ -111,8 +111,8 @@ def list_logs(self, project, pipeline_id, run_id, expand=None): def create_pipeline(self, input_parameters, project): """CreatePipeline. - [Preview API] - :param :class:` ` input_parameters: + [Preview API] Create a pipeline. + :param :class:` ` input_parameters: Input parameters. :param str project: Project ID or project name :rtype: :class:` ` """ @@ -131,7 +131,7 @@ def get_pipeline(self, project, pipeline_id, pipeline_version=None): """GetPipeline. [Preview API] Gets a pipeline, optionally at the specified version :param str project: Project ID or project name - :param int pipeline_id: The pipeline id + :param int pipeline_id: The pipeline ID :param int pipeline_version: The pipeline version :rtype: :class:` ` """ @@ -152,7 +152,7 @@ def get_pipeline(self, project, pipeline_id, pipeline_version=None): def list_pipelines(self, project, order_by=None, top=None, continuation_token=None): """ListPipelines. - [Preview API] Gets a list of pipelines. + [Preview API] Get a list of pipelines. :param str project: Project ID or project name :param str order_by: A sort expression. Defaults to "name asc" :param int top: The maximum number of pipelines to return @@ -218,10 +218,10 @@ def list_runs(self, project, pipeline_id): def run_pipeline(self, run_parameters, project, pipeline_id, pipeline_version=None): """RunPipeline. [Preview API] Runs a pipeline. - :param :class:` ` run_parameters: Optional. + :param :class:` ` run_parameters: Optional additional parameters for this run. :param str project: Project ID or project name - :param int pipeline_id: The pipeline id - :param int pipeline_version: The pipeline version + :param int pipeline_id: The pipeline ID. + :param int pipeline_version: The pipeline version. :rtype: :class:` ` """ route_values = {} @@ -241,24 +241,3 @@ def run_pipeline(self, run_parameters, project, pipeline_id, pipeline_version=No content=content) return self._deserialize('Run', response) - def get_signed_signal_rUrl(self, project, pipeline_id, run_id): - """GetSignedSignalRUrl. - [Preview API] - :param str project: Project ID or project name - :param int pipeline_id: - :param int run_id: - :rtype: :class:` ` - """ - route_values = {} - if project is not None: - route_values['project'] = self._serialize.url('project', project, 'str') - if pipeline_id is not None: - route_values['pipelineId'] = self._serialize.url('pipeline_id', pipeline_id, 'int') - 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='1ffe4916-ac72-4566-add0-9bab31e44fcf', - version='6.0-preview.1', - route_values=route_values) - return self._deserialize('SignalRConnection', response) - diff --git a/azure-devops/azure/devops/v6_0/pipelines_checks/__init__.py b/azure-devops/azure/devops/v6_0/pipelines_checks/__init__.py new file mode 100644 index 00000000..69696c88 --- /dev/null +++ b/azure-devops/azure/devops/v6_0/pipelines_checks/__init__.py @@ -0,0 +1,30 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +# Generated file, DO NOT EDIT +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------------------------- + +from .models import * +from .pipelines_checks_client import PipelinesChecksClient + +__all__ = [ + 'ApprovalConfig', + 'ApprovalConfigSettings', + 'CheckConfiguration', + 'CheckConfigurationRef', + 'CheckRun', + 'CheckRunResult', + 'CheckSuite', + 'CheckSuiteRef', + 'CheckSuiteRequest', + 'CheckType', + 'GraphSubjectBase', + 'IdentityRef', + 'ReferenceLinks', + 'Resource', + 'TaskCheckConfig', + 'TaskCheckDefinitionReference', + 'PipelinesChecksClient' +] diff --git a/azure-devops/azure/devops/v6_0/pipelines_checks/models.py b/azure-devops/azure/devops/v6_0/pipelines_checks/models.py new file mode 100644 index 00000000..7d1a1af9 --- /dev/null +++ b/azure-devops/azure/devops/v6_0/pipelines_checks/models.py @@ -0,0 +1,500 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +# Generated file, DO NOT EDIT +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApprovalConfig(Model): + """ + Config to create a new approval. + + :param approvers: Ordered list of approvers. + :type approvers: list of :class:`IdentityRef ` + :param blocked_approvers: Identities which are not allowed to approve. + :type blocked_approvers: list of :class:`IdentityRef ` + :param execution_order: Order in which approvers will be actionable. + :type execution_order: object + :param instructions: Instructions for the approver. + :type instructions: str + :param min_required_approvers: Minimum number of approvers that should approve for the entire approval to be considered approved. Defaults to all. + :type min_required_approvers: int + """ + + _attribute_map = { + 'approvers': {'key': 'approvers', 'type': '[IdentityRef]'}, + 'blocked_approvers': {'key': 'blockedApprovers', 'type': '[IdentityRef]'}, + 'execution_order': {'key': 'executionOrder', 'type': 'object'}, + 'instructions': {'key': 'instructions', 'type': 'str'}, + 'min_required_approvers': {'key': 'minRequiredApprovers', 'type': 'int'} + } + + def __init__(self, approvers=None, blocked_approvers=None, execution_order=None, instructions=None, min_required_approvers=None): + super(ApprovalConfig, self).__init__() + self.approvers = approvers + self.blocked_approvers = blocked_approvers + self.execution_order = execution_order + self.instructions = instructions + self.min_required_approvers = min_required_approvers + + +class ApprovalConfigSettings(ApprovalConfig): + """ + Config to create a new approval. + + :param approvers: Ordered list of approvers. + :type approvers: list of :class:`IdentityRef ` + :param blocked_approvers: Identities which are not allowed to approve. + :type blocked_approvers: list of :class:`IdentityRef ` + :param execution_order: Order in which approvers will be actionable. + :type execution_order: object + :param instructions: Instructions for the approver. + :type instructions: str + :param min_required_approvers: Minimum number of approvers that should approve for the entire approval to be considered approved. Defaults to all. + :type min_required_approvers: int + :param requester_cannot_be_approver: Determines whether check requester can approve the check. + :type requester_cannot_be_approver: bool + """ + + _attribute_map = { + 'approvers': {'key': 'approvers', 'type': '[IdentityRef]'}, + 'blocked_approvers': {'key': 'blockedApprovers', 'type': '[IdentityRef]'}, + 'execution_order': {'key': 'executionOrder', 'type': 'object'}, + 'instructions': {'key': 'instructions', 'type': 'str'}, + 'min_required_approvers': {'key': 'minRequiredApprovers', 'type': 'int'}, + 'requester_cannot_be_approver': {'key': 'requesterCannotBeApprover', 'type': 'bool'} + } + + def __init__(self, approvers=None, blocked_approvers=None, execution_order=None, instructions=None, min_required_approvers=None, requester_cannot_be_approver=None): + super(ApprovalConfigSettings, self).__init__(approvers=approvers, blocked_approvers=blocked_approvers, execution_order=execution_order, instructions=instructions, min_required_approvers=min_required_approvers) + self.requester_cannot_be_approver = requester_cannot_be_approver + + +class CheckConfigurationRef(Model): + """ + :param id: Check configuration id. + :type id: int + :param resource: Resource on which check get configured. + :type resource: :class:`Resource ` + :param type: Check configuration type + :type type: :class:`CheckType ` + :param url: The URL from which one can fetch the configured check. + :type url: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'resource': {'key': 'resource', 'type': 'Resource'}, + 'type': {'key': 'type', 'type': 'CheckType'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, id=None, resource=None, type=None, url=None): + super(CheckConfigurationRef, self).__init__() + self.id = id + self.resource = resource + self.type = type + self.url = url + + +class CheckRunResult(Model): + """ + :param result_message: + :type result_message: str + :param status: + :type status: object + """ + + _attribute_map = { + 'result_message': {'key': 'resultMessage', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'object'} + } + + def __init__(self, result_message=None, status=None): + super(CheckRunResult, self).__init__() + self.result_message = result_message + self.status = status + + +class CheckSuiteRef(Model): + """ + :param context: Evaluation context for the check suite request + :type context: :class:`object ` + :param id: Unique suite id generated by the pipeline orchestrator for the pipeline check runs request on the list of resources Pipeline orchestrator will used this identifier to map the check requests on a stage + :type id: str + """ + + _attribute_map = { + 'context': {'key': 'context', 'type': 'object'}, + 'id': {'key': 'id', 'type': 'str'} + } + + def __init__(self, context=None, id=None): + super(CheckSuiteRef, self).__init__() + self.context = context + self.id = id + + +class CheckSuiteRequest(Model): + """ + :param context: + :type context: :class:`object ` + :param id: + :type id: str + :param resources: + :type resources: list of :class:`Resource ` + """ + + _attribute_map = { + 'context': {'key': 'context', 'type': 'object'}, + 'id': {'key': 'id', 'type': 'str'}, + 'resources': {'key': 'resources', 'type': '[Resource]'} + } + + def __init__(self, context=None, id=None, resources=None): + super(CheckSuiteRequest, self).__init__() + self.context = context + self.id = id + self.resources = resources + + +class CheckType(Model): + """ + :param id: Gets or sets check type id. + :type id: str + :param name: Name of the check type. + :type name: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, id=None, name=None): + super(CheckType, self).__init__() + self.id = id + self.name = name + + +class GraphSubjectBase(Model): + """ + :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. + :type _links: :class:`ReferenceLinks ` + :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. + :type descriptor: str + :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. + :type display_name: str + :param url: This url is the full route to the source resource of this graph subject. + :type url: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'descriptor': {'key': 'descriptor', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, _links=None, descriptor=None, display_name=None, url=None): + super(GraphSubjectBase, self).__init__() + self._links = _links + self.descriptor = descriptor + self.display_name = display_name + self.url = url + + +class IdentityRef(GraphSubjectBase): + """ + :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. + :type _links: :class:`ReferenceLinks ` + :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. + :type descriptor: str + :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. + :type display_name: str + :param url: This url is the full route to the source resource of this graph subject. + :type url: str + :param directory_alias: Deprecated - Can be retrieved by querying the Graph user referenced in the "self" entry of the IdentityRef "_links" dictionary + :type directory_alias: str + :param id: + :type id: str + :param image_url: Deprecated - Available in the "avatar" entry of the IdentityRef "_links" dictionary + :type image_url: str + :param inactive: Deprecated - Can be retrieved by querying the Graph membership state referenced in the "membershipState" entry of the GraphUser "_links" dictionary + :type inactive: bool + :param is_aad_identity: Deprecated - Can be inferred from the subject type of the descriptor (Descriptor.IsAadUserType/Descriptor.IsAadGroupType) + :type is_aad_identity: bool + :param is_container: Deprecated - Can be inferred from the subject type of the descriptor (Descriptor.IsGroupType) + :type is_container: bool + :param is_deleted_in_origin: + :type is_deleted_in_origin: bool + :param profile_url: Deprecated - not in use in most preexisting implementations of ToIdentityRef + :type profile_url: str + :param unique_name: Deprecated - use Domain+PrincipalName instead + :type unique_name: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'descriptor': {'key': 'descriptor', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'directory_alias': {'key': 'directoryAlias', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'image_url': {'key': 'imageUrl', 'type': 'str'}, + 'inactive': {'key': 'inactive', 'type': 'bool'}, + 'is_aad_identity': {'key': 'isAadIdentity', 'type': 'bool'}, + 'is_container': {'key': 'isContainer', 'type': 'bool'}, + 'is_deleted_in_origin': {'key': 'isDeletedInOrigin', 'type': 'bool'}, + 'profile_url': {'key': 'profileUrl', 'type': 'str'}, + 'unique_name': {'key': 'uniqueName', 'type': 'str'} + } + + def __init__(self, _links=None, descriptor=None, display_name=None, url=None, directory_alias=None, id=None, image_url=None, inactive=None, is_aad_identity=None, is_container=None, is_deleted_in_origin=None, profile_url=None, unique_name=None): + super(IdentityRef, self).__init__(_links=_links, descriptor=descriptor, display_name=display_name, url=url) + self.directory_alias = directory_alias + self.id = id + self.image_url = image_url + self.inactive = inactive + self.is_aad_identity = is_aad_identity + self.is_container = is_container + self.is_deleted_in_origin = is_deleted_in_origin + self.profile_url = profile_url + self.unique_name = unique_name + + +class ReferenceLinks(Model): + """ + The class to represent a collection of REST reference links. + + :param links: The readonly view of the links. Because Reference links are readonly, we only want to expose them as read only. + :type links: dict + """ + + _attribute_map = { + 'links': {'key': 'links', 'type': '{object}'} + } + + def __init__(self, links=None): + super(ReferenceLinks, self).__init__() + self.links = links + + +class Resource(Model): + """ + :param id: Id of the resource. + :type id: str + :param name: Name of the resource. + :type name: str + :param type: Type of the resource. + :type type: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'} + } + + def __init__(self, id=None, name=None, type=None): + super(Resource, self).__init__() + self.id = id + self.name = name + self.type = type + + +class TaskCheckConfig(Model): + """ + Config to facilitate task check + + :param definition_ref: + :type definition_ref: :class:`TaskCheckDefinitionReference ` + :param display_name: + :type display_name: str + :param inputs: + :type inputs: dict + :param linked_variable_group: + :type linked_variable_group: str + :param retry_interval: + :type retry_interval: int + """ + + _attribute_map = { + 'definition_ref': {'key': 'definitionRef', 'type': 'TaskCheckDefinitionReference'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'inputs': {'key': 'inputs', 'type': '{str}'}, + 'linked_variable_group': {'key': 'linkedVariableGroup', 'type': 'str'}, + 'retry_interval': {'key': 'retryInterval', 'type': 'int'} + } + + def __init__(self, definition_ref=None, display_name=None, inputs=None, linked_variable_group=None, retry_interval=None): + super(TaskCheckConfig, self).__init__() + self.definition_ref = definition_ref + self.display_name = display_name + self.inputs = inputs + self.linked_variable_group = linked_variable_group + self.retry_interval = retry_interval + + +class TaskCheckDefinitionReference(Model): + """ + :param id: + :type id: str + :param name: + :type name: str + :param version: + :type version: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'} + } + + def __init__(self, id=None, name=None, version=None): + super(TaskCheckDefinitionReference, self).__init__() + self.id = id + self.name = name + self.version = version + + +class CheckConfiguration(CheckConfigurationRef): + """ + :param id: Check configuration id. + :type id: int + :param resource: Resource on which check get configured. + :type resource: :class:`Resource ` + :param type: Check configuration type + :type type: :class:`CheckType ` + :param url: The URL from which one can fetch the configured check. + :type url: str + :param _links: Reference links. + :type _links: :class:`ReferenceLinks ` + :param created_by: Identity of person who configured check. + :type created_by: :class:`IdentityRef ` + :param created_on: Time when check got configured. + :type created_on: datetime + :param modified_by: Identity of person who modified the configured check. + :type modified_by: :class:`IdentityRef ` + :param modified_on: Time when configured check was modified. + :type modified_on: datetime + :param timeout: Timeout in minutes for the check. + :type timeout: int + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'resource': {'key': 'resource', 'type': 'Resource'}, + 'type': {'key': 'type', 'type': 'CheckType'}, + 'url': {'key': 'url', 'type': 'str'}, + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'created_by': {'key': 'createdBy', 'type': 'IdentityRef'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'modified_by': {'key': 'modifiedBy', 'type': 'IdentityRef'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'timeout': {'key': 'timeout', 'type': 'int'} + } + + def __init__(self, id=None, resource=None, type=None, url=None, _links=None, created_by=None, created_on=None, modified_by=None, modified_on=None, timeout=None): + super(CheckConfiguration, self).__init__(id=id, resource=resource, type=type, url=url) + self._links = _links + self.created_by = created_by + self.created_on = created_on + self.modified_by = modified_by + self.modified_on = modified_on + self.timeout = timeout + + +class CheckRun(CheckRunResult): + """ + :param result_message: + :type result_message: str + :param status: + :type status: object + :param check_configuration_ref: + :type check_configuration_ref: :class:`CheckConfigurationRef ` + :param completed_date: + :type completed_date: datetime + :param created_date: + :type created_date: datetime + :param id: + :type id: str + """ + + _attribute_map = { + 'result_message': {'key': 'resultMessage', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'object'}, + 'check_configuration_ref': {'key': 'checkConfigurationRef', 'type': 'CheckConfigurationRef'}, + 'completed_date': {'key': 'completedDate', 'type': 'iso-8601'}, + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'id': {'key': 'id', 'type': 'str'} + } + + def __init__(self, result_message=None, status=None, check_configuration_ref=None, completed_date=None, created_date=None, id=None): + super(CheckRun, self).__init__(result_message=result_message, status=status) + self.check_configuration_ref = check_configuration_ref + self.completed_date = completed_date + self.created_date = created_date + self.id = id + + +class CheckSuite(CheckSuiteRef): + """ + :param context: Evaluation context for the check suite request + :type context: :class:`object ` + :param id: Unique suite id generated by the pipeline orchestrator for the pipeline check runs request on the list of resources Pipeline orchestrator will used this identifier to map the check requests on a stage + :type id: str + :param _links: Reference links. + :type _links: :class:`ReferenceLinks ` + :param check_runs: List of check runs associated with the given check suite request. + :type check_runs: list of :class:`CheckRun ` + :param completed_date: Completed date of the given check suite request + :type completed_date: datetime + :param message: Optional message for the given check suite request + :type message: str + :param status: Overall check runs status for the given suite request. This is check suite status + :type status: object + """ + + _attribute_map = { + 'context': {'key': 'context', 'type': 'object'}, + 'id': {'key': 'id', 'type': 'str'}, + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'check_runs': {'key': 'checkRuns', 'type': '[CheckRun]'}, + 'completed_date': {'key': 'completedDate', 'type': 'iso-8601'}, + 'message': {'key': 'message', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'object'} + } + + def __init__(self, context=None, id=None, _links=None, check_runs=None, completed_date=None, message=None, status=None): + super(CheckSuite, self).__init__(context=context, id=id) + self._links = _links + self.check_runs = check_runs + self.completed_date = completed_date + self.message = message + self.status = status + + +__all__ = [ + 'ApprovalConfig', + 'ApprovalConfigSettings', + 'CheckConfigurationRef', + 'CheckRunResult', + 'CheckSuiteRef', + 'CheckSuiteRequest', + 'CheckType', + 'GraphSubjectBase', + 'IdentityRef', + 'ReferenceLinks', + 'Resource', + 'TaskCheckConfig', + 'TaskCheckDefinitionReference', + 'CheckConfiguration', + 'CheckRun', + 'CheckSuite', +] diff --git a/azure-devops/azure/devops/v6_0/pipelines_checks/pipelines_checks_client.py b/azure-devops/azure/devops/v6_0/pipelines_checks/pipelines_checks_client.py new file mode 100644 index 00000000..6e945807 --- /dev/null +++ b/azure-devops/azure/devops/v6_0/pipelines_checks/pipelines_checks_client.py @@ -0,0 +1,200 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +# Generated file, DO NOT EDIT +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------------------------- + +from msrest import Serializer, Deserializer +from ...client import Client +from . import models + + +class PipelinesChecksClient(Client): + """PipelinesChecks + :param str base_url: Service URL + :param Authentication creds: Authenticated credentials. + """ + + def __init__(self, base_url=None, creds=None): + super(PipelinesChecksClient, self).__init__(base_url, creds) + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + resource_area_identifier = '4a933897-0488-45af-bd82-6fd3ad33f46a' + + def add_check_configuration(self, configuration, project): + """AddCheckConfiguration. + [Preview API] Add a check configuration + :param :class:` ` configuration: + :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(configuration, 'CheckConfiguration') + response = self._send(http_method='POST', + location_id='86c8381e-5aee-4cde-8ae4-25c0c7f5eaea', + version='6.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('CheckConfiguration', response) + + def delete_check_configuration(self, project, id): + """DeleteCheckConfiguration. + [Preview API] + :param str project: Project ID or project name + :param int id: + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'int') + self._send(http_method='DELETE', + location_id='86c8381e-5aee-4cde-8ae4-25c0c7f5eaea', + version='6.0-preview.1', + route_values=route_values) + + def get_check_configuration(self, project, id, expand=None): + """GetCheckConfiguration. + [Preview API] Get Check configuration by Id + :param str project: Project ID or project name + :param int id: + :param str expand: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'int') + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') + response = self._send(http_method='GET', + location_id='86c8381e-5aee-4cde-8ae4-25c0c7f5eaea', + version='6.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('CheckConfiguration', response) + + def get_check_configurations_on_resource(self, project, resource_type=None, resource_id=None, expand=None): + """GetCheckConfigurationsOnResource. + [Preview API] Get Check configuration by resource type and id + :param str project: Project ID or project name + :param str resource_type: resource type + :param str resource_id: resource id + :param str expand: + :rtype: [CheckConfiguration] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if resource_type is not None: + query_parameters['resourceType'] = self._serialize.query('resource_type', resource_type, 'str') + if resource_id is not None: + query_parameters['resourceId'] = self._serialize.query('resource_id', resource_id, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') + response = self._send(http_method='GET', + location_id='86c8381e-5aee-4cde-8ae4-25c0c7f5eaea', + version='6.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('[CheckConfiguration]', self._unwrap_collection(response)) + + def update_check_configuration(self, configuration, project, id): + """UpdateCheckConfiguration. + [Preview API] Update check configuration + :param :class:` ` configuration: check configuration + :param str project: Project ID or project name + :param int id: check configuration id + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'int') + content = self._serialize.body(configuration, 'CheckConfiguration') + response = self._send(http_method='PATCH', + location_id='86c8381e-5aee-4cde-8ae4-25c0c7f5eaea', + version='6.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('CheckConfiguration', response) + + def query_check_configurations_on_resources(self, resources, project, expand=None): + """QueryCheckConfigurationsOnResources. + [Preview API] Get check configurations for multiple resources by resource type and id. + :param [Resource] resources: List of resources. + :param str project: Project ID or project name + :param str expand: The properties that should be expanded in the list of check configurations. + :rtype: [CheckConfiguration] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') + content = self._serialize.body(resources, '[Resource]') + response = self._send(http_method='POST', + location_id='5f3d0e64-f943-4584-8811-77eb495e831e', + version='6.0-preview.1', + route_values=route_values, + query_parameters=query_parameters, + content=content) + return self._deserialize('[CheckConfiguration]', self._unwrap_collection(response)) + + def evaluate_check_suite(self, request, project, expand=None): + """EvaluateCheckSuite. + [Preview API] + :param :class:` ` request: + :param str project: Project ID or project name + :param str expand: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') + content = self._serialize.body(request, 'CheckSuiteRequest') + response = self._send(http_method='POST', + location_id='91282c1d-c183-444f-9554-1485bfb3879d', + version='6.0-preview.1', + route_values=route_values, + query_parameters=query_parameters, + content=content) + return self._deserialize('CheckSuite', response) + + def get_check_suite(self, project, check_suite_id, expand=None): + """GetCheckSuite. + [Preview API] + :param str project: Project ID or project name + :param str check_suite_id: + :param str expand: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if check_suite_id is not None: + route_values['checkSuiteId'] = self._serialize.url('check_suite_id', check_suite_id, 'str') + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') + response = self._send(http_method='GET', + location_id='91282c1d-c183-444f-9554-1485bfb3879d', + version='6.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('CheckSuite', response) + diff --git a/azure-devops/azure/devops/v6_0/policy/policy_client.py b/azure-devops/azure/devops/v6_0/policy/policy_client.py index 58b4de9c..f72b7e01 100644 --- a/azure-devops/azure/devops/v6_0/policy/policy_client.py +++ b/azure-devops/azure/devops/v6_0/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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', route_values=route_values) return self._deserialize('PolicyConfiguration', response) def get_policy_configurations(self, project, scope=None, top=None, continuation_token=None, policy_type=None): """GetPolicyConfigurations. - [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 int top: Maximum number of policies to return. @@ -104,14 +104,14 @@ def get_policy_configurations(self, project, scope=None, top=None, continuation_ query_parameters['policyType'] = self._serialize.query('policy_type', policy_type, 'str') response = self._send(http_method='GET', location_id='dad91cbe-d183-45f8-9c6e-9c1164472121', - version='6.0-preview.1', + version='6.0', 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. @@ -125,7 +125,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='6.0-preview.1', + version='6.0', route_values=route_values, content=content) return self._deserialize('PolicyConfiguration', response) @@ -197,7 +197,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. @@ -212,13 +212,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='6.0-preview.1', + version='6.0', 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. @@ -237,14 +237,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='6.0-preview.1', + version='6.0', 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:` ` @@ -256,13 +256,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='6.0-preview.1', + version='6.0', 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] """ @@ -271,7 +271,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='6.0-preview.1', + version='6.0', route_values=route_values) return self._deserialize('[PolicyType]', self._unwrap_collection(response)) diff --git a/azure-devops/azure/devops/v6_0/profile/profile_client.py b/azure-devops/azure/devops/v6_0/profile/profile_client.py index 3423cf21..9435d11e 100644 --- a/azure-devops/azure/devops/v6_0/profile/profile_client.py +++ b/azure-devops/azure/devops/v6_0/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='6.0-preview.3', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('Profile', response) diff --git a/azure-devops/azure/devops/v6_0/release/__init__.py b/azure-devops/azure/devops/v6_0/release/__init__.py index 8105dcc6..d22fe74a 100644 --- a/azure-devops/azure/devops/v6_0/release/__init__.py +++ b/azure-devops/azure/devops/v6_0/release/__init__.py @@ -54,8 +54,12 @@ 'ManualIntervention', 'ManualInterventionUpdateMetadata', 'Metric', + 'OrgPipelineReleaseSettings', + 'OrgPipelineReleaseSettingsUpdateParameters', 'PipelineProcess', 'ProcessParameters', + 'ProjectPipelineReleaseSettings', + 'ProjectPipelineReleaseSettingsUpdateParameters', 'ProjectReference', 'QueuedReleaseData', 'ReferenceLinks', diff --git a/azure-devops/azure/devops/v6_0/release/models.py b/azure-devops/azure/devops/v6_0/release/models.py index 1f73218f..827c2be8 100644 --- a/azure-devops/azure/devops/v6_0/release/models.py +++ b/azure-devops/azure/devops/v6_0/release/models.py @@ -1587,6 +1587,40 @@ def __init__(self, name=None, value=None): self.value = value +class OrgPipelineReleaseSettings(Model): + """ + :param has_manage_pipeline_policies_permission: Defines whether user can manage pipeline settings. + :type has_manage_pipeline_policies_permission: bool + :param org_enforce_job_auth_scope: EnforceJobAuthScope setting at organisaion level. If enabled, scope of access for all release pipelines in the organisation reduces to the current project. + :type org_enforce_job_auth_scope: bool + """ + + _attribute_map = { + 'has_manage_pipeline_policies_permission': {'key': 'hasManagePipelinePoliciesPermission', 'type': 'bool'}, + 'org_enforce_job_auth_scope': {'key': 'orgEnforceJobAuthScope', 'type': 'bool'} + } + + def __init__(self, has_manage_pipeline_policies_permission=None, org_enforce_job_auth_scope=None): + super(OrgPipelineReleaseSettings, self).__init__() + self.has_manage_pipeline_policies_permission = has_manage_pipeline_policies_permission + self.org_enforce_job_auth_scope = org_enforce_job_auth_scope + + +class OrgPipelineReleaseSettingsUpdateParameters(Model): + """ + :param org_enforce_job_auth_scope: EnforceJobAuthScope setting at organisaion level. If enabled, scope of access for all release pipelines in the organisation reduces to the current project. + :type org_enforce_job_auth_scope: bool + """ + + _attribute_map = { + 'org_enforce_job_auth_scope': {'key': 'orgEnforceJobAuthScope', 'type': 'bool'} + } + + def __init__(self, org_enforce_job_auth_scope=None): + super(OrgPipelineReleaseSettingsUpdateParameters, self).__init__() + self.org_enforce_job_auth_scope = org_enforce_job_auth_scope + + class PipelineProcess(Model): """ :param type: Pipeline process type. @@ -1625,6 +1659,48 @@ def __init__(self, data_source_bindings=None, inputs=None, source_definitions=No self.source_definitions = source_definitions +class ProjectPipelineReleaseSettings(Model): + """ + :param enforce_job_auth_scope: EnforceJobAuthScope setting at project level. If enabled, scope of access for all release pipelines reduces to the current project. + :type enforce_job_auth_scope: bool + :param has_manage_settings_permission: Defines whether user can manage pipeline settings. + :type has_manage_settings_permission: bool + :param org_enforce_job_auth_scope: EnforceJobAuthScope setting at organisaion level. If enabled, scope of access for all release pipelines in the organisation reduces to the current project. + :type org_enforce_job_auth_scope: bool + :param public_project: Defines whether project is public. + :type public_project: bool + """ + + _attribute_map = { + 'enforce_job_auth_scope': {'key': 'enforceJobAuthScope', 'type': 'bool'}, + 'has_manage_settings_permission': {'key': 'hasManageSettingsPermission', 'type': 'bool'}, + 'org_enforce_job_auth_scope': {'key': 'orgEnforceJobAuthScope', 'type': 'bool'}, + 'public_project': {'key': 'publicProject', 'type': 'bool'} + } + + def __init__(self, enforce_job_auth_scope=None, has_manage_settings_permission=None, org_enforce_job_auth_scope=None, public_project=None): + super(ProjectPipelineReleaseSettings, self).__init__() + self.enforce_job_auth_scope = enforce_job_auth_scope + self.has_manage_settings_permission = has_manage_settings_permission + self.org_enforce_job_auth_scope = org_enforce_job_auth_scope + self.public_project = public_project + + +class ProjectPipelineReleaseSettingsUpdateParameters(Model): + """ + :param enforce_job_auth_scope: EnforceJobAuthScope setting at project level. If enabled, scope of access for all release pipelines reduces to the current project. + :type enforce_job_auth_scope: bool + """ + + _attribute_map = { + 'enforce_job_auth_scope': {'key': 'enforceJobAuthScope', 'type': 'bool'} + } + + def __init__(self, enforce_job_auth_scope=None): + super(ProjectPipelineReleaseSettingsUpdateParameters, self).__init__() + self.enforce_job_auth_scope = enforce_job_auth_scope + + class ProjectReference(Model): """ :param id: Gets the unique identifier of this field. @@ -3399,6 +3475,8 @@ def __init__(self): class VariableValue(Model): """ + :param is_read_only: Gets or sets if the variable is read only or not. + :type is_read_only: bool :param is_secret: Gets or sets as the variable is secret or not. :type is_secret: bool :param value: Gets or sets the value. @@ -3406,12 +3484,14 @@ class VariableValue(Model): """ _attribute_map = { + 'is_read_only': {'key': 'isReadOnly', 'type': 'bool'}, 'is_secret': {'key': 'isSecret', 'type': 'bool'}, 'value': {'key': 'value', 'type': 'str'} } - def __init__(self, is_secret=None, value=None): + def __init__(self, is_read_only=None, is_secret=None, value=None): super(VariableValue, self).__init__() + self.is_read_only = is_read_only self.is_secret = is_secret self.value = value @@ -3704,8 +3784,12 @@ def __init__(self, id=None, tasks=None): 'ManualIntervention', 'ManualInterventionUpdateMetadata', 'Metric', + 'OrgPipelineReleaseSettings', + 'OrgPipelineReleaseSettingsUpdateParameters', 'PipelineProcess', 'ProcessParameters', + 'ProjectPipelineReleaseSettings', + 'ProjectPipelineReleaseSettingsUpdateParameters', 'ProjectReference', 'QueuedReleaseData', 'ReferenceLinks', diff --git a/azure-devops/azure/devops/v6_0/release/release_client.py b/azure-devops/azure/devops/v6_0/release/release_client.py index a0381949..80b8ea69 100644 --- a/azure-devops/azure/devops/v6_0/release/release_client.py +++ b/azure-devops/azure/devops/v6_0/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='6.0-preview.3', + version='6.0', 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='6.0-preview.3', + version='6.0', 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='6.0-preview.4', + version='6.0', 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='6.0-preview.4', + version='6.0', 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='6.0-preview.4', + version='6.0', 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='6.0-preview.4', + version='6.0', 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='6.0-preview.4', + version='6.0', 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='6.0-preview.2', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.8', + version='6.0', 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='6.0-preview.8', + version='6.0', 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='6.0-preview.8', + version='6.0', 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='6.0-preview.8', + version='6.0', 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='6.0-preview.8', + version='6.0', 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='6.0-preview.8', + version='6.0', route_values=route_values, content=content) return self._deserialize('Release', response) diff --git a/azure-devops/azure/devops/v6_0/search/__init__.py b/azure-devops/azure/devops/v6_0/search/__init__.py index a0734fcd..5772f0c1 100644 --- a/azure-devops/azure/devops/v6_0/search/__init__.py +++ b/azure-devops/azure/devops/v6_0/search/__init__.py @@ -18,6 +18,8 @@ 'CodeSearchRequest', 'CodeSearchResponse', 'Collection', + 'CustomRepositoryStatusResponse', + 'DepotInfo', 'EntitySearchRequest', 'EntitySearchRequestBase', 'EntitySearchResponse', @@ -39,6 +41,7 @@ 'SettingSearchResponse', 'SortOption', 'Team', + 'TfvcRepositoryStatusResponse', 'Version', 'Wiki', 'WikiHit', diff --git a/azure-devops/azure/devops/v6_0/search/models.py b/azure-devops/azure/devops/v6_0/search/models.py index 54966b0b..28074216 100644 --- a/azure-devops/azure/devops/v6_0/search/models.py +++ b/azure-devops/azure/devops/v6_0/search/models.py @@ -40,18 +40,26 @@ def __init__(self, boardtype=None, collection=None, project=None, team=None): class BranchInfo(Model): """ - Defines the Configured branch. + Information about the configured branch. - :param name: Indexed branch. + :param last_indexed_change_id: The commit Id of the last Git commit indexed in this branch + :type last_indexed_change_id: str + :param last_processed_time: The last time this branch was processed by the Search service + :type last_processed_time: datetime + :param name: Name of the indexed branch :type name: str """ _attribute_map = { + 'last_indexed_change_id': {'key': 'lastIndexedChangeId', 'type': 'str'}, + 'last_processed_time': {'key': 'lastProcessedTime', 'type': 'iso-8601'}, 'name': {'key': 'name', 'type': 'str'} } - def __init__(self, name=None): + def __init__(self, last_indexed_change_id=None, last_processed_time=None, name=None): super(BranchInfo, self).__init__() + self.last_indexed_change_id = last_indexed_change_id + self.last_processed_time = last_processed_time self.name = name @@ -117,6 +125,52 @@ def __init__(self, name=None): self.name = name +class CustomRepositoryStatusResponse(Model): + """ + Defines the custom repository status. + + :param id: Repository Id. + :type id: str + :param indexed_top_level_folders: List of indexed top level folders info. + :type indexed_top_level_folders: list of :class:`DepotInfo ` + :param name: Repository Name. + :type name: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'indexed_top_level_folders': {'key': 'indexedTopLevelFolders', 'type': '[DepotInfo]'}, + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, id=None, indexed_top_level_folders=None, name=None): + super(CustomRepositoryStatusResponse, self).__init__() + self.id = id + self.indexed_top_level_folders = indexed_top_level_folders + self.name = name + + +class DepotInfo(Model): + """ + Information about the custom repository indexing freshness for configured branches and depots. + + :param indexed_branches: List of Indexed branches info. + :type indexed_branches: list of :class:`BranchInfo ` + :param name: Name of the indexed top level folder (depot). + :type name: str + """ + + _attribute_map = { + 'indexed_branches': {'key': 'indexedBranches', 'type': '[BranchInfo]'}, + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, indexed_branches=None, name=None): + super(DepotInfo, self).__init__() + self.indexed_branches = indexed_branches + self.name = name + + class EntitySearchRequestBase(Model): """ Base class for search request types. @@ -235,22 +289,34 @@ class Hit(Model): :param char_offset: Gets or sets the start character offset of a piece of text. :type char_offset: int + :param code_snippet: Gets or sets an extract of code where the match appears. Usually it is the line where there is the match. + :type code_snippet: str + :param column: Gets or sets the column number where the match appears in the line. + :type column: int :param length: Gets or sets the length of a piece of text. :type length: int + :param line: Gets or sets the line number where the match appears in the file. + :type line: int :param type: Gets or sets the name of type of a piece of text. :type type: str """ _attribute_map = { 'char_offset': {'key': 'charOffset', 'type': 'int'}, + 'code_snippet': {'key': 'codeSnippet', 'type': 'str'}, + 'column': {'key': 'column', 'type': 'int'}, 'length': {'key': 'length', 'type': 'int'}, + 'line': {'key': 'line', 'type': 'int'}, 'type': {'key': 'type', 'type': 'str'} } - def __init__(self, char_offset=None, length=None, type=None): + def __init__(self, char_offset=None, code_snippet=None, column=None, length=None, line=None, type=None): super(Hit, self).__init__() self.char_offset = char_offset + self.code_snippet = code_snippet + self.column = column self.length = length + self.line = line self.type = type @@ -437,17 +503,21 @@ class RepositoryStatusResponse(Model): :type id: str :param indexed_branches: List of Indexed branches info. :type indexed_branches: list of :class:`BranchInfo ` + :param name: Repository Name. + :type name: str """ _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, - 'indexed_branches': {'key': 'indexedBranches', 'type': '[BranchInfo]'} + 'indexed_branches': {'key': 'indexedBranches', 'type': '[BranchInfo]'}, + 'name': {'key': 'name', 'type': 'str'} } - def __init__(self, id=None, indexed_branches=None): + def __init__(self, id=None, indexed_branches=None, name=None): super(RepositoryStatusResponse, self).__init__() self.id = id self.indexed_branches = indexed_branches + self.name = name class ScrollSearchRequest(EntitySearchRequestBase): @@ -583,6 +653,31 @@ def __init__(self, id=None, name=None): self.name = name +class TfvcRepositoryStatusResponse(Model): + """ + Defines the TFVC repository status. + + :param id: Repository Id. + :type id: str + :param indexing_information: List of Indexing Information for TFVC repository + :type indexing_information: list of :class:`BranchInfo ` + :param name: Repository Name. + :type name: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'indexing_information': {'key': 'indexingInformation', 'type': '[BranchInfo]'}, + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, id=None, indexing_information=None, name=None): + super(TfvcRepositoryStatusResponse, self).__init__() + self.id = id + self.indexing_information = indexing_information + self.name = name + + class Version(Model): """ Describes the details pertaining to a version of the result file. @@ -1059,6 +1154,8 @@ class CodeSearchRequest(EntitySearchRequest): :type top: int :param include_facets: Flag to opt for faceting in the result. Default behavior is false. :type include_facets: bool + :param include_snippet: Flag to opt for including matched code snippet in the result. Default behavior is false. + :type include_snippet: bool """ _attribute_map = { @@ -1068,10 +1165,12 @@ class CodeSearchRequest(EntitySearchRequest): 'skip': {'key': '$skip', 'type': 'int'}, 'top': {'key': '$top', 'type': 'int'}, 'include_facets': {'key': 'includeFacets', 'type': 'bool'}, + 'include_snippet': {'key': 'includeSnippet', 'type': 'bool'} } - def __init__(self, filters=None, search_text=None, order_by=None, skip=None, top=None, include_facets=None): + def __init__(self, filters=None, search_text=None, order_by=None, skip=None, top=None, include_facets=None, include_snippet=None): super(CodeSearchRequest, self).__init__(filters=filters, search_text=search_text, order_by=order_by, skip=skip, top=top, include_facets=include_facets) + self.include_snippet = include_snippet __all__ = [ @@ -1079,6 +1178,8 @@ def __init__(self, filters=None, search_text=None, order_by=None, skip=None, top 'BranchInfo', 'CodeResult', 'Collection', + 'CustomRepositoryStatusResponse', + 'DepotInfo', 'EntitySearchRequestBase', 'EntitySearchResponse', 'FeedInfo', @@ -1097,6 +1198,7 @@ def __init__(self, filters=None, search_text=None, order_by=None, skip=None, top 'SettingSearchResponse', 'SortOption', 'Team', + 'TfvcRepositoryStatusResponse', 'Version', 'Wiki', 'WikiHit', diff --git a/azure-devops/azure/devops/v6_0/search/search_client.py b/azure-devops/azure/devops/v6_0/search/search_client.py index 5013467f..8a21c593 100644 --- a/azure-devops/azure/devops/v6_0/search/search_client.py +++ b/azure-devops/azure/devops/v6_0/search/search_client.py @@ -95,6 +95,21 @@ def get_repository_status(self, project, repository): route_values=route_values) return self._deserialize('RepositoryStatusResponse', response) + def get_tfvc_repository_status(self, project): + """GetTfvcRepositoryStatus. + [Preview API] Provides status of TFVC Repository. + :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') + response = self._send(http_method='GET', + location_id='d5bf4e52-e0af-4626-8c50-8a80b18fa69f', + version='6.0-preview.1', + route_values=route_values) + return self._deserialize('TfvcRepositoryStatusResponse', response) + def fetch_wiki_search_results(self, request, project=None): """FetchWikiSearchResults. [Preview API] Provides a set of results for the search request. diff --git a/azure-devops/azure/devops/v6_0/security/security_client.py b/azure-devops/azure/devops/v6_0/security/security_client.py index 10204944..30d4c10c 100644 --- a/azure-devops/azure/devops/v6_0/security/security_client.py +++ b/azure-devops/azure/devops/v6_0/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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.2', + version='6.0', 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='6.0-preview.2', + version='6.0', 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='6.0-preview.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[SecurityNamespaceDescription]', self._unwrap_collection(response)) diff --git a/azure-devops/azure/devops/v6_0/service_endpoint/service_endpoint_client.py b/azure-devops/azure/devops/v6_0/service_endpoint/service_endpoint_client.py index 0195babf..97de69c0 100644 --- a/azure-devops/azure/devops/v6_0/service_endpoint/service_endpoint_client.py +++ b/azure-devops/azure/devops/v6_0/service_endpoint/service_endpoint_client.py @@ -50,22 +50,23 @@ def execute_service_endpoint_request(self, service_endpoint_request, project, en def create_service_endpoint(self, endpoint): """CreateServiceEndpoint. - [Preview API] - :param :class:` ` endpoint: + [Preview API] Creates a new service endpoint + :param :class:` ` endpoint: Service endpoint to create :rtype: :class:` ` """ content = self._serialize.body(endpoint, 'ServiceEndpoint') response = self._send(http_method='POST', location_id='14e48fdc-2c8b-41ce-a0c3-e26f6cc55bd0', - version='6.0-preview.3', + version='6.0-preview.4', content=content) return self._deserialize('ServiceEndpoint', response) - def delete_service_endpoint(self, endpoint_id, project_ids): + def delete_service_endpoint(self, endpoint_id, project_ids, deep=None): """DeleteServiceEndpoint. - [Preview API] - :param str endpoint_id: - :param [str] project_ids: + [Preview API] Delete a service endpoint + :param str endpoint_id: Endpoint Id of endpoint to delete + :param [str] project_ids: project Ids from which endpoint needs to be deleted + :param bool deep: delete the spn created by endpoint """ route_values = {} if endpoint_id is not None: @@ -74,17 +75,19 @@ def delete_service_endpoint(self, endpoint_id, project_ids): if project_ids is not None: project_ids = ",".join(project_ids) query_parameters['projectIds'] = self._serialize.query('project_ids', project_ids, 'str') + if deep is not None: + query_parameters['deep'] = self._serialize.query('deep', deep, 'bool') self._send(http_method='DELETE', location_id='14e48fdc-2c8b-41ce-a0c3-e26f6cc55bd0', - version='6.0-preview.3', + version='6.0-preview.4', route_values=route_values, query_parameters=query_parameters) def share_service_endpoint(self, endpoint_project_references, endpoint_id): """ShareServiceEndpoint. - [Preview API] - :param [ServiceEndpointProjectReference] endpoint_project_references: - :param str endpoint_id: + [Preview API] Share service endpoint across projects + :param [ServiceEndpointProjectReference] endpoint_project_references: Project reference details of the target project + :param str endpoint_id: Endpoint Id of the endpoint to share """ route_values = {} if endpoint_id is not None: @@ -92,16 +95,16 @@ def share_service_endpoint(self, endpoint_project_references, endpoint_id): content = self._serialize.body(endpoint_project_references, '[ServiceEndpointProjectReference]') self._send(http_method='PATCH', location_id='14e48fdc-2c8b-41ce-a0c3-e26f6cc55bd0', - version='6.0-preview.3', + version='6.0-preview.4', route_values=route_values, content=content) - def update_service_endpoint(self, endpoint, endpoint_id, operation): + def update_service_endpoint(self, endpoint, endpoint_id, operation=None): """UpdateServiceEndpoint. - [Preview API] - :param :class:` ` endpoint: - :param str endpoint_id: - :param str operation: + [Preview API] Update the service endpoint + :param :class:` ` endpoint: Updated data for the endpoint + :param str endpoint_id: Endpoint Id of the endpoint to update + :param str operation: operation type :rtype: :class:` ` """ route_values = {} @@ -113,17 +116,31 @@ def update_service_endpoint(self, endpoint, endpoint_id, operation): content = self._serialize.body(endpoint, 'ServiceEndpoint') response = self._send(http_method='PUT', location_id='14e48fdc-2c8b-41ce-a0c3-e26f6cc55bd0', - version='6.0-preview.3', + version='6.0-preview.4', route_values=route_values, query_parameters=query_parameters, content=content) return self._deserialize('ServiceEndpoint', response) - def get_service_endpoint_details(self, project, endpoint_id): + def update_service_endpoints(self, endpoints): + """UpdateServiceEndpoints. + [Preview API] Update the service endpoints. + :param [ServiceEndpoint] endpoints: Names of the service endpoints to update. + :rtype: [ServiceEndpoint] + """ + content = self._serialize.body(endpoints, '[ServiceEndpoint]') + response = self._send(http_method='PUT', + location_id='14e48fdc-2c8b-41ce-a0c3-e26f6cc55bd0', + version='6.0-preview.4', + content=content) + return self._deserialize('[ServiceEndpoint]', self._unwrap_collection(response)) + + def get_service_endpoint_details(self, project, endpoint_id, action_filter=None): """GetServiceEndpointDetails. [Preview API] Get the service endpoint details. :param str project: Project ID or project name :param str endpoint_id: Id of the service endpoint. + :param str action_filter: Action filter for the service connection. It specifies the action which can be performed on the service connection. :rtype: :class:` ` """ route_values = {} @@ -131,10 +148,14 @@ def get_service_endpoint_details(self, project, endpoint_id): route_values['project'] = self._serialize.url('project', project, 'str') if endpoint_id is not None: route_values['endpointId'] = self._serialize.url('endpoint_id', endpoint_id, 'str') + query_parameters = {} + if action_filter is not None: + query_parameters['actionFilter'] = self._serialize.query('action_filter', action_filter, 'str') response = self._send(http_method='GET', location_id='e85f1c62-adfc-4b74-b618-11a150fb195e', - version='6.0-preview.3', - route_values=route_values) + version='6.0-preview.4', + route_values=route_values, + query_parameters=query_parameters) return self._deserialize('ServiceEndpoint', response) def get_service_endpoints(self, project, type=None, auth_schemes=None, endpoint_ids=None, owner=None, include_failed=None, include_details=None): @@ -169,7 +190,7 @@ def get_service_endpoints(self, project, type=None, auth_schemes=None, endpoint_ query_parameters['includeDetails'] = self._serialize.query('include_details', include_details, 'bool') response = self._send(http_method='GET', location_id='e85f1c62-adfc-4b74-b618-11a150fb195e', - version='6.0-preview.3', + version='6.0-preview.4', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[ServiceEndpoint]', self._unwrap_collection(response)) @@ -206,11 +227,35 @@ def get_service_endpoints_by_names(self, project, endpoint_names, type=None, aut query_parameters['includeDetails'] = self._serialize.query('include_details', include_details, 'bool') response = self._send(http_method='GET', location_id='e85f1c62-adfc-4b74-b618-11a150fb195e', - version='6.0-preview.3', + version='6.0-preview.4', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[ServiceEndpoint]', self._unwrap_collection(response)) + def get_service_endpoints_with_refreshed_authentication(self, refresh_authentication_parameters, project, endpoint_ids): + """GetServiceEndpointsWithRefreshedAuthentication. + [Preview API] Gets the service endpoints and patch new authorization parameters + :param [RefreshAuthenticationParameters] refresh_authentication_parameters: Scope, Validity of Token requested. + :param str project: Project ID or project name + :param [str] endpoint_ids: Ids of the service endpoints. + :rtype: [ServiceEndpoint] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if endpoint_ids is not None: + endpoint_ids = ",".join(endpoint_ids) + query_parameters['endpointIds'] = self._serialize.query('endpoint_ids', endpoint_ids, 'str') + content = self._serialize.body(refresh_authentication_parameters, '[RefreshAuthenticationParameters]') + response = self._send(http_method='POST', + location_id='e85f1c62-adfc-4b74-b618-11a150fb195e', + version='6.0-preview.4', + route_values=route_values, + query_parameters=query_parameters, + content=content) + return self._deserialize('[ServiceEndpoint]', self._unwrap_collection(response)) + def get_service_endpoint_execution_records(self, project, endpoint_id, top=None, continuation_token=None): """GetServiceEndpointExecutionRecords. [Preview API] Get service endpoint execution records. diff --git a/azure-devops/azure/devops/v6_0/service_hooks/service_hooks_client.py b/azure-devops/azure/devops/v6_0/service_hooks/service_hooks_client.py index ce019a90..5d4ad0a1 100644 --- a/azure-devops/azure/devops/v6_0/service_hooks/service_hooks_client.py +++ b/azure-devops/azure/devops/v6_0/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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1') + version='6.0') 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', query_parameters=query_parameters, content=content) return self._deserialize('Notification', response) diff --git a/azure-devops/azure/devops/v6_0/symbol/models.py b/azure-devops/azure/devops/v6_0/symbol/models.py index 7473c938..074fc62b 100644 --- a/azure-devops/azure/devops/v6_0/symbol/models.py +++ b/azure-devops/azure/devops/v6_0/symbol/models.py @@ -140,6 +140,8 @@ class DebugEntry(ResourceBase): :type information_level: object :param request_id: The identifier of symbol request to which this debug entry belongs. :type request_id: str + :param size: The size for the debug entry. + :type size: long :param status: The status of debug entry. :type status: object """ @@ -156,10 +158,11 @@ class DebugEntry(ResourceBase): 'client_key': {'key': 'clientKey', 'type': 'str'}, 'information_level': {'key': 'informationLevel', 'type': 'object'}, 'request_id': {'key': 'requestId', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'long'}, 'status': {'key': 'status', 'type': 'object'} } - def __init__(self, created_by=None, created_date=None, id=None, storage_eTag=None, url=None, blob_details=None, blob_identifier=None, blob_uri=None, client_key=None, information_level=None, request_id=None, status=None): + def __init__(self, created_by=None, created_date=None, id=None, storage_eTag=None, url=None, blob_details=None, blob_identifier=None, blob_uri=None, client_key=None, information_level=None, request_id=None, size=None, status=None): super(DebugEntry, self).__init__(created_by=created_by, created_date=created_date, id=id, storage_eTag=storage_eTag, url=url) self.blob_details = blob_details self.blob_identifier = blob_identifier @@ -167,6 +170,7 @@ def __init__(self, created_by=None, created_date=None, id=None, storage_eTag=Non self.client_key = client_key self.information_level = information_level self.request_id = request_id + self.size = size self.status = status @@ -190,6 +194,8 @@ class Request(ResourceBase): :type expiration_date: datetime :param name: A human-facing name for the request. Required on POST, ignored on PATCH. :type name: str + :param size: The total Size for this request. + :type size: long :param status: The status for this request. :type status: object """ @@ -203,14 +209,16 @@ class Request(ResourceBase): 'description': {'key': 'description', 'type': 'str'}, 'expiration_date': {'key': 'expirationDate', 'type': 'iso-8601'}, 'name': {'key': 'name', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'long'}, 'status': {'key': 'status', 'type': 'object'} } - def __init__(self, created_by=None, created_date=None, id=None, storage_eTag=None, url=None, description=None, expiration_date=None, name=None, status=None): + def __init__(self, created_by=None, created_date=None, id=None, storage_eTag=None, url=None, description=None, expiration_date=None, name=None, size=None, status=None): super(Request, self).__init__(created_by=created_by, created_date=created_date, id=id, storage_eTag=storage_eTag, url=url) self.description = description self.expiration_date = expiration_date self.name = name + self.size = size self.status = status diff --git a/azure-devops/azure/devops/v6_0/task/models.py b/azure-devops/azure/devops/v6_0/task/models.py index f5f478d3..bf69f3b5 100644 --- a/azure-devops/azure/devops/v6_0/task/models.py +++ b/azure-devops/azure/devops/v6_0/task/models.py @@ -752,6 +752,8 @@ def __init__(self, change_id=None, id=None, location=None): class VariableValue(Model): """ + :param is_read_only: + :type is_read_only: bool :param is_secret: :type is_secret: bool :param value: @@ -759,12 +761,14 @@ class VariableValue(Model): """ _attribute_map = { + 'is_read_only': {'key': 'isReadOnly', 'type': 'bool'}, 'is_secret': {'key': 'isSecret', 'type': 'bool'}, 'value': {'key': 'value', 'type': 'str'} } - def __init__(self, is_secret=None, value=None): + def __init__(self, is_read_only=None, is_secret=None, value=None): super(VariableValue, self).__init__() + self.is_read_only = is_read_only self.is_secret = is_secret self.value = value @@ -866,6 +870,8 @@ class TaskOrchestrationPlan(TaskOrchestrationPlanReference): :type version: int :param environment: :type environment: :class:`PlanEnvironment ` + :param expanded_yaml: + :type expanded_yaml: :class:`TaskLogReference ` :param finish_time: :type finish_time: datetime :param implementation: @@ -899,6 +905,7 @@ class TaskOrchestrationPlan(TaskOrchestrationPlanReference): 'scope_identifier': {'key': 'scopeIdentifier', 'type': 'str'}, 'version': {'key': 'version', 'type': 'int'}, 'environment': {'key': 'environment', 'type': 'PlanEnvironment'}, + 'expanded_yaml': {'key': 'expandedYaml', 'type': 'TaskLogReference'}, 'finish_time': {'key': 'finishTime', 'type': 'iso-8601'}, 'implementation': {'key': 'implementation', 'type': 'TaskOrchestrationContainer'}, 'initialization_log': {'key': 'initializationLog', 'type': 'TaskLogReference'}, @@ -911,9 +918,10 @@ class TaskOrchestrationPlan(TaskOrchestrationPlanReference): 'timeline': {'key': 'timeline', 'type': 'TimelineReference'} } - def __init__(self, artifact_location=None, artifact_uri=None, definition=None, owner=None, plan_group=None, plan_id=None, plan_type=None, scope_identifier=None, version=None, environment=None, finish_time=None, implementation=None, initialization_log=None, requested_by_id=None, requested_for_id=None, result=None, result_code=None, start_time=None, state=None, timeline=None): + def __init__(self, artifact_location=None, artifact_uri=None, definition=None, owner=None, plan_group=None, plan_id=None, plan_type=None, scope_identifier=None, version=None, environment=None, expanded_yaml=None, finish_time=None, implementation=None, initialization_log=None, requested_by_id=None, requested_for_id=None, result=None, result_code=None, start_time=None, state=None, timeline=None): super(TaskOrchestrationPlan, self).__init__(artifact_location=artifact_location, artifact_uri=artifact_uri, definition=definition, owner=owner, plan_group=plan_group, plan_id=plan_id, plan_type=plan_type, scope_identifier=scope_identifier, version=version) self.environment = environment + self.expanded_yaml = expanded_yaml self.finish_time = finish_time self.implementation = implementation self.initialization_log = initialization_log diff --git a/azure-devops/azure/devops/v6_0/task/task_client.py b/azure-devops/azure/devops/v6_0/task/task_client.py index 8b99b7ab..ae63b1cc 100644 --- a/azure-devops/azure/devops/v6_0/task/task_client.py +++ b/azure-devops/azure/devops/v6_0/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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', route_values=route_values) return self._deserialize('[Timeline]', self._unwrap_collection(response)) diff --git a/azure-devops/azure/devops/v6_0/task_agent/__init__.py b/azure-devops/azure/devops/v6_0/task_agent/__init__.py index 7d722d15..0b2a88a3 100644 --- a/azure-devops/azure/devops/v6_0/task_agent/__init__.py +++ b/azure-devops/azure/devops/v6_0/task_agent/__init__.py @@ -57,7 +57,6 @@ 'InputValuesError', 'KubernetesResource', 'KubernetesResourceCreateParameters', - 'MarketplacePurchasedLicense', 'MetricsColumnMetaData', 'MetricsColumnsHeader', 'MetricsRow', diff --git a/azure-devops/azure/devops/v6_0/task_agent/models.py b/azure-devops/azure/devops/v6_0/task_agent/models.py index 9a8f90ce..1dac5d73 100644 --- a/azure-devops/azure/devops/v6_0/task_agent/models.py +++ b/azure-devops/azure/devops/v6_0/task_agent/models.py @@ -1344,31 +1344,6 @@ def __init__(self, cluster_name=None, name=None, namespace=None, tags=None): self.tags = tags -class MarketplacePurchasedLicense(Model): - """ - Represents a purchase of resource units in a secondary marketplace. - - :param marketplace_name: The Marketplace display name. - :type marketplace_name: str - :param purchaser_name: The name of the identity making the purchase as seen by the marketplace - :type purchaser_name: str - :param purchase_unit_count: The quantity purchased. - :type purchase_unit_count: int - """ - - _attribute_map = { - 'marketplace_name': {'key': 'marketplaceName', 'type': 'str'}, - 'purchaser_name': {'key': 'purchaserName', 'type': 'str'}, - 'purchase_unit_count': {'key': 'purchaseUnitCount', 'type': 'int'} - } - - def __init__(self, marketplace_name=None, purchaser_name=None, purchase_unit_count=None): - super(MarketplacePurchasedLicense, self).__init__() - self.marketplace_name = marketplace_name - self.purchaser_name = purchaser_name - self.purchase_unit_count = purchase_unit_count - - class MetricsColumnMetaData(Model): """ Meta data for a metrics column. @@ -2567,6 +2542,8 @@ class TaskAgentPoolReference(Model): :type is_legacy: bool :param name: :type name: str + :param options: Additional pool settings and details + :type options: object :param pool_type: Gets or sets the type of the pool :type pool_type: object :param scope: @@ -2580,17 +2557,19 @@ class TaskAgentPoolReference(Model): 'is_hosted': {'key': 'isHosted', 'type': 'bool'}, 'is_legacy': {'key': 'isLegacy', 'type': 'bool'}, 'name': {'key': 'name', 'type': 'str'}, + 'options': {'key': 'options', 'type': 'object'}, 'pool_type': {'key': 'poolType', 'type': 'object'}, 'scope': {'key': 'scope', 'type': 'str'}, 'size': {'key': 'size', 'type': 'int'} } - def __init__(self, id=None, is_hosted=None, is_legacy=None, name=None, pool_type=None, scope=None, size=None): + def __init__(self, id=None, is_hosted=None, is_legacy=None, name=None, options=None, pool_type=None, scope=None, size=None): super(TaskAgentPoolReference, self).__init__() self.id = id self.is_hosted = is_hosted self.is_legacy = is_legacy self.name = name + self.options = options self.pool_type = pool_type self.scope = scope self.size = size @@ -3506,8 +3485,6 @@ class TaskHubLicenseDetails(Model): :type hosted_agent_minutes_used_count: int :param hosted_licenses_are_premium: :type hosted_licenses_are_premium: bool - :param marketplace_purchased_hosted_licenses: - :type marketplace_purchased_hosted_licenses: list of :class:`MarketplacePurchasedLicense ` :param msdn_users_count: :type msdn_users_count: int :param purchased_hosted_license_count: Microsoft-hosted licenses purchased from VSTS directly. @@ -3531,7 +3508,6 @@ class TaskHubLicenseDetails(Model): 'hosted_agent_minutes_free_count': {'key': 'hostedAgentMinutesFreeCount', 'type': 'int'}, 'hosted_agent_minutes_used_count': {'key': 'hostedAgentMinutesUsedCount', 'type': 'int'}, 'hosted_licenses_are_premium': {'key': 'hostedLicensesArePremium', 'type': 'bool'}, - 'marketplace_purchased_hosted_licenses': {'key': 'marketplacePurchasedHostedLicenses', 'type': '[MarketplacePurchasedLicense]'}, 'msdn_users_count': {'key': 'msdnUsersCount', 'type': 'int'}, 'purchased_hosted_license_count': {'key': 'purchasedHostedLicenseCount', 'type': 'int'}, 'purchased_license_count': {'key': 'purchasedLicenseCount', 'type': 'int'}, @@ -3540,7 +3516,7 @@ class TaskHubLicenseDetails(Model): 'total_private_license_count': {'key': 'totalPrivateLicenseCount', 'type': 'int'} } - def __init__(self, enterprise_users_count=None, failed_to_reach_all_providers=None, free_hosted_license_count=None, free_license_count=None, has_license_count_ever_updated=None, hosted_agent_minutes_free_count=None, hosted_agent_minutes_used_count=None, hosted_licenses_are_premium=None, marketplace_purchased_hosted_licenses=None, msdn_users_count=None, purchased_hosted_license_count=None, purchased_license_count=None, total_hosted_license_count=None, total_license_count=None, total_private_license_count=None): + def __init__(self, enterprise_users_count=None, failed_to_reach_all_providers=None, free_hosted_license_count=None, free_license_count=None, has_license_count_ever_updated=None, hosted_agent_minutes_free_count=None, hosted_agent_minutes_used_count=None, hosted_licenses_are_premium=None, msdn_users_count=None, purchased_hosted_license_count=None, purchased_license_count=None, total_hosted_license_count=None, total_license_count=None, total_private_license_count=None): super(TaskHubLicenseDetails, self).__init__() self.enterprise_users_count = enterprise_users_count self.failed_to_reach_all_providers = failed_to_reach_all_providers @@ -3550,7 +3526,6 @@ def __init__(self, enterprise_users_count=None, failed_to_reach_all_providers=No self.hosted_agent_minutes_free_count = hosted_agent_minutes_free_count self.hosted_agent_minutes_used_count = hosted_agent_minutes_used_count self.hosted_licenses_are_premium = hosted_licenses_are_premium - self.marketplace_purchased_hosted_licenses = marketplace_purchased_hosted_licenses self.msdn_users_count = msdn_users_count self.purchased_hosted_license_count = purchased_hosted_license_count self.purchased_license_count = purchased_license_count @@ -3950,6 +3925,8 @@ def __init__(self): class VariableValue(Model): """ + :param is_read_only: + :type is_read_only: bool :param is_secret: :type is_secret: bool :param value: @@ -3957,12 +3934,14 @@ class VariableValue(Model): """ _attribute_map = { + 'is_read_only': {'key': 'isReadOnly', 'type': 'bool'}, 'is_secret': {'key': 'isSecret', 'type': 'bool'}, 'value': {'key': 'value', 'type': 'str'} } - def __init__(self, is_secret=None, value=None): + def __init__(self, is_read_only=None, is_secret=None, value=None): super(VariableValue, self).__init__() + self.is_read_only = is_read_only self.is_secret = is_secret self.value = value @@ -4265,6 +4244,8 @@ class TaskAgentPool(TaskAgentPoolReference): :type is_legacy: bool :param name: :type name: str + :param options: Additional pool settings and details + :type options: object :param pool_type: Gets or sets the type of the pool :type pool_type: object :param scope: @@ -4277,6 +4258,8 @@ class TaskAgentPool(TaskAgentPoolReference): :type auto_provision: bool :param auto_size: Whether or not the pool should autosize itself based on the Agent Cloud Provider settings. :type auto_size: bool + :param auto_update: Whether or not agents in this pool are allowed to automatically update + :type auto_update: bool :param created_by: Creator of the pool. The creator of the pool is automatically added into the administrators group for the pool on creation. :type created_by: :class:`IdentityRef ` :param created_on: The date/time of the pool creation. @@ -4294,12 +4277,14 @@ class TaskAgentPool(TaskAgentPoolReference): 'is_hosted': {'key': 'isHosted', 'type': 'bool'}, 'is_legacy': {'key': 'isLegacy', 'type': 'bool'}, 'name': {'key': 'name', 'type': 'str'}, + 'options': {'key': 'options', 'type': 'object'}, 'pool_type': {'key': 'poolType', 'type': 'object'}, 'scope': {'key': 'scope', 'type': 'str'}, 'size': {'key': 'size', 'type': 'int'}, 'agent_cloud_id': {'key': 'agentCloudId', 'type': 'int'}, 'auto_provision': {'key': 'autoProvision', 'type': 'bool'}, 'auto_size': {'key': 'autoSize', 'type': 'bool'}, + 'auto_update': {'key': 'autoUpdate', 'type': 'bool'}, 'created_by': {'key': 'createdBy', 'type': 'IdentityRef'}, 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, 'owner': {'key': 'owner', 'type': 'IdentityRef'}, @@ -4307,11 +4292,12 @@ class TaskAgentPool(TaskAgentPoolReference): 'target_size': {'key': 'targetSize', 'type': 'int'} } - def __init__(self, id=None, is_hosted=None, is_legacy=None, name=None, pool_type=None, scope=None, size=None, agent_cloud_id=None, auto_provision=None, auto_size=None, created_by=None, created_on=None, owner=None, properties=None, target_size=None): - super(TaskAgentPool, self).__init__(id=id, is_hosted=is_hosted, is_legacy=is_legacy, name=name, pool_type=pool_type, scope=scope, size=size) + def __init__(self, id=None, is_hosted=None, is_legacy=None, name=None, options=None, pool_type=None, scope=None, size=None, agent_cloud_id=None, auto_provision=None, auto_size=None, auto_update=None, created_by=None, created_on=None, owner=None, properties=None, target_size=None): + super(TaskAgentPool, self).__init__(id=id, is_hosted=is_hosted, is_legacy=is_legacy, name=name, options=options, pool_type=pool_type, scope=scope, size=size) self.agent_cloud_id = agent_cloud_id self.auto_provision = auto_provision self.auto_size = auto_size + self.auto_update = auto_update self.created_by = created_by self.created_on = created_on self.owner = owner @@ -4437,7 +4423,6 @@ def __init__(self, auth_key=None, endpoint=None, key_selector=None, selector=Non 'InputValuesError', 'KubernetesResource', 'KubernetesResourceCreateParameters', - 'MarketplacePurchasedLicense', 'MetricsColumnMetaData', 'MetricsColumnsHeader', 'MetricsRow', diff --git a/azure-devops/azure/devops/v6_0/task_agent/task_agent_client.py b/azure-devops/azure/devops/v6_0/task_agent/task_agent_client.py index 7ce9ede0..f5a6d65e 100644 --- a/azure-devops/azure/devops/v6_0/task_agent/task_agent_client.py +++ b/azure-devops/azure/devops/v6_0/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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', route_values=route_values, content=content) return self._deserialize('TaskAgent', response) @@ -351,22 +351,213 @@ def update_deployment_group(self, deployment_group, project, deployment_group_id content=content) return self._deserialize('DeploymentGroup', response) + def get_environment_deployment_execution_records(self, project, environment_id, continuation_token=None, top=None): + """GetEnvironmentDeploymentExecutionRecords. + [Preview API] Get environment deployment execution history + :param str project: Project ID or project name + :param int environment_id: + :param str continuation_token: + :param int top: + :rtype: :class:`<[EnvironmentDeploymentExecutionRecord]> ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if environment_id is not None: + route_values['environmentId'] = self._serialize.url('environment_id', environment_id, 'int') + query_parameters = {} + if continuation_token is not None: + query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'str') + if top is not None: + query_parameters['top'] = self._serialize.query('top', top, 'int') + response = self._send(http_method='GET', + location_id='51bb5d21-4305-4ea6-9dbb-b7488af73334', + version='6.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('[EnvironmentDeploymentExecutionRecord]', self._unwrap_collection(response)) + + def add_environment(self, environment_create_parameter, project): + """AddEnvironment. + [Preview API] Create an environment. + :param :class:` ` environment_create_parameter: Environment to create. + :param str project: Project ID or project name + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(environment_create_parameter, 'EnvironmentCreateParameter') + response = self._send(http_method='POST', + location_id='8572b1fc-2482-47fa-8f74-7e3ed53ee54b', + version='6.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('EnvironmentInstance', response) + + def delete_environment(self, project, environment_id): + """DeleteEnvironment. + [Preview API] Delete the specified environment. + :param str project: Project ID or project name + :param int environment_id: ID of the environment. + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if environment_id is not None: + route_values['environmentId'] = self._serialize.url('environment_id', environment_id, 'int') + self._send(http_method='DELETE', + location_id='8572b1fc-2482-47fa-8f74-7e3ed53ee54b', + version='6.0-preview.1', + route_values=route_values) + + def get_environment_by_id(self, project, environment_id, expands=None): + """GetEnvironmentById. + [Preview API] Get an environment by its ID. + :param str project: Project ID or project name + :param int environment_id: ID of the environment. + :param str expands: Include these additional details in the returned objects. + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if environment_id is not None: + route_values['environmentId'] = self._serialize.url('environment_id', environment_id, 'int') + query_parameters = {} + if expands is not None: + query_parameters['expands'] = self._serialize.query('expands', expands, 'str') + response = self._send(http_method='GET', + location_id='8572b1fc-2482-47fa-8f74-7e3ed53ee54b', + version='6.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('EnvironmentInstance', response) + + def get_environments(self, project, name=None, continuation_token=None, top=None): + """GetEnvironments. + [Preview API] Get all environments. + :param str project: Project ID or project name + :param str name: + :param str continuation_token: + :param int top: + :rtype: :class:`<[EnvironmentInstance]> ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if name is not None: + query_parameters['name'] = self._serialize.query('name', name, 'str') + if continuation_token is not None: + query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query('top', top, 'int') + response = self._send(http_method='GET', + location_id='8572b1fc-2482-47fa-8f74-7e3ed53ee54b', + version='6.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('[EnvironmentInstance]', self._unwrap_collection(response)) + + def update_environment(self, environment_update_parameter, project, environment_id): + """UpdateEnvironment. + [Preview API] Update the specified environment. + :param :class:` ` environment_update_parameter: Environment data to update. + :param str project: Project ID or project name + :param int environment_id: ID of the environment. + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if environment_id is not None: + route_values['environmentId'] = self._serialize.url('environment_id', environment_id, 'int') + content = self._serialize.body(environment_update_parameter, 'EnvironmentUpdateParameter') + response = self._send(http_method='PATCH', + location_id='8572b1fc-2482-47fa-8f74-7e3ed53ee54b', + version='6.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('EnvironmentInstance', response) + + def add_kubernetes_resource(self, create_parameters, project, environment_id): + """AddKubernetesResource. + [Preview API] + :param :class:` ` create_parameters: + :param str project: Project ID or project name + :param int environment_id: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if environment_id is not None: + route_values['environmentId'] = self._serialize.url('environment_id', environment_id, 'int') + content = self._serialize.body(create_parameters, 'KubernetesResourceCreateParameters') + response = self._send(http_method='POST', + location_id='73fba52f-15ab-42b3-a538-ce67a9223a04', + version='6.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('KubernetesResource', response) + + def delete_kubernetes_resource(self, project, environment_id, resource_id): + """DeleteKubernetesResource. + [Preview API] + :param str project: Project ID or project name + :param int environment_id: + :param int resource_id: + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if environment_id is not None: + route_values['environmentId'] = self._serialize.url('environment_id', environment_id, 'int') + if resource_id is not None: + route_values['resourceId'] = self._serialize.url('resource_id', resource_id, 'int') + self._send(http_method='DELETE', + location_id='73fba52f-15ab-42b3-a538-ce67a9223a04', + version='6.0-preview.1', + route_values=route_values) + + def get_kubernetes_resource(self, project, environment_id, resource_id): + """GetKubernetesResource. + [Preview API] + :param str project: Project ID or project name + :param int environment_id: + :param int resource_id: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if environment_id is not None: + route_values['environmentId'] = self._serialize.url('environment_id', environment_id, 'int') + if resource_id is not None: + route_values['resourceId'] = self._serialize.url('resource_id', resource_id, 'int') + response = self._send(http_method='GET', + location_id='73fba52f-15ab-42b3-a538-ce67a9223a04', + version='6.0-preview.1', + route_values=route_values) + return self._deserialize('KubernetesResource', response) + 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='6.0-preview.1', + version='6.0', 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 +565,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='6.0-preview.1', + version='6.0', 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 +587,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='6.0-preview.1', + version='6.0', 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 +613,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='6.0-preview.1', + version='6.0', 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 +632,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='6.0-preview.1', + version='6.0', 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 +649,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='6.0-preview.1', + version='6.0', route_values=route_values, content=content) return self._deserialize('TaskAgentPool', response) @@ -988,9 +1179,72 @@ def get_variable_groups_by_id(self, project, group_ids): query_parameters=query_parameters) return self._deserialize('[VariableGroup]', self._unwrap_collection(response)) + def get_virtual_machines(self, project, environment_id, resource_id, continuation_token=None, name=None, partial_name_match=None, tags=None, top=None): + """GetVirtualMachines. + [Preview API] + :param str project: Project ID or project name + :param int environment_id: + :param int resource_id: + :param str continuation_token: + :param str name: + :param bool partial_name_match: + :param [str] tags: + :param int top: + :rtype: :class:`<[VirtualMachine]> ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if environment_id is not None: + route_values['environmentId'] = self._serialize.url('environment_id', environment_id, 'int') + if resource_id is not None: + route_values['resourceId'] = self._serialize.url('resource_id', resource_id, 'int') + query_parameters = {} + if continuation_token is not None: + query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'str') + if name is not None: + query_parameters['name'] = self._serialize.query('name', name, 'str') + if partial_name_match is not None: + query_parameters['partialNameMatch'] = self._serialize.query('partial_name_match', partial_name_match, 'bool') + if tags is not None: + tags = ",".join(tags) + query_parameters['tags'] = self._serialize.query('tags', tags, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query('top', top, 'int') + response = self._send(http_method='GET', + location_id='48700676-2ba5-4282-8ec8-083280d169c7', + version='6.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('[VirtualMachine]', self._unwrap_collection(response)) + + def update_virtual_machines(self, machines, project, environment_id, resource_id): + """UpdateVirtualMachines. + [Preview API] + :param [VirtualMachine] machines: + :param str project: Project ID or project name + :param int environment_id: + :param int resource_id: + :rtype: [VirtualMachine] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if environment_id is not None: + route_values['environmentId'] = self._serialize.url('environment_id', environment_id, 'int') + if resource_id is not None: + route_values['resourceId'] = self._serialize.url('resource_id', resource_id, 'int') + content = self._serialize.body(machines, '[VirtualMachine]') + response = self._send(http_method='PATCH', + location_id='48700676-2ba5-4282-8ec8-083280d169c7', + version='6.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('[VirtualMachine]', self._unwrap_collection(response)) + def get_yaml_schema(self, validate_task_names=None): """GetYamlSchema. - [Preview API] GET the Yaml schema used for Yaml file validation. + GET the Yaml schema used for Yaml file validation. :param bool validate_task_names: Whether the schema should validate that tasks are actually installed (useful for offline tools where you don't want validation). :rtype: object """ @@ -999,7 +1253,7 @@ def get_yaml_schema(self, validate_task_names=None): query_parameters['validateTaskNames'] = self._serialize.query('validate_task_names', validate_task_names, 'bool') response = self._send(http_method='GET', location_id='1f9990b9-1dba-441f-9c2e-6485888c42b6', - version='6.0-preview.1', + version='6.0', query_parameters=query_parameters) return self._deserialize('object', response) diff --git a/azure-devops/azure/devops/v6_0/test/test_client.py b/azure-devops/azure/devops/v6_0/test/test_client.py index cc5fb323..0c4f279e 100644 --- a/azure-devops/azure/devops/v6_0/test/test_client.py +++ b/azure-devops/azure/devops/v6_0/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='6.0-preview.3', + version='6.0', 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='6.0-preview.3', + version='6.0', 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='6.0-preview.3', + version='6.0', 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='6.0-preview.3', + version='6.0', 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='6.0-preview.2', + version='6.0', 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='6.0-preview.2', + version='6.0', 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='6.0-preview.2', + version='6.0', 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='6.0-preview.6', + version='6.0', 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='6.0-preview.6', + version='6.0', 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='6.0-preview.6', + version='6.0', 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='6.0-preview.6', + version='6.0', 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='6.0-preview.3', + version='6.0', 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='6.0-preview.3', + version='6.0', 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='6.0-preview.3', + version='6.0', 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: Default value is true. It includes details like run statistics, release, build, test environment, 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='6.0-preview.3', + version='6.0', 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='6.0-preview.3', + version='6.0', 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='6.0-preview.3', + version='6.0', 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='6.0-preview.3', + version='6.0', 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='6.0-preview.3', + version='6.0', 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='6.0-preview.3', + version='6.0', 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='6.0-preview.3', + version='6.0', 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='6.0-preview.3', + version='6.0', 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='6.0-preview.3', + version='6.0', route_values=route_values, content=content) return self._deserialize('[SuiteTestCase]', self._unwrap_collection(response)) diff --git a/azure-devops/azure/devops/v6_0/test_plan/__init__.py b/azure-devops/azure/devops/v6_0/test_plan/__init__.py index 9633f2d2..e37d1710 100644 --- a/azure-devops/azure/devops/v6_0/test_plan/__init__.py +++ b/azure-devops/azure/devops/v6_0/test_plan/__init__.py @@ -14,6 +14,9 @@ 'CloneOperationCommonResponse', 'CloneOptions', 'CloneStatistics', + 'CloneTestCaseOperationInformation', + 'CloneTestCaseOptions', + 'CloneTestCaseParams', 'CloneTestPlanOperationInformation', 'CloneTestPlanParams', 'CloneTestSuiteOperationInformation', @@ -24,6 +27,8 @@ 'GraphSubjectBase', 'IdentityRef', 'LastResultDetails', + 'LibraryWorkItemsData', + 'LibraryWorkItemsDataProviderRequest', 'NameValuePair', 'PointAssignment', 'ReferenceLinks', @@ -32,6 +37,7 @@ 'SourceTestPlanInfo', 'SourceTestplanResponse', 'SourceTestSuiteInfo', + 'SourceTestSuiteResponse', 'SuiteEntry', 'SuiteEntryUpdateParams', 'SuiteTestCaseCreateUpdateParameters', @@ -43,6 +49,7 @@ 'TestConfiguration', 'TestConfigurationCreateUpdateParameters', 'TestConfigurationReference', + 'TestEntityCount', 'TestEnvironment', 'TestOutcomeSettings', 'TestPlan', @@ -50,9 +57,9 @@ 'TestPlanDetailedReference', 'TestPlanReference', 'TestPlansHubRefreshData', + 'TestPlansLibraryWorkItemFilter', 'TestPlanUpdateParams', 'TestPoint', - 'TestPointCount', 'TestPointDetailedReference', 'TestPointResults', 'TestPointUpdateParams', diff --git a/azure-devops/azure/devops/v6_0/test_plan/models.py b/azure-devops/azure/devops/v6_0/test_plan/models.py index ff4b5b48..3e2fd7c7 100644 --- a/azure-devops/azure/devops/v6_0/test_plan/models.py +++ b/azure-devops/azure/devops/v6_0/test_plan/models.py @@ -141,6 +141,93 @@ def __init__(self, cloned_requirements_count=None, cloned_shared_steps_count=Non self.total_test_cases_count = total_test_cases_count +class CloneTestCaseOperationInformation(Model): + """ + :param clone_operation_response: Various information related to the clone + :type clone_operation_response: :class:`CloneOperationCommonResponse ` + :param clone_options: Test Plan Clone create parameters + :type clone_options: :class:`CloneTestCaseOptions ` + :param destination_test_suite: Information of destination Test Suite + :type destination_test_suite: :class:`TestSuiteReferenceWithProject ` + :param source_test_suite: Information of source Test Suite + :type source_test_suite: :class:`SourceTestSuiteResponse ` + """ + + _attribute_map = { + 'clone_operation_response': {'key': 'cloneOperationResponse', 'type': 'CloneOperationCommonResponse'}, + 'clone_options': {'key': 'cloneOptions', 'type': 'CloneTestCaseOptions'}, + 'destination_test_suite': {'key': 'destinationTestSuite', 'type': 'TestSuiteReferenceWithProject'}, + 'source_test_suite': {'key': 'sourceTestSuite', 'type': 'SourceTestSuiteResponse'} + } + + def __init__(self, clone_operation_response=None, clone_options=None, destination_test_suite=None, source_test_suite=None): + super(CloneTestCaseOperationInformation, self).__init__() + self.clone_operation_response = clone_operation_response + self.clone_options = clone_options + self.destination_test_suite = destination_test_suite + self.source_test_suite = source_test_suite + + +class CloneTestCaseOptions(Model): + """ + :param include_attachments: If set to true, include the attachments + :type include_attachments: bool + :param include_links: If set to true, include the links + :type include_links: bool + :param related_link_comment: Comment on the link that will link the new clone test case to the original Set null for no comment + :type related_link_comment: str + """ + + _attribute_map = { + 'include_attachments': {'key': 'includeAttachments', 'type': 'bool'}, + 'include_links': {'key': 'includeLinks', 'type': 'bool'}, + 'related_link_comment': {'key': 'relatedLinkComment', 'type': 'str'} + } + + def __init__(self, include_attachments=None, include_links=None, related_link_comment=None): + super(CloneTestCaseOptions, self).__init__() + self.include_attachments = include_attachments + self.include_links = include_links + self.related_link_comment = related_link_comment + + +class CloneTestCaseParams(Model): + """ + Parameters for Test Suite clone operation + + :param clone_options: Test Case Clone create parameters + :type clone_options: :class:`CloneTestCaseOptions ` + :param destination_test_plan: Information about destination Test Plan + :type destination_test_plan: :class:`TestPlanReference ` + :param destination_test_suite: Information about destination Test Suite + :type destination_test_suite: :class:`DestinationTestSuiteInfo ` + :param source_test_plan: Information about source Test Plan + :type source_test_plan: :class:`TestPlanReference ` + :param source_test_suite: Information about source Test Suite + :type source_test_suite: :class:`SourceTestSuiteInfo ` + :param test_case_ids: Test Case IDs + :type test_case_ids: list of int + """ + + _attribute_map = { + 'clone_options': {'key': 'cloneOptions', 'type': 'CloneTestCaseOptions'}, + 'destination_test_plan': {'key': 'destinationTestPlan', 'type': 'TestPlanReference'}, + 'destination_test_suite': {'key': 'destinationTestSuite', 'type': 'DestinationTestSuiteInfo'}, + 'source_test_plan': {'key': 'sourceTestPlan', 'type': 'TestPlanReference'}, + 'source_test_suite': {'key': 'sourceTestSuite', 'type': 'SourceTestSuiteInfo'}, + 'test_case_ids': {'key': 'testCaseIds', 'type': '[int]'} + } + + def __init__(self, clone_options=None, destination_test_plan=None, destination_test_suite=None, source_test_plan=None, source_test_suite=None, test_case_ids=None): + super(CloneTestCaseParams, self).__init__() + self.clone_options = clone_options + self.destination_test_plan = destination_test_plan + self.destination_test_suite = destination_test_suite + self.source_test_plan = source_test_plan + self.source_test_suite = source_test_suite + self.test_case_ids = test_case_ids + + class CloneTestPlanOperationInformation(Model): """ Response for Test Plan clone operation @@ -402,6 +489,88 @@ def __init__(self, date_completed=None, duration=None, run_by=None): self.run_by = run_by +class LibraryWorkItemsData(Model): + """ + This data model is used in Work item-based tabs of Test Plans Library. + + :param column_options: Specifies the column option field names + :type column_options: list of str + :param continuation_token: Continuation token to fetch next set of elements. Present only when HasMoreElements is true. + :type continuation_token: str + :param exceeded_work_item_query_limit: Boolean indicating if the WIQL query has exceeded the limit of items returned. + :type exceeded_work_item_query_limit: bool + :param has_more_elements: Boolean indicating if there are more elements present than what are being sent. + :type has_more_elements: bool + :param return_code: Specifies if there was an error while execution of data provider. + :type return_code: object + :param work_item_ids: List of work items returned when OrderByField is sent something other than Id. + :type work_item_ids: list of int + :param work_items: List of work items to be returned. + :type work_items: list of :class:`WorkItemDetails ` + """ + + _attribute_map = { + 'column_options': {'key': 'columnOptions', 'type': '[str]'}, + 'continuation_token': {'key': 'continuationToken', 'type': 'str'}, + 'exceeded_work_item_query_limit': {'key': 'exceededWorkItemQueryLimit', 'type': 'bool'}, + 'has_more_elements': {'key': 'hasMoreElements', 'type': 'bool'}, + 'return_code': {'key': 'returnCode', 'type': 'object'}, + 'work_item_ids': {'key': 'workItemIds', 'type': '[int]'}, + 'work_items': {'key': 'workItems', 'type': '[WorkItemDetails]'} + } + + def __init__(self, column_options=None, continuation_token=None, exceeded_work_item_query_limit=None, has_more_elements=None, return_code=None, work_item_ids=None, work_items=None): + super(LibraryWorkItemsData, self).__init__() + self.column_options = column_options + self.continuation_token = continuation_token + self.exceeded_work_item_query_limit = exceeded_work_item_query_limit + self.has_more_elements = has_more_elements + self.return_code = return_code + self.work_item_ids = work_item_ids + self.work_items = work_items + + +class LibraryWorkItemsDataProviderRequest(Model): + """ + This is the request data contract for LibraryTestCaseDataProvider. + + :param column_options: Specifies the list of column options to show in test cases table. + :type column_options: list of str + :param continuation_token: The continuation token required for paging of work items. This is required when getting subsequent sets of work items when OrderByField is Id. + :type continuation_token: str + :param filter_values: List of filter values to be supplied. Currently supported filters are Title, State, AssignedTo, Priority, AreaPath. + :type filter_values: list of :class:`TestPlansLibraryWorkItemFilter ` + :param is_ascending: Whether the data is to be sorted in ascending or descending order. When not supplied, defaults to descending. + :type is_ascending: bool + :param library_query_type: The type of query to run. + :type library_query_type: object + :param order_by_field: Work item field on which to order the results. When not supplied, defaults to work item IDs. + :type order_by_field: str + :param work_item_ids: List of work items to query for field details. This is required when getting subsequent sets of work item fields when OrderByField is other than Id. + :type work_item_ids: list of int + """ + + _attribute_map = { + 'column_options': {'key': 'columnOptions', 'type': '[str]'}, + 'continuation_token': {'key': 'continuationToken', 'type': 'str'}, + 'filter_values': {'key': 'filterValues', 'type': '[TestPlansLibraryWorkItemFilter]'}, + 'is_ascending': {'key': 'isAscending', 'type': 'bool'}, + 'library_query_type': {'key': 'libraryQueryType', 'type': 'object'}, + 'order_by_field': {'key': 'orderByField', 'type': 'str'}, + 'work_item_ids': {'key': 'workItemIds', 'type': '[int]'} + } + + def __init__(self, column_options=None, continuation_token=None, filter_values=None, is_ascending=None, library_query_type=None, order_by_field=None, work_item_ids=None): + super(LibraryWorkItemsDataProviderRequest, self).__init__() + self.column_options = column_options + self.continuation_token = continuation_token + self.filter_values = filter_values + self.is_ascending = is_ascending + self.library_query_type = library_query_type + self.order_by_field = order_by_field + self.work_item_ids = work_item_ids + + class NameValuePair(Model): """ Name value pair @@ -843,6 +1012,35 @@ def __init__(self, id=None, name=None): self.name = name +class TestEntityCount(Model): + """ + Test Entity Count Used to store test cases count (define tab) and test point count (execute tab) Used to store test cases count (define tab) and test point count (execute tab) + + :param count: Test Entity Count + :type count: int + :param test_plan_id: Test Plan under which the Test Entities are + :type test_plan_id: int + :param test_suite_id: Test Suite under which the Test Entities are + :type test_suite_id: int + :param total_count: Total test entities in the suite without the applied filters + :type total_count: int + """ + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + 'test_plan_id': {'key': 'testPlanId', 'type': 'int'}, + 'test_suite_id': {'key': 'testSuiteId', 'type': 'int'}, + 'total_count': {'key': 'totalCount', 'type': 'int'} + } + + def __init__(self, count=None, test_plan_id=None, test_suite_id=None, total_count=None): + super(TestEntityCount, self).__init__() + self.count = count + self.test_plan_id = test_plan_id + self.test_suite_id = test_suite_id + self.total_count = total_count + + class TestEnvironment(Model): """ Test environment Detail. @@ -991,6 +1189,8 @@ class TestPlansHubRefreshData(Model): :type execute_column_option_fields: list of str :param is_advanced_extension_enabled: :type is_advanced_extension_enabled: bool + :param selected_pivot_id: + :type selected_pivot_id: str :param selected_suite_id: :type selected_suite_id: int :param test_case_page_size: @@ -1018,6 +1218,7 @@ class TestPlansHubRefreshData(Model): 'error_message': {'key': 'errorMessage', 'type': 'str'}, 'execute_column_option_fields': {'key': 'executeColumnOptionFields', 'type': '[str]'}, 'is_advanced_extension_enabled': {'key': 'isAdvancedExtensionEnabled', 'type': 'bool'}, + 'selected_pivot_id': {'key': 'selectedPivotId', 'type': 'str'}, 'selected_suite_id': {'key': 'selectedSuiteId', 'type': 'int'}, 'test_case_page_size': {'key': 'testCasePageSize', 'type': 'int'}, 'test_cases': {'key': 'testCases', 'type': '[TestCase]'}, @@ -1030,12 +1231,13 @@ class TestPlansHubRefreshData(Model): 'test_suites_continuation_token': {'key': 'testSuitesContinuationToken', 'type': 'str'} } - def __init__(self, define_column_option_fields=None, error_message=None, execute_column_option_fields=None, is_advanced_extension_enabled=None, selected_suite_id=None, test_case_page_size=None, test_cases=None, test_cases_continuation_token=None, test_plan=None, test_point_page_size=None, test_points=None, test_points_continuation_token=None, test_suites=None, test_suites_continuation_token=None): + def __init__(self, define_column_option_fields=None, error_message=None, execute_column_option_fields=None, is_advanced_extension_enabled=None, selected_pivot_id=None, selected_suite_id=None, test_case_page_size=None, test_cases=None, test_cases_continuation_token=None, test_plan=None, test_point_page_size=None, test_points=None, test_points_continuation_token=None, test_suites=None, test_suites_continuation_token=None): super(TestPlansHubRefreshData, self).__init__() self.define_column_option_fields = define_column_option_fields self.error_message = error_message self.execute_column_option_fields = execute_column_option_fields self.is_advanced_extension_enabled = is_advanced_extension_enabled + self.selected_pivot_id = selected_pivot_id self.selected_suite_id = selected_suite_id self.test_case_page_size = test_case_page_size self.test_cases = test_cases @@ -1048,6 +1250,31 @@ def __init__(self, define_column_option_fields=None, error_message=None, execute self.test_suites_continuation_token = test_suites_continuation_token +class TestPlansLibraryWorkItemFilter(Model): + """ + Container to hold information about a filter being applied in Test Plans Library. + + :param field_name: Work item field name on which the items are to be filtered. + :type field_name: str + :param field_values: Work item field values corresponding to the field name. + :type field_values: list of str + :param filter_mode: Mode of the filter. + :type filter_mode: object + """ + + _attribute_map = { + 'field_name': {'key': 'fieldName', 'type': 'str'}, + 'field_values': {'key': 'fieldValues', 'type': '[str]'}, + 'filter_mode': {'key': 'filterMode', 'type': 'object'} + } + + def __init__(self, field_name=None, field_values=None, filter_mode=None): + super(TestPlansLibraryWorkItemFilter, self).__init__() + self.field_name = field_name + self.field_values = field_values + self.filter_mode = filter_mode + + class TestPlanUpdateParams(TestPlanCreateParams): """ The test plan update parameters. @@ -1186,35 +1413,6 @@ def __init__(self, comment=None, configuration=None, id=None, is_active=None, is self.test_suite = test_suite -class TestPointCount(Model): - """ - Test Point Count - - :param count: Test Point Count - :type count: int - :param test_plan_id: Test Plan under which the Test Points are - :type test_plan_id: int - :param test_suite_id: Test Suite under which the Test Points are - :type test_suite_id: int - :param total_count: Total test points in the suite without the applied filters - :type total_count: int - """ - - _attribute_map = { - 'count': {'key': 'count', 'type': 'int'}, - 'test_plan_id': {'key': 'testPlanId', 'type': 'int'}, - 'test_suite_id': {'key': 'testSuiteId', 'type': 'int'}, - 'total_count': {'key': 'totalCount', 'type': 'int'} - } - - def __init__(self, count=None, test_plan_id=None, test_suite_id=None, total_count=None): - super(TestPointCount, self).__init__() - self.count = count - self.test_plan_id = test_plan_id - self.test_suite_id = test_suite_id - self.total_count = total_count - - class TestPointDetailedReference(Model): """ :param configuration: @@ -1640,6 +1838,33 @@ def __init__(self, id=None, name=None, project=None, suite_ids=None): self.suite_ids = suite_ids +class SourceTestSuiteResponse(TestSuiteReference): + """ + Source Test Suite Response for Test Case clone operation + + :param id: ID of the test suite. + :type id: int + :param name: Name of the test suite. + :type name: str + :param project: project reference + :type project: :class:`TeamProjectReference ` + :param test_case_ids: Id of suites to be cloned inside source Test Plan + :type test_case_ids: list of int + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'project': {'key': 'project', 'type': 'TeamProjectReference'}, + 'test_case_ids': {'key': 'testCaseIds', 'type': '[int]'} + } + + def __init__(self, id=None, name=None, project=None, test_case_ids=None): + super(SourceTestSuiteResponse, self).__init__(id=id, name=name) + self.project = project + self.test_case_ids = test_case_ids + + class SuiteEntry(SuiteEntryUpdateParams): """ A suite entry defines properties for a test suite. @@ -1988,6 +2213,9 @@ def __init__(self, default_configurations=None, default_testers=None, inherit_de 'CloneOperationCommonResponse', 'CloneOptions', 'CloneStatistics', + 'CloneTestCaseOperationInformation', + 'CloneTestCaseOptions', + 'CloneTestCaseParams', 'CloneTestPlanOperationInformation', 'CloneTestPlanParams', 'CloneTestSuiteOperationInformation', @@ -1997,6 +2225,8 @@ def __init__(self, default_configurations=None, default_testers=None, inherit_de 'GraphSubjectBase', 'IdentityRef', 'LastResultDetails', + 'LibraryWorkItemsData', + 'LibraryWorkItemsDataProviderRequest', 'NameValuePair', 'PointAssignment', 'ReferenceLinks', @@ -2013,14 +2243,15 @@ def __init__(self, default_configurations=None, default_testers=None, inherit_de 'TestCaseResultsData', 'TestConfigurationCreateUpdateParameters', 'TestConfigurationReference', + 'TestEntityCount', 'TestEnvironment', 'TestOutcomeSettings', 'TestPlanCreateParams', 'TestPlanReference', 'TestPlansHubRefreshData', + 'TestPlansLibraryWorkItemFilter', 'TestPlanUpdateParams', 'TestPoint', - 'TestPointCount', 'TestPointDetailedReference', 'TestPointResults', 'TestPointUpdateParams', @@ -2034,6 +2265,7 @@ def __init__(self, default_configurations=None, default_testers=None, inherit_de 'WorkItemDetails', 'DestinationTestPlanCloneParams', 'SourceTestplanResponse', + 'SourceTestSuiteResponse', 'SuiteEntry', 'TestConfiguration', 'TestPlan', diff --git a/azure-devops/azure/devops/v6_0/test_plan/test_plan_client.py b/azure-devops/azure/devops/v6_0/test_plan/test_plan_client.py index 864b0201..a6dfc239 100644 --- a/azure-devops/azure/devops/v6_0/test_plan/test_plan_client.py +++ b/azure-devops/azure/devops/v6_0/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='6.0-preview.1', + version='6.0', query_parameters=query_parameters) return self._deserialize('[TestSuite]', self._unwrap_collection(response)) @@ -548,6 +548,42 @@ def update_suite_test_cases(self, suite_test_case_create_update_parameters, proj content=content) return self._deserialize('[TestCase]', self._unwrap_collection(response)) + def clone_test_case(self, clone_request_body, project): + """CloneTestCase. + [Preview API] + :param :class:` ` clone_request_body: + :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(clone_request_body, 'CloneTestCaseParams') + response = self._send(http_method='POST', + location_id='529b2b8d-82f4-4893-b1e4-1e74ea534673', + version='6.0-preview.2', + route_values=route_values, + content=content) + return self._deserialize('CloneTestCaseOperationInformation', response) + + def get_test_case_clone_information(self, project, clone_operation_id): + """GetTestCaseCloneInformation. + [Preview API] Get clone information. + :param str project: Project ID or project name + :param int clone_operation_id: Operation ID returned when we queue a clone operation + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if clone_operation_id is not None: + route_values['cloneOperationId'] = self._serialize.url('clone_operation_id', clone_operation_id, 'int') + response = self._send(http_method='GET', + location_id='529b2b8d-82f4-4893-b1e4-1e74ea534673', + version='6.0-preview.2', + route_values=route_values) + return self._deserialize('CloneTestCaseOperationInformation', response) + def delete_test_case(self, project, test_case_id): """DeleteTestCase. [Preview API] Delete a test case. @@ -637,7 +673,7 @@ def get_points(self, project, plan_id, suite_id, point_ids, return_identity_ref= query_parameters=query_parameters) return self._deserialize('[TestPoint]', self._unwrap_collection(response)) - def get_points_list(self, project, plan_id, suite_id, test_point_ids=None, test_case_id=None, continuation_token=None, return_identity_ref=None, include_point_details=None): + def get_points_list(self, project, plan_id, suite_id, test_point_ids=None, test_case_id=None, continuation_token=None, return_identity_ref=None, include_point_details=None, is_recursive=None): """GetPointsList. [Preview API] Get all the points inside a suite based on some filters :param str project: Project ID or project name @@ -648,6 +684,7 @@ def get_points_list(self, project, plan_id, suite_id, test_point_ids=None, test_ :param str continuation_token: If the list of test point returned is not complete, a continuation token to query next batch of test points is included in the response header as "x-ms-continuationtoken". Omit this parameter to get the first batch of test points. :param bool return_identity_ref: If set to true, returns the AssignedTo field in TestCaseReference as IdentityRef object. :param bool include_point_details: If set to false, will get a smaller payload containing only basic details about the test point object + :param bool is_recursive: If set to true, will also fetch test points belonging to child suites recursively. :rtype: :class:`<[TestPoint]> ` """ route_values = {} @@ -668,6 +705,8 @@ def get_points_list(self, project, plan_id, suite_id, test_point_ids=None, test_ query_parameters['returnIdentityRef'] = self._serialize.query('return_identity_ref', return_identity_ref, 'bool') if include_point_details is not None: query_parameters['includePointDetails'] = self._serialize.query('include_point_details', include_point_details, 'bool') + if is_recursive is not None: + query_parameters['isRecursive'] = self._serialize.query('is_recursive', is_recursive, 'bool') response = self._send(http_method='GET', location_id='52df686e-bae4-4334-b0ee-b6cf4e6f6b73', version='6.0-preview.2', diff --git a/azure-devops/azure/devops/v6_0/test_results/__init__.py b/azure-devops/azure/devops/v6_0/test_results/__init__.py index 6a83c1d2..d1b39657 100644 --- a/azure-devops/azure/devops/v6_0/test_results/__init__.py +++ b/azure-devops/azure/devops/v6_0/test_results/__init__.py @@ -37,6 +37,7 @@ 'IdentityRef', 'JobReference', 'ModuleCoverage', + 'NewTestResultLoggingSettings', 'PhaseReference', 'PipelineReference', 'PipelineTestMetrics', diff --git a/azure-devops/azure/devops/v6_0/test_results/models.py b/azure-devops/azure/devops/v6_0/test_results/models.py index d51ecd0d..ff97b729 100644 --- a/azure-devops/azure/devops/v6_0/test_results/models.py +++ b/azure-devops/azure/devops/v6_0/test_results/models.py @@ -860,6 +860,21 @@ def __init__(self, block_count=None, block_data=None, file_url=None, functions=N self.statistics = statistics +class NewTestResultLoggingSettings(Model): + """ + :param log_new_tests: LogNewTests defines whether or not we will record new test cases coming into the system + :type log_new_tests: bool + """ + + _attribute_map = { + 'log_new_tests': {'key': 'logNewTests', 'type': 'bool'} + } + + def __init__(self, log_new_tests=None): + super(NewTestResultLoggingSettings, self).__init__() + self.log_new_tests = log_new_tests + + class PhaseReference(Model): """ Phase in pipeline @@ -2826,15 +2841,19 @@ class TestResultsSettings(Model): """ :param flaky_settings: IsRequired and EmitDefaultValue are passed as false as if users doesn't pass anything, should not come for serialisation and deserialisation. :type flaky_settings: :class:`FlakySettings ` + :param new_test_result_logging_settings: + :type new_test_result_logging_settings: :class:`NewTestResultLoggingSettings ` """ _attribute_map = { - 'flaky_settings': {'key': 'flakySettings', 'type': 'FlakySettings'} + 'flaky_settings': {'key': 'flakySettings', 'type': 'FlakySettings'}, + 'new_test_result_logging_settings': {'key': 'newTestResultLoggingSettings', 'type': 'NewTestResultLoggingSettings'} } - def __init__(self, flaky_settings=None): + def __init__(self, flaky_settings=None, new_test_result_logging_settings=None): super(TestResultsSettings, self).__init__() self.flaky_settings = flaky_settings + self.new_test_result_logging_settings = new_test_result_logging_settings class TestResultSummary(Model): @@ -2876,15 +2895,19 @@ class TestResultsUpdateSettings(Model): """ :param flaky_settings: FlakySettings defines Flaky Settings Data. :type flaky_settings: :class:`FlakySettings ` + :param new_test_result_logging_settings: NewTestResultLoggingSettings defines the setting for logging new test results + :type new_test_result_logging_settings: :class:`NewTestResultLoggingSettings ` """ _attribute_map = { - 'flaky_settings': {'key': 'flakySettings', 'type': 'FlakySettings'} + 'flaky_settings': {'key': 'flakySettings', 'type': 'FlakySettings'}, + 'new_test_result_logging_settings': {'key': 'newTestResultLoggingSettings', 'type': 'NewTestResultLoggingSettings'} } - def __init__(self, flaky_settings=None): + def __init__(self, flaky_settings=None, new_test_result_logging_settings=None): super(TestResultsUpdateSettings, self).__init__() self.flaky_settings = flaky_settings + self.new_test_result_logging_settings = new_test_result_logging_settings class TestResultTrendFilter(Model): @@ -3527,6 +3550,7 @@ def __init__(self, comment=None, completed_date=None, duration_in_ms=None, error 'IdentityRef', 'JobReference', 'ModuleCoverage', + 'NewTestResultLoggingSettings', 'PhaseReference', 'PipelineReference', 'PipelineTestMetrics', diff --git a/azure-devops/azure/devops/v6_0/test_results/test_results_client.py b/azure-devops/azure/devops/v6_0/test_results/test_results_client.py index 2a7f7084..8c96d42c 100644 --- a/azure-devops/azure/devops/v6_0/test_results/test_results_client.py +++ b/azure-devops/azure/devops/v6_0/test_results/test_results_client.py @@ -25,6 +25,50 @@ def __init__(self, base_url=None, creds=None): resource_area_identifier = 'c83eaf52-edf3-4034-ae11-17d38f25404c' + def query_test_results_meta_data(self, test_case_reference_ids, project, details_to_include=None): + """QueryTestResultsMetaData. + [Preview API] Get list of test Result meta data details for corresponding testcasereferenceId + :param [str] test_case_reference_ids: TestCaseReference Ids of the test Result to be queried, comma separated list of valid ids (limit no. of ids 200). + :param str project: Project ID or project name + :param str details_to_include: Details to include with test results metadata. Default is None. Other values are FlakyIdentifiers. + :rtype: [TestResultMetaData] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if details_to_include is not None: + query_parameters['detailsToInclude'] = self._serialize.query('details_to_include', details_to_include, 'str') + content = self._serialize.body(test_case_reference_ids, '[str]') + response = self._send(http_method='POST', + location_id='b72ff4c0-4341-4213-ba27-f517cf341c95', + version='6.0-preview.4', + route_values=route_values, + query_parameters=query_parameters, + content=content) + return self._deserialize('[TestResultMetaData]', self._unwrap_collection(response)) + + def update_test_results_meta_data(self, test_result_meta_data_update_input, project, test_case_reference_id): + """UpdateTestResultsMetaData. + [Preview API] Update properties of test result meta data + :param :class:` ` test_result_meta_data_update_input: TestResultMetaData update input TestResultMetaDataUpdateInput + :param str project: Project ID or project name + :param int test_case_reference_id: TestCaseReference Id of Test Result to be updated. + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if test_case_reference_id is not None: + route_values['testCaseReferenceId'] = self._serialize.url('test_case_reference_id', test_case_reference_id, 'int') + content = self._serialize.body(test_result_meta_data_update_input, 'TestResultMetaDataUpdateInput') + response = self._send(http_method='PATCH', + location_id='b72ff4c0-4341-4213-ba27-f517cf341c95', + version='6.0-preview.4', + route_values=route_values, + content=content) + return self._deserialize('TestResultMetaData', response) + def get_test_result_logs(self, project, run_id, result_id, type, directory_path=None, file_name_prefix=None, fetch_meta_data=None, top=None, continuation_token=None): """GetTestResultLogs. [Preview API] Get list of test result attachments reference diff --git a/azure-devops/azure/devops/v6_0/tfvc/tfvc_client.py b/azure-devops/azure/devops/v6_0/tfvc/tfvc_client.py index 80b0c17f..86ea12c2 100644 --- a/azure-devops/azure/devops/v6_0/tfvc/tfvc_client.py +++ b/azure-devops/azure/devops/v6_0/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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TfvcBranchRef]', self._unwrap_collection(response)) def get_changeset_changes(self, id=None, skip=None, top=None, continuation_token=None): """GetChangesetChanges. - [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 @@ -127,14 +127,14 @@ def get_changeset_changes(self, id=None, skip=None, top=None, continuation_token query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'str') response = self._send(http_method='GET', location_id='f32b86f2-15b9-4fe6-81b1-6f8938617ee5', - version='6.0-preview.1', + version='6.0', 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:` ` @@ -145,14 +145,14 @@ def create_changeset(self, changeset, project=None): content = self._serialize.body(changeset, 'TfvcChangeset') response = self._send(http_method='POST', location_id='0bc8f0a4-6bfb-42a9-ba84-139da7b99c49', - version='6.0-preview.3', + version='6.0', 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 @@ -209,14 +209,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='6.0-preview.3', + version='6.0', 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 @@ -258,27 +258,27 @@ def get_changesets(self, project=None, max_comment_length=None, skip=None, top=N query_parameters['searchCriteria.mappings'] = search_criteria.mappings response = self._send(http_method='GET', location_id='0bc8f0a4-6bfb-42a9-ba84-139da7b99c49', - version='6.0-preview.3', + version='6.0', 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='6.0-preview.1', + version='6.0', 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. :rtype: [AssociatedWorkItem] """ @@ -287,13 +287,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='6.0-preview.1', + version='6.0', 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]] @@ -304,14 +304,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='6.0-preview.1', + version='6.0', 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 @@ -322,7 +322,7 @@ def get_items_batch_zip(self, item_request_data, project=None, **kwargs): content = self._serialize.body(item_request_data, 'TfvcItemRequestData') response = self._send(http_method='POST', location_id='fe6f827b-5f64-480f-b8af-1eca3b80e833', - version='6.0-preview.1', + version='6.0', route_values=route_values, content=content, accept_media_type='application/zip') @@ -334,7 +334,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. @@ -370,14 +370,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='6.0-preview.1', + version='6.0', 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. @@ -413,7 +413,7 @@ def get_item_content(self, path, project=None, file_name=None, download=None, sc query_parameters['includeContent'] = self._serialize.query('include_content', include_content, 'bool') response = self._send(http_method='GET', location_id='ba9fc436-9a38-4578-89d6-e4f3241f5040', - version='6.0-preview.1', + version='6.0', route_values=route_values, query_parameters=query_parameters, accept_media_type='application/octet-stream') @@ -425,7 +425,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). @@ -452,14 +452,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='6.0-preview.1', + version='6.0', 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. @@ -495,7 +495,7 @@ def get_item_text(self, path, project=None, file_name=None, download=None, scope query_parameters['includeContent'] = self._serialize.query('include_content', include_content, 'bool') response = self._send(http_method='GET', location_id='ba9fc436-9a38-4578-89d6-e4f3241f5040', - version='6.0-preview.1', + version='6.0', route_values=route_values, query_parameters=query_parameters, accept_media_type='text/plain') @@ -507,7 +507,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. @@ -543,7 +543,7 @@ def get_item_zip(self, path, project=None, file_name=None, download=None, scope_ query_parameters['includeContent'] = self._serialize.query('include_content', include_content, 'bool') response = self._send(http_method='GET', location_id='ba9fc436-9a38-4578-89d6-e4f3241f5040', - version='6.0-preview.1', + version='6.0', route_values=route_values, query_parameters=query_parameters, accept_media_type='application/zip') @@ -555,7 +555,7 @@ def get_item_zip(self, path, project=None, file_name=None, download=None, scope_ def get_label_items(self, label_id, top=None, skip=None): """GetLabelItems. - [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 @@ -571,14 +571,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='6.0-preview.1', + version='6.0', 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 @@ -605,14 +605,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='6.0-preview.1', + version='6.0', 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, defaults to 100 when undefined @@ -642,14 +642,14 @@ def get_labels(self, request_data, project=None, top=None, skip=None): query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') response = self._send(http_method='GET', location_id='a5d9bd7f-b661-4d0e-b9be-d9c16affae54', - version='6.0-preview.1', + version='6.0', 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 @@ -664,13 +664,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='6.0-preview.1', + version='6.0', 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:` ` @@ -695,13 +695,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='6.0-preview.1', + version='6.0', 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 @@ -729,13 +729,13 @@ def get_shelvesets(self, request_data=None, top=None, skip=None): query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') response = self._send(http_method='GET', location_id='e36d44fb-e907-4b0a-b194-f83f1ed32ad3', - version='6.0-preview.1', + version='6.0', 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] """ @@ -744,7 +744,7 @@ def get_shelveset_work_items(self, shelveset_id): query_parameters['shelvesetId'] = self._serialize.query('shelveset_id', shelveset_id, 'str') response = self._send(http_method='GET', location_id='a7a0c1c1-373e-425a-b031-a519474d743d', - version='6.0-preview.1', + version='6.0', query_parameters=query_parameters) return self._deserialize('[AssociatedWorkItem]', self._unwrap_collection(response)) diff --git a/azure-devops/azure/devops/v6_0/token_admin/__init__.py b/azure-devops/azure/devops/v6_0/token_admin/__init__.py index 71efd461..69575947 100644 --- a/azure-devops/azure/devops/v6_0/token_admin/__init__.py +++ b/azure-devops/azure/devops/v6_0/token_admin/__init__.py @@ -11,6 +11,7 @@ __all__ = [ 'SessionToken', + 'SessionTokenResult', 'TokenAdminPagedSessionTokens', 'TokenAdminRevocation', 'TokenAdminRevocationRule', diff --git a/azure-devops/azure/devops/v6_0/token_admin/models.py b/azure-devops/azure/devops/v6_0/token_admin/models.py index 21fa1afd..a2ab8f35 100644 --- a/azure-devops/azure/devops/v6_0/token_admin/models.py +++ b/azure-devops/azure/devops/v6_0/token_admin/models.py @@ -88,6 +88,29 @@ def __init__(self, access_id=None, alternate_token=None, authorization_id=None, self.valid_to = valid_to +class SessionTokenResult(Model): + """ + :param has_error: + :type has_error: bool + :param session_token: + :type session_token: :class:`SessionToken ` + :param session_token_error: + :type session_token_error: object + """ + + _attribute_map = { + 'has_error': {'key': 'hasError', 'type': 'bool'}, + 'session_token': {'key': 'sessionToken', 'type': 'SessionToken'}, + 'session_token_error': {'key': 'sessionTokenError', 'type': 'object'} + } + + def __init__(self, has_error=None, session_token=None, session_token_error=None): + super(SessionTokenResult, self).__init__() + self.has_error = has_error + self.session_token = session_token + self.session_token_error = session_token_error + + class TokenAdminPagedSessionTokens(Model): """ A paginated list of session tokens. Session tokens correspond to OAuth credentials such as personal access tokens (PATs) and other OAuth authorizations. @@ -149,6 +172,7 @@ def __init__(self, created_before=None, scopes=None): __all__ = [ 'SessionToken', + 'SessionTokenResult', 'TokenAdminPagedSessionTokens', 'TokenAdminRevocation', 'TokenAdminRevocationRule', diff --git a/azure-devops/azure/devops/v6_0/token_admin/token_admin_client.py b/azure-devops/azure/devops/v6_0/token_admin/token_admin_client.py index 573cba13..d9b07cc1 100644 --- a/azure-devops/azure/devops/v6_0/token_admin/token_admin_client.py +++ b/azure-devops/azure/devops/v6_0/token_admin/token_admin_client.py @@ -78,3 +78,37 @@ def revoke_authorizations(self, revocations, is_public=None): query_parameters=query_parameters, content=content) + def get_personal_access_token(self, access_token_key, is_public): + """GetPersonalAccessToken. + [Preview API] + :param str access_token_key: + :param bool is_public: + :rtype: :class:` ` + """ + query_parameters = {} + if is_public is not None: + query_parameters['isPublic'] = self._serialize.query('is_public', is_public, 'bool') + content = self._serialize.body(access_token_key, 'str') + response = self._send(http_method='POST', + location_id='11e3d37f-fa7e-4721-ab2d-2d931bd944c4', + version='6.0-preview.1', + query_parameters=query_parameters, + content=content) + return self._deserialize('SessionTokenResult', response) + + def revoke_personal_access_token(self, access_token_key, is_public): + """RevokePersonalAccessToken. + [Preview API] + :param str access_token_key: + :param bool is_public: + """ + query_parameters = {} + if is_public is not None: + query_parameters['isPublic'] = self._serialize.query('is_public', is_public, 'bool') + content = self._serialize.body(access_token_key, 'str') + self._send(http_method='PUT', + location_id='55687c95-c811-41e7-889f-25afb03eda19', + version='6.0-preview.1', + query_parameters=query_parameters, + content=content) + diff --git a/azure-devops/azure/devops/v6_0/wiki/models.py b/azure-devops/azure/devops/v6_0/wiki/models.py index 5ed1f864..2321d6a7 100644 --- a/azure-devops/azure/devops/v6_0/wiki/models.py +++ b/azure-devops/azure/devops/v6_0/wiki/models.py @@ -594,11 +594,11 @@ class WikiPagesBatchRequest(Model): """ Contract encapsulating parameters for the pages batch. - :param continuation_token: A string token that can be used for retrieving next page of Wiki Page Data if available. Otherwise null. + :param continuation_token: If the list of page data returned is not complete, a continuation token to query next batch of pages is included in the response header as "x-ms-continuationtoken". Omit this parameter to get the first batch of Wiki Page Data. :type continuation_token: str :param page_views_for_days: last N days from the current day for which page views is to be returned. It's inclusive of current day. :type page_views_for_days: int - :param top: Total count of pages on a wiki. + :param top: Total count of pages on a wiki to return. :type top: int """ diff --git a/azure-devops/azure/devops/v6_0/wiki/wiki_client.py b/azure-devops/azure/devops/v6_0/wiki/wiki_client.py index 0eface10..2a933925 100644 --- a/azure-devops/azure/devops/v6_0/wiki/wiki_client.py +++ b/azure-devops/azure/devops/v6_0/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 wiki 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='6.0-preview.1', + version='6.0', 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 wiki 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='6.0-preview.1', + version='6.0', 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 wiki name. - :param str path: Wiki page path. - :param String version: Version of the page on which the change is to be made. Mandatory for `Edit` scenario. To be populated in the If-Match header of the request. - :param str comment: Comment to be associated with the page operation. - :param :class:` ` version_descriptor: GitVersionDescriptor for the page. (Optional in case of ProjectWiki). - :rtype: :class:` ` - """ - 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='6.0-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 wiki 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='6.0-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 wiki name. - :param str path: Wiki page path. + :param str wiki_identifier: Wiki ID or wiki name.. + :param int id: Wiki page ID. :param str recursion_level: Recursion level for subpages retrieval. Defaults to `None` (Optional). - :param :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='6.0-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 wiki name. - :param str path: Wiki page path. + :param str wiki_identifier: Wiki ID or wiki name.. + :param int id: Wiki page ID. :param str recursion_level: Recursion level for subpages retrieval. Defaults to `None` (Optional). - :param :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='6.0-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 wiki name. - :param str path: Wiki page path. + :param str wiki_identifier: Wiki ID or wiki name.. + :param int id: Wiki page ID. :param str recursion_level: Recursion level for subpages retrieval. Defaults to `None` (Optional). - :param :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='6.0-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 wiki 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='6.0-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 wiki name. + :param str path: Wiki page path. + :param String version: Version of the page on which the change is to be made. Mandatory for `Edit` scenario. To be populated in the If-Match header of the request. + :param str comment: Comment to be associated with the page operation. + :param :class:` ` version_descriptor: GitVersionDescriptor for the page. (Optional in case of ProjectWiki). + :rtype: :class:` ` + """ + 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='6.0', + 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 wiki name. + :param str path: Wiki page path. + :param str comment: Comment to be associated with this page delete. + :param :class:` ` version_descriptor: GitVersionDescriptor for the page. (Optional in case of ProjectWiki). + :rtype: :class:` ` + """ + 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='6.0', + 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 wiki name.. - :param int id: Wiki page ID. + :param str wiki_identifier: Wiki ID or wiki name. + :param str path: Wiki page path. :param str recursion_level: Recursion level for subpages retrieval. Defaults to `None` (Optional). + :param :class:` ` version_descriptor: GitVersionDescriptor for the page. Defaults to the default branch (Optional). :param 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='6.0-preview.1', + location_id='25d3fbc7-fe3d-46cb-b5a5-0b6f79caf27b', + version='6.0', 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 wiki name.. - :param int id: Wiki page ID. + :param str wiki_identifier: Wiki ID or wiki name. + :param str path: Wiki page path. :param str recursion_level: Recursion level for subpages retrieval. Defaults to `None` (Optional). + :param :class:` ` version_descriptor: GitVersionDescriptor for the page. Defaults to the default branch (Optional). :param 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='6.0-preview.1', + location_id='25d3fbc7-fe3d-46cb-b5a5-0b6f79caf27b', + version='6.0', 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 wiki name.. - :param int id: Wiki page ID. + :param str wiki_identifier: Wiki ID or wiki name. + :param str path: Wiki page path. :param str recursion_level: Recursion level for subpages retrieval. Defaults to `None` (Optional). + :param :class:` ` version_descriptor: GitVersionDescriptor for the page. Defaults to the default branch (Optional). :param 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='6.0-preview.1', + location_id='25d3fbc7-fe3d-46cb-b5a5-0b6f79caf27b', + version='6.0', route_values=route_values, query_parameters=query_parameters, accept_media_type='application/zip') @@ -439,43 +476,6 @@ 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 wiki name. - :param int id: Wiki page ID. - :param String version: Version of the page on which the change is to be made. Mandatory for `Edit` scenario. To be populated in the If-Match header of the request. - :param str comment: Comment to be associated with the page operation. - :rtype: :class:` ` - """ - 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='6.0-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 get_pages_batch(self, pages_batch_request, project, wiki_identifier, version_descriptor=None): """GetPagesBatch. [Preview API] Returns pageable list of Wiki Pages @@ -535,7 +535,7 @@ def get_page_data(self, project, wiki_identifier, page_id, page_views_for_days=N 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:` ` @@ -546,14 +546,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='6.0-preview.2', + version='6.0', 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 ID or wiki name provided. + Deletes the wiki corresponding to the wiki ID or wiki name provided. :param str wiki_identifier: Wiki ID or wiki name. :param str project: Project ID or project name :rtype: :class:` ` @@ -565,13 +565,13 @@ def delete_wiki(self, wiki_identifier, project=None): route_values['wikiIdentifier'] = self._serialize.url('wiki_identifier', wiki_identifier, 'str') response = self._send(http_method='DELETE', location_id='288d122c-dbd4-451d-aa5f-7dbbba070728', - version='6.0-preview.2', + version='6.0', 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] """ @@ -580,13 +580,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='6.0-preview.2', + version='6.0', 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 ID or wiki name provided. + Gets the wiki corresponding to the wiki ID or wiki name provided. :param str wiki_identifier: Wiki ID or wiki name. :param str project: Project ID or project name :rtype: :class:` ` @@ -598,13 +598,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='6.0-preview.2', + version='6.0', 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 wiki name provided using the update parameters. + Updates the wiki corresponding to the wiki ID or wiki name provided using the update parameters. :param :class:` ` update_parameters: Update parameters. :param str wiki_identifier: Wiki ID or wiki name. :param str project: Project ID or project name @@ -618,7 +618,7 @@ def update_wiki(self, update_parameters, wiki_identifier, project=None): content = self._serialize.body(update_parameters, 'WikiUpdateParameters') response = self._send(http_method='PATCH', location_id='288d122c-dbd4-451d-aa5f-7dbbba070728', - version='6.0-preview.2', + version='6.0', route_values=route_values, content=content) return self._deserialize('WikiV2', response) diff --git a/azure-devops/azure/devops/v6_0/work/work_client.py b/azure-devops/azure/devops/v6_0/work/work_client.py index 51ef408d..f69b5082 100644 --- a/azure-devops/azure/devops/v6_0/work/work_client.py +++ b/azure-devops/azure/devops/v6_0/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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.2', + version='6.0', 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='6.0-preview.2', + version='6.0', 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='6.0-preview.2', + version='6.0', 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='6.0-preview.2', + version='6.0', 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='6.0-preview.2', + version='6.0', 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='6.0-preview.2', + version='6.0', 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='6.0-preview.2', + version='6.0', 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='6.0-preview.2', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', route_values=route_values, content=content) return self._deserialize('[BoardColumn]', self._unwrap_collection(response)) def get_delivery_timeline_data(self, project, id, revision=None, start_date=None, end_date=None): """GetDeliveryTimelineData. - [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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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='6.0-preview.1', + version='6.0', 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,7 +1206,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='6.0-preview.1', + version='6.0', route_values=route_values, content=content) return self._deserialize('[BoardRow]', self._unwrap_collection(response)) @@ -1342,7 +1342,7 @@ def update_work_item_column(self, update_column, team_context, iteration_id, wor 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:` ` @@ -1368,13 +1368,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='6.0-preview.1', + version='6.0', 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 containing a list of start and end dates :param :class:` ` team_context: The team context for the operation :param str iteration_id: ID of the iteration @@ -1402,14 +1402,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='6.0-preview.1', + version='6.0', 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:` ` """ @@ -1432,13 +1432,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='6.0-preview.1', + version='6.0', 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:` ` @@ -1463,14 +1463,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='6.0-preview.1', + version='6.0', 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:` ` """ @@ -1493,13 +1493,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='6.0-preview.1', + version='6.0', 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:` ` @@ -1524,7 +1524,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='6.0-preview.1', + version='6.0', route_values=route_values, content=content) return self._deserialize('TeamSetting', response) diff --git a/azure-devops/azure/devops/v6_0/work_item_tracking/work_item_tracking_client.py b/azure-devops/azure/devops/v6_0/work_item_tracking/work_item_tracking_client.py index 2e8a731e..2c0e3d7e 100644 --- a/azure-devops/azure/devops/v6_0/work_item_tracking/work_item_tracking_client.py +++ b/azure-devops/azure/devops/v6_0/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='6.0-preview.3', + version='6.0', 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='6.0-preview.3', + version='6.0', 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='6.0-preview.3', + version='6.0', route_values=route_values, query_parameters=query_parameters, accept_media_type='application/zip') @@ -161,7 +161,7 @@ def get_attachment_zip(self, id, project=None, file_name=None, download=None, ** def get_classification_nodes(self, project, ids, depth=None, error_policy=None): """GetClassificationNodes. - [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 separated integer classification nodes ids. It's not required, if you want root nodes. :param int depth: Depth of children to fetch. @@ -181,14 +181,14 @@ def get_classification_nodes(self, project, ids, depth=None, error_policy=None): query_parameters['errorPolicy'] = self._serialize.query('error_policy', error_policy, 'str') response = self._send(http_method='GET', location_id='a70579d1-f53a-48ee-a5be-7be8659023b9', - version='6.0-preview.2', + version='6.0', 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='6.0-preview.2', + version='6.0', 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='6.0-preview.2', + version='6.0', 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='6.0-preview.2', + version='6.0', 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='6.0-preview.2', + version='6.0', 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='6.0-preview.2', + version='6.0', 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='6.0-preview.2', + version='6.0', 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. To undelete a filed, see "Update Field" API. + Deletes the field. To undelete a filed, see "Update Field" API. :param str field_name_or_ref_name: Field simple name or reference name :param str project: Project ID or project name """ @@ -639,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='6.0-preview.2', + version='6.0', 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='6.0-preview.2', + version='6.0', 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. The project ID/name parameter is optional. + Returns information for all fields. The project ID/name parameter is optional. :param str project: Project ID or project name :param str expand: Use ExtensionFields to include extension fields, otherwise exclude them. Unless the feature flag for this parameter is enabled, extension fields are always included. :rtype: [WorkItemField] @@ -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='6.0-preview.2', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[WorkItemField]', self._unwrap_collection(response)) def update_field(self, payload, field_name_or_ref_name, project=None): """UpdateField. - [Preview API] Update a field. + Update a field. :param :class:` ` payload: Payload contains desired value of the field's properties :param str field_name_or_ref_name: Name/reference name of the field to be updated :param str project: Project ID or project name @@ -696,7 +696,7 @@ def update_field(self, payload, field_name_or_ref_name, project=None): content = self._serialize.body(payload, 'UpdateWorkItemField') response = self._send(http_method='PATCH', location_id='b51fd764-e5c2-4b9b-aaf7-3395cf4bdd94', - version='6.0-preview.2', + version='6.0', route_values=route_values, content=content) return self._deserialize('WorkItemField', response) @@ -721,7 +721,7 @@ def migrate_projects_process(self, new_process, project): 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. @@ -739,7 +739,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='6.0-preview.2', + version='6.0', route_values=route_values, query_parameters=query_parameters, content=content) @@ -747,7 +747,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. """ @@ -758,12 +758,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='6.0-preview.2', + version='6.0', 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. @@ -782,14 +782,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='6.0-preview.2', + version='6.0', 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. @@ -811,14 +811,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='6.0-preview.2', + version='6.0', 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). @@ -840,14 +840,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='6.0-preview.2', + version='6.0', 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. @@ -865,7 +865,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='6.0-preview.2', + version='6.0', route_values=route_values, query_parameters=query_parameters, content=content) @@ -873,7 +873,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] @@ -884,14 +884,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='6.0-preview.1', + version='6.0', 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 """ @@ -902,12 +902,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='6.0-preview.2', + version='6.0', 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:` ` @@ -919,13 +919,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='6.0-preview.2', + version='6.0', 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] @@ -939,14 +939,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='6.0-preview.2', + version='6.0', 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] """ @@ -955,13 +955,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='6.0-preview.2', + version='6.0', 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 @@ -975,14 +975,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='6.0-preview.2', + version='6.0', 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 @@ -1001,14 +1001,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='6.0-preview.3', + version='6.0', 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: @@ -1030,7 +1030,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='6.0-preview.3', + version='6.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[WorkItem]', self._unwrap_collection(response)) @@ -1270,7 +1270,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 @@ -1285,13 +1285,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='6.0-preview.3', + version='6.0', 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: @@ -1310,14 +1310,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='6.0-preview.3', + version='6.0', 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. @@ -1349,7 +1349,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='6.0-preview.2', + version='6.0', route_values=route_values, query_parameters=query_parameters, content=content) @@ -1357,7 +1357,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. @@ -1390,14 +1390,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='6.0-preview.2', + version='6.0', 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. @@ -1430,14 +1430,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='6.0-preview.2', + version='6.0', 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) @@ -1453,24 +1453,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='6.0-preview.1', + version='6.0', 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='6.0-preview.1') + version='6.0') 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) @@ -1486,7 +1486,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='6.0-preview.1', + version='6.0', route_values=route_values, query_parameters=query_parameters, accept_media_type='image/svg+xml') @@ -1498,7 +1498,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) @@ -1514,7 +1514,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='6.0-preview.1', + version='6.0', route_values=route_values, query_parameters=query_parameters, accept_media_type='image/xaml+xml') @@ -1526,7 +1526,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. @@ -1550,14 +1550,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='6.0-preview.3', + version='6.0', 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:` ` """ @@ -1566,23 +1566,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='6.0-preview.2', + version='6.0', 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='6.0-preview.2') + version='6.0') 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. @@ -1627,14 +1627,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='6.0-preview.2', + version='6.0', 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. @@ -1655,7 +1655,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='6.0-preview.2', + version='6.0', route_values=route_values, query_parameters=query_parameters, content=content) @@ -1686,7 +1686,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 @@ -1713,7 +1713,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='6.0-preview.3', + version='6.0', route_values=route_values, query_parameters=query_parameters, content=content, @@ -1722,7 +1722,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 @@ -1744,14 +1744,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='6.0-preview.3', + version='6.0', 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. @@ -1767,14 +1767,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='6.0-preview.3', + version='6.0', 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 @@ -1797,14 +1797,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='6.0-preview.3', + version='6.0', 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 @@ -1831,14 +1831,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='6.0-preview.3', + version='6.0', 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 @@ -1865,7 +1865,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='6.0-preview.3', + version='6.0', route_values=route_values, query_parameters=query_parameters, content=content, @@ -1874,7 +1874,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] @@ -1885,7 +1885,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='6.0-preview.1', + version='6.0', route_values=route_values, content=content) return self._deserialize('[WorkItem]', self._unwrap_collection(response)) @@ -1911,7 +1911,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] """ @@ -1920,13 +1920,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='6.0-preview.2', + version='6.0', 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:` ` @@ -1938,13 +1938,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='6.0-preview.2', + version='6.0', 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:` ` @@ -1956,13 +1956,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='6.0-preview.2', + version='6.0', 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] """ @@ -1971,13 +1971,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='6.0-preview.2', + version='6.0', 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. @@ -1993,14 +1993,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='6.0-preview.3', + version='6.0', 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: @@ -2019,7 +2019,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='6.0-preview.3', + version='6.0', 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 2e915b2c..61e32bd9 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 = "6.0.0b2" +VERSION = "6.0.0b3" diff --git a/azure-devops/setup.py b/azure-devops/setup.py index b2ea1eac..27c3f32d 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 = "6.0.0b2" +VERSION = "6.0.0b3" # To install the library, run the following #