diff --git a/azure-devops/azure/devops/v5_1/build/build_client.py b/azure-devops/azure/devops/v5_1/build/build_client.py index 19bb9744..5df5fd4a 100644 --- a/azure-devops/azure/devops/v5_1/build/build_client.py +++ b/azure-devops/azure/devops/v5_1/build/build_client.py @@ -246,13 +246,14 @@ def get_project_resources(self, project, type=None, id=None): query_parameters=query_parameters) return self._deserialize('[DefinitionResourceReference]', self._unwrap_collection(response)) - def list_branches(self, project, provider_name, service_endpoint_id=None, repository=None): + def list_branches(self, project, provider_name, service_endpoint_id=None, repository=None, branch_name=None): """ListBranches. [Preview API] Gets a list of branches for the given source code repository. :param str project: Project ID or project name :param str provider_name: The name of the source provider. :param str service_endpoint_id: If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit. - :param str repository: If specified, the vendor-specific identifier or the name of the repository to get branches. Can only be omitted for providers that do not support multiple repositories. + :param str repository: The vendor-specific identifier or the name of the repository to get branches. Can only be omitted for providers that do not support multiple repositories. + :param str branch_name: If supplied, the name of the branch to check for specifically. :rtype: [str] """ route_values = {} @@ -265,6 +266,8 @@ def list_branches(self, project, provider_name, service_endpoint_id=None, reposi query_parameters['serviceEndpointId'] = self._serialize.query('service_endpoint_id', service_endpoint_id, 'str') if repository is not None: query_parameters['repository'] = self._serialize.query('repository', repository, 'str') + if branch_name is not None: + query_parameters['branchName'] = self._serialize.query('branch_name', branch_name, 'str') response = self._send(http_method='GET', location_id='e05d4403-9b81-4244-8763-20fde28d1976', version='5.1-preview.1', diff --git a/azure-devops/azure/devops/v5_1/build/models.py b/azure-devops/azure/devops/v5_1/build/models.py index 31f30e54..9fcdd207 100644 --- a/azure-devops/azure/devops/v5_1/build/models.py +++ b/azure-devops/azure/devops/v5_1/build/models.py @@ -1572,13 +1572,13 @@ def __init__(self, links=None): class ReleaseReference(Model): """ReleaseReference. - :param attempt: + :param attempt: Number of Release Attempt. :type attempt: int - :param creation_date: + :param creation_date: Release Creation Date. :type creation_date: datetime :param definition_id: Release definition ID. :type definition_id: int - :param environment_creation_date: + :param environment_creation_date: Environment creation Date. :type environment_creation_date: datetime :param environment_definition_id: Release environment definition ID. :type environment_definition_id: int diff --git a/azure-devops/azure/devops/v5_1/cix/models.py b/azure-devops/azure/devops/v5_1/cix/models.py index 8c2c654f..8109771f 100644 --- a/azure-devops/azure/devops/v5_1/cix/models.py +++ b/azure-devops/azure/devops/v5_1/cix/models.py @@ -36,20 +36,16 @@ def __init__(self, content=None, is_base64_encoded=None, path=None): class CreatedResources(Model): """CreatedResources. - :param error: - :type error: str :param resources: :type resources: dict """ _attribute_map = { - 'error': {'key': 'error', 'type': 'str'}, 'resources': {'key': 'resources', 'type': '{object}'} } - def __init__(self, error=None, resources=None): + def __init__(self, resources=None): super(CreatedResources, self).__init__() - self.error = error self.resources = resources diff --git a/azure-devops/azure/devops/v5_1/core/__init__.py b/azure-devops/azure/devops/v5_1/core/__init__.py index 39763403..21c19e5b 100644 --- a/azure-devops/azure/devops/v5_1/core/__init__.py +++ b/azure-devops/azure/devops/v5_1/core/__init__.py @@ -11,6 +11,8 @@ __all__ = [ 'GraphSubjectBase', + 'Identity', + 'IdentityBase', 'IdentityData', 'IdentityRef', 'JsonPatchOperation', diff --git a/azure-devops/azure/devops/v5_1/core/core_client.py b/azure-devops/azure/devops/v5_1/core/core_client.py index d77fb27e..6e8ad321 100644 --- a/azure-devops/azure/devops/v5_1/core/core_client.py +++ b/azure-devops/azure/devops/v5_1/core/core_client.py @@ -372,12 +372,13 @@ 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): + 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 return all the teams requesting user is member, otherwise return all the teams user has read access + :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 = {} @@ -387,9 +388,11 @@ def get_all_teams(self, mine=None, top=None, skip=None): query_parameters['$top'] = self._serialize.query('top', top, 'int') if skip is not None: query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') + if expand_identity is not None: + query_parameters['$expandIdentity'] = self._serialize.query('expand_identity', expand_identity, 'bool') response = self._send(http_method='GET', location_id='7a4d9ee9-3433-4347-b47a-7a80f1cf307e', - version='5.1-preview.2', + version='5.1-preview.3', query_parameters=query_parameters) return self._deserialize('[WebApiTeam]', self._unwrap_collection(response)) @@ -406,7 +409,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-preview.2', + version='5.1-preview.3', route_values=route_values, content=content) return self._deserialize('WebApiTeam', response) @@ -424,14 +427,15 @@ def delete_team(self, project_id, team_id): route_values['teamId'] = self._serialize.url('team_id', team_id, 'str') self._send(http_method='DELETE', location_id='d30a3dd1-f8ba-442a-b86a-bd0c0c383e59', - version='5.1-preview.2', + version='5.1-preview.3', route_values=route_values) - def get_team(self, project_id, team_id): + def get_team(self, project_id, team_id, expand_identity=None): """GetTeam. [Preview API] Get a specific team. :param str project_id: The name or ID (GUID) of the team project containing the team. :param str team_id: The name or ID (GUID) of the team. + :param bool expand_identity: A value indicating whether or not to expand Identity information in the result WebApiTeam object. :rtype: :class:` ` """ route_values = {} @@ -439,19 +443,24 @@ def get_team(self, project_id, team_id): route_values['projectId'] = self._serialize.url('project_id', project_id, 'str') if team_id is not None: route_values['teamId'] = self._serialize.url('team_id', team_id, 'str') + query_parameters = {} + if expand_identity is not None: + query_parameters['$expandIdentity'] = self._serialize.query('expand_identity', expand_identity, 'bool') response = self._send(http_method='GET', location_id='d30a3dd1-f8ba-442a-b86a-bd0c0c383e59', - version='5.1-preview.2', - route_values=route_values) + version='5.1-preview.3', + route_values=route_values, + query_parameters=query_parameters) return self._deserialize('WebApiTeam', response) - def get_teams(self, project_id, mine=None, top=None, skip=None): + def get_teams(self, project_id, mine=None, top=None, skip=None, expand_identity=None): """GetTeams. [Preview API] Get a list of teams. :param str project_id: - :param bool mine: If true return all the teams requesting user is member, otherwise return all the teams user has read access + :param bool mine: If true return all the teams requesting user is member, otherwise return all the teams user has read access. :param int top: Maximum number of teams to return. :param int skip: Number of teams to skip. + :param bool expand_identity: A value indicating whether or not to expand Identity information in the result WebApiTeam object. :rtype: [WebApiTeam] """ route_values = {} @@ -464,9 +473,11 @@ def get_teams(self, project_id, mine=None, top=None, skip=None): query_parameters['$top'] = self._serialize.query('top', top, 'int') if skip is not None: query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') + if expand_identity is not None: + query_parameters['$expandIdentity'] = self._serialize.query('expand_identity', expand_identity, 'bool') response = self._send(http_method='GET', location_id='d30a3dd1-f8ba-442a-b86a-bd0c0c383e59', - version='5.1-preview.2', + version='5.1-preview.3', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[WebApiTeam]', self._unwrap_collection(response)) @@ -487,7 +498,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-preview.2', + version='5.1-preview.3', route_values=route_values, content=content) return self._deserialize('WebApiTeam', response) diff --git a/azure-devops/azure/devops/v5_1/core/models.py b/azure-devops/azure/devops/v5_1/core/models.py index 0868d952..2cf956f0 100644 --- a/azure-devops/azure/devops/v5_1/core/models.py +++ b/azure-devops/azure/devops/v5_1/core/models.py @@ -37,6 +37,82 @@ def __init__(self, _links=None, descriptor=None, display_name=None, url=None): self.url = url +class IdentityBase(Model): + """IdentityBase. + + :param custom_display_name: The custom display name for the identity (if any). Setting this property to an empty string will clear the existing custom display name. Setting this property to null will not affect the existing persisted value (since null values do not get sent over the wire or to the database) + :type custom_display_name: str + :param descriptor: + :type descriptor: :class:`str ` + :param id: + :type id: str + :param is_active: + :type is_active: bool + :param is_container: + :type is_container: bool + :param master_id: + :type master_id: str + :param member_ids: + :type member_ids: list of str + :param member_of: + :type member_of: list of :class:`str ` + :param members: + :type members: list of :class:`str ` + :param meta_type_id: + :type meta_type_id: int + :param properties: + :type properties: :class:`object ` + :param provider_display_name: The display name for the identity as specified by the source identity provider. + :type provider_display_name: str + :param resource_version: + :type resource_version: int + :param social_descriptor: + :type social_descriptor: :class:`str ` + :param subject_descriptor: + :type subject_descriptor: :class:`str ` + :param unique_user_id: + :type unique_user_id: int + """ + + _attribute_map = { + 'custom_display_name': {'key': 'customDisplayName', 'type': 'str'}, + 'descriptor': {'key': 'descriptor', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'is_active': {'key': 'isActive', 'type': 'bool'}, + 'is_container': {'key': 'isContainer', 'type': 'bool'}, + 'master_id': {'key': 'masterId', 'type': 'str'}, + 'member_ids': {'key': 'memberIds', 'type': '[str]'}, + 'member_of': {'key': 'memberOf', 'type': '[str]'}, + 'members': {'key': 'members', 'type': '[str]'}, + 'meta_type_id': {'key': 'metaTypeId', 'type': 'int'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'provider_display_name': {'key': 'providerDisplayName', 'type': 'str'}, + 'resource_version': {'key': 'resourceVersion', 'type': 'int'}, + 'social_descriptor': {'key': 'socialDescriptor', 'type': 'str'}, + 'subject_descriptor': {'key': 'subjectDescriptor', 'type': 'str'}, + 'unique_user_id': {'key': 'uniqueUserId', 'type': 'int'} + } + + def __init__(self, custom_display_name=None, descriptor=None, id=None, is_active=None, is_container=None, master_id=None, member_ids=None, member_of=None, members=None, meta_type_id=None, properties=None, provider_display_name=None, resource_version=None, social_descriptor=None, subject_descriptor=None, unique_user_id=None): + super(IdentityBase, self).__init__() + self.custom_display_name = custom_display_name + self.descriptor = descriptor + self.id = id + self.is_active = is_active + self.is_container = is_container + self.master_id = master_id + self.member_ids = member_ids + self.member_of = member_of + self.members = members + self.meta_type_id = meta_type_id + self.properties = properties + self.provider_display_name = provider_display_name + self.resource_version = resource_version + self.social_descriptor = social_descriptor + self.subject_descriptor = subject_descriptor + self.unique_user_id = unique_user_id + + class IdentityData(Model): """IdentityData. @@ -525,6 +601,66 @@ def __init__(self, id=None, name=None, url=None): self.url = url +class Identity(IdentityBase): + """Identity. + + :param custom_display_name: The custom display name for the identity (if any). Setting this property to an empty string will clear the existing custom display name. Setting this property to null will not affect the existing persisted value (since null values do not get sent over the wire or to the database) + :type custom_display_name: str + :param descriptor: + :type descriptor: :class:`str ` + :param id: + :type id: str + :param is_active: + :type is_active: bool + :param is_container: + :type is_container: bool + :param master_id: + :type master_id: str + :param member_ids: + :type member_ids: list of str + :param member_of: + :type member_of: list of :class:`str ` + :param members: + :type members: list of :class:`str ` + :param meta_type_id: + :type meta_type_id: int + :param properties: + :type properties: :class:`object ` + :param provider_display_name: The display name for the identity as specified by the source identity provider. + :type provider_display_name: str + :param resource_version: + :type resource_version: int + :param social_descriptor: + :type social_descriptor: :class:`str ` + :param subject_descriptor: + :type subject_descriptor: :class:`str ` + :param unique_user_id: + :type unique_user_id: int + """ + + _attribute_map = { + 'custom_display_name': {'key': 'customDisplayName', 'type': 'str'}, + 'descriptor': {'key': 'descriptor', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'is_active': {'key': 'isActive', 'type': 'bool'}, + 'is_container': {'key': 'isContainer', 'type': 'bool'}, + 'master_id': {'key': 'masterId', 'type': 'str'}, + 'member_ids': {'key': 'memberIds', 'type': '[str]'}, + 'member_of': {'key': 'memberOf', 'type': '[str]'}, + 'members': {'key': 'members', 'type': '[str]'}, + 'meta_type_id': {'key': 'metaTypeId', 'type': 'int'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'provider_display_name': {'key': 'providerDisplayName', 'type': 'str'}, + 'resource_version': {'key': 'resourceVersion', 'type': 'int'}, + 'social_descriptor': {'key': 'socialDescriptor', 'type': 'str'}, + 'subject_descriptor': {'key': 'subjectDescriptor', 'type': 'str'}, + 'unique_user_id': {'key': 'uniqueUserId', 'type': 'int'}, + } + + def __init__(self, custom_display_name=None, descriptor=None, id=None, is_active=None, is_container=None, master_id=None, member_ids=None, member_of=None, members=None, meta_type_id=None, properties=None, provider_display_name=None, resource_version=None, social_descriptor=None, subject_descriptor=None, unique_user_id=None): + super(Identity, self).__init__(custom_display_name=custom_display_name, descriptor=descriptor, id=id, is_active=is_active, is_container=is_container, master_id=master_id, member_ids=member_ids, member_of=member_of, members=members, meta_type_id=meta_type_id, properties=properties, provider_display_name=provider_display_name, resource_version=resource_version, social_descriptor=social_descriptor, subject_descriptor=subject_descriptor, unique_user_id=unique_user_id) + + class Process(ProcessReference): """Process. @@ -738,6 +874,8 @@ class WebApiTeam(WebApiTeamRef): :type url: str :param description: Team description :type description: str + :param identity: Team identity. + :type identity: :class:`Identity ` :param identity_url: Identity REST API Url to this team :type identity_url: str :param project_id: @@ -751,14 +889,16 @@ class WebApiTeam(WebApiTeamRef): 'name': {'key': 'name', 'type': 'str'}, 'url': {'key': 'url', 'type': 'str'}, 'description': {'key': 'description', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, 'identity_url': {'key': 'identityUrl', 'type': 'str'}, 'project_id': {'key': 'projectId', 'type': 'str'}, 'project_name': {'key': 'projectName', 'type': 'str'} } - def __init__(self, id=None, name=None, url=None, description=None, identity_url=None, project_id=None, project_name=None): + def __init__(self, id=None, name=None, url=None, description=None, identity=None, identity_url=None, project_id=None, project_name=None): super(WebApiTeam, self).__init__(id=id, name=name, url=url) self.description = description + self.identity = identity self.identity_url = identity_url self.project_id = project_id self.project_name = project_name @@ -766,6 +906,7 @@ def __init__(self, id=None, name=None, url=None, description=None, identity_url= __all__ = [ 'GraphSubjectBase', + 'IdentityBase', 'IdentityData', 'IdentityRef', 'JsonPatchOperation', @@ -783,6 +924,7 @@ def __init__(self, id=None, name=None, url=None, description=None, identity_url= 'TeamProjectReference', 'WebApiConnectedServiceRef', 'WebApiTeamRef', + 'Identity', 'Process', 'TeamProject', 'TeamProjectCollection', diff --git a/azure-devops/azure/devops/v5_1/extension_management/__init__.py b/azure-devops/azure/devops/v5_1/extension_management/__init__.py index 56614078..47e66434 100644 --- a/azure-devops/azure/devops/v5_1/extension_management/__init__.py +++ b/azure-devops/azure/devops/v5_1/extension_management/__init__.py @@ -19,6 +19,8 @@ 'ContributionPropertyDescription', 'ContributionType', 'ExtensionAcquisitionRequest', + 'ExtensionAuditLog', + 'ExtensionAuditLogEntry', 'ExtensionAuthorization', 'ExtensionBadge', 'ExtensionDataCollection', diff --git a/azure-devops/azure/devops/v5_1/extension_management/models.py b/azure-devops/azure/devops/v5_1/extension_management/models.py index f9c2bed8..d8a63382 100644 --- a/azure-devops/azure/devops/v5_1/extension_management/models.py +++ b/azure-devops/azure/devops/v5_1/extension_management/models.py @@ -246,6 +246,58 @@ def __init__(self, assignment_type=None, billing_id=None, item_id=None, operatio self.quantity = quantity +class ExtensionAuditLog(Model): + """ExtensionAuditLog. + + :param entries: Collection of audit log entries + :type entries: list of :class:`ExtensionAuditLogEntry ` + :param extension_name: Extension that the change was made for + :type extension_name: str + :param publisher_name: Publisher that the extension is part of + :type publisher_name: str + """ + + _attribute_map = { + 'entries': {'key': 'entries', 'type': '[ExtensionAuditLogEntry]'}, + 'extension_name': {'key': 'extensionName', 'type': 'str'}, + 'publisher_name': {'key': 'publisherName', 'type': 'str'} + } + + def __init__(self, entries=None, extension_name=None, publisher_name=None): + super(ExtensionAuditLog, self).__init__() + self.entries = entries + self.extension_name = extension_name + self.publisher_name = publisher_name + + +class ExtensionAuditLogEntry(Model): + """ExtensionAuditLogEntry. + + :param audit_action: Change that was made to extension + :type audit_action: str + :param audit_date: Date at which the change was made + :type audit_date: datetime + :param comment: Extra information about the change + :type comment: str + :param updated_by: Represents the user who made the change + :type updated_by: :class:`IdentityRef ` + """ + + _attribute_map = { + 'audit_action': {'key': 'auditAction', 'type': 'str'}, + 'audit_date': {'key': 'auditDate', 'type': 'iso-8601'}, + 'comment': {'key': 'comment', 'type': 'str'}, + 'updated_by': {'key': 'updatedBy', 'type': 'IdentityRef'} + } + + def __init__(self, audit_action=None, audit_date=None, comment=None, updated_by=None): + super(ExtensionAuditLogEntry, self).__init__() + self.audit_action = audit_action + self.audit_date = audit_date + self.comment = comment + self.updated_by = updated_by + + class ExtensionAuthorization(Model): """ExtensionAuthorization. @@ -1232,6 +1284,8 @@ def __init__(self, flags=None, installation_issues=None, last_updated=None, exte 'ContributionPropertyDescription', 'ContributionType', 'ExtensionAcquisitionRequest', + 'ExtensionAuditLog', + 'ExtensionAuditLogEntry', 'ExtensionAuthorization', 'ExtensionBadge', 'ExtensionDataCollection', diff --git a/azure-devops/azure/devops/v5_1/feed/feed_client.py b/azure-devops/azure/devops/v5_1/feed/feed_client.py index ab615df3..3b6cb6f0 100644 --- a/azure-devops/azure/devops/v5_1/feed/feed_client.py +++ b/azure-devops/azure/devops/v5_1/feed/feed_client.py @@ -25,14 +25,17 @@ def __init__(self, base_url=None, creds=None): resource_area_identifier = '7ab4e64e-c4d8-4f50-ae73-5ef2e21642a5' - def get_badge(self, feed_id, package_id): + def get_badge(self, feed_id, package_id, project=None): """GetBadge. [Preview API] Generate a SVG badge for the latest version of a package. The generated SVG is typically used as the image in an HTML link which takes users to the feed containing the package to accelerate discovery and consumption. :param str feed_id: Name or Id of the feed. :param str package_id: Id of the package (GUID Id, not name). + :param str project: Project ID or project name :rtype: str """ route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') if feed_id is not None: route_values['feedId'] = self._serialize.url('feed_id', feed_id, 'str') if package_id is not None: @@ -43,13 +46,16 @@ def get_badge(self, feed_id, package_id): route_values=route_values) return self._deserialize('str', response) - def get_feed_change(self, feed_id): + def get_feed_change(self, feed_id, project=None): """GetFeedChange. [Preview API] Query a feed to determine its current state. :param str feed_id: Name or ID of the feed. + :param str project: Project ID or project name :rtype: :class:` ` """ route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') if feed_id is not None: route_values['feedId'] = self._serialize.url('feed_id', feed_id, 'str') response = self._send(http_method='GET', @@ -58,14 +64,18 @@ def get_feed_change(self, feed_id): route_values=route_values) return self._deserialize('FeedChange', response) - def get_feed_changes(self, include_deleted=None, continuation_token=None, batch_size=None): + def get_feed_changes(self, project=None, include_deleted=None, continuation_token=None, batch_size=None): """GetFeedChanges. [Preview API] Query to determine which feeds have changed since the last call, tracked through the provided continuationToken. Only changes to a feed itself are returned and impact the continuationToken, not additions or alterations to packages within the feeds. + :param str project: Project ID or project name :param bool include_deleted: If true, get changes for all feeds including deleted feeds. The default value is false. :param long continuation_token: A continuation token which acts as a bookmark to a previously retrieved change. This token allows the user to continue retrieving changes in batches, picking up where the previous batch left off. If specified, all the changes that occur strictly after the token will be returned. If not specified or 0, iteration will start with the first change. :param int batch_size: Number of package changes to fetch. The default value is 1000. The maximum value is 2000. :rtype: :class:` ` """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') query_parameters = {} if include_deleted is not None: query_parameters['includeDeleted'] = self._serialize.query('include_deleted', include_deleted, 'bool') @@ -76,6 +86,7 @@ def get_feed_changes(self, include_deleted=None, continuation_token=None, batch_ response = self._send(http_method='GET', location_id='29ba2dad-389a-4661-b5d3-de76397ca05b', version='5.1-preview.1', + route_values=route_values, query_parameters=query_parameters) return self._deserialize('FeedChangesResponse', response) @@ -203,15 +214,18 @@ def set_global_permissions(self, global_permissions): content=content) return self._deserialize('[GlobalPermission]', self._unwrap_collection(response)) - def get_package_changes(self, feed_id, continuation_token=None, batch_size=None): + def get_package_changes(self, feed_id, project=None, continuation_token=None, batch_size=None): """GetPackageChanges. [Preview API] Get a batch of package changes made to a feed. The changes returned are 'most recent change' so if an Add is followed by an Update before you begin enumerating, you'll only see one change in the batch. While consuming batches using the continuation token, you may see changes to the same package version multiple times if they are happening as you enumerate. :param str feed_id: Name or Id of the feed. + :param str project: Project ID or project name :param long continuation_token: A continuation token which acts as a bookmark to a previously retrieved change. This token allows the user to continue retrieving changes in batches, picking up where the previous batch left off. If specified, all the changes that occur strictly after the token will be returned. If not specified or 0, iteration will start with the first change. :param int batch_size: Number of package changes to fetch. The default value is 1000. The maximum value is 2000. :rtype: :class:` ` """ route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') if feed_id is not None: route_values['feedId'] = self._serialize.url('feed_id', feed_id, 'str') query_parameters = {} @@ -350,16 +364,19 @@ def get_packages(self, feed_id, project=None, protocol_type=None, package_name_q query_parameters=query_parameters) return self._deserialize('[Package]', self._unwrap_collection(response)) - def get_feed_permissions(self, feed_id, include_ids=None, exclude_inherited_permissions=None, identity_descriptor=None): + def get_feed_permissions(self, feed_id, project=None, include_ids=None, exclude_inherited_permissions=None, identity_descriptor=None): """GetFeedPermissions. [Preview API] Get the permissions for a feed. :param str feed_id: Name or Id of the feed. + :param str project: Project ID or project name :param bool include_ids: True to include user Ids in the response. Default is false. :param bool exclude_inherited_permissions: True to only return explicitly set permissions on the feed. Default is false. :param str identity_descriptor: Filter permissions to the provided identity. :rtype: [FeedPermission] """ route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') if feed_id is not None: route_values['feedId'] = self._serialize.url('feed_id', feed_id, 'str') query_parameters = {} @@ -376,14 +393,17 @@ def get_feed_permissions(self, feed_id, include_ids=None, exclude_inherited_perm query_parameters=query_parameters) return self._deserialize('[FeedPermission]', self._unwrap_collection(response)) - def set_feed_permissions(self, feed_permission, feed_id): + def set_feed_permissions(self, feed_permission, feed_id, project=None): """SetFeedPermissions. [Preview API] Update the permissions on a feed. :param [FeedPermission] feed_permission: Permissions to set. :param str feed_id: Name or Id of the feed. + :param str project: Project ID or project name :rtype: [FeedPermission] """ route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') if feed_id is not None: route_values['feedId'] = self._serialize.url('feed_id', feed_id, 'str') content = self._serialize.body(feed_permission, '[FeedPermission]') diff --git a/azure-devops/azure/devops/v5_1/feed/models.py b/azure-devops/azure/devops/v5_1/feed/models.py index ec6e3b16..0a5f8a82 100644 --- a/azure-devops/azure/devops/v5_1/feed/models.py +++ b/azure-devops/azure/devops/v5_1/feed/models.py @@ -794,15 +794,23 @@ class ProjectReference(Model): :param id: Gets or sets id of the project. :type id: str + :param name: Gets or sets name of the project. + :type name: str + :param visibility: Gets or sets visibility of the project. + :type visibility: str """ _attribute_map = { - 'id': {'key': 'id', 'type': 'str'} + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'visibility': {'key': 'visibility', 'type': 'str'} } - def __init__(self, id=None): + def __init__(self, id=None, name=None, visibility=None): super(ProjectReference, self).__init__() self.id = id + self.name = name + self.visibility = visibility class ProtocolMetadata(Model): @@ -962,6 +970,8 @@ class UpstreamSource(Model): :param deleted_date: UTC date that this upstream was deleted. :type deleted_date: datetime + :param display_location: Locator for connecting to the upstream source in a user friendly format, that may potentially change over time + :type display_location: str :param id: Identity of the upstream source. :type id: str :param internal_upstream_collection_id: For an internal upstream type, track the Azure DevOps organization that contains it. @@ -970,7 +980,7 @@ class UpstreamSource(Model): :type internal_upstream_feed_id: str :param internal_upstream_view_id: For an internal upstream type, track the view of the feed being referenced. :type internal_upstream_view_id: str - :param location: Locator for connecting to the upstream source. + :param location: Consistent locator for connecting to the upstream source. :type location: str :param name: Display name. :type name: str @@ -982,6 +992,7 @@ class UpstreamSource(Model): _attribute_map = { 'deleted_date': {'key': 'deletedDate', 'type': 'iso-8601'}, + 'display_location': {'key': 'displayLocation', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, 'internal_upstream_collection_id': {'key': 'internalUpstreamCollectionId', 'type': 'str'}, 'internal_upstream_feed_id': {'key': 'internalUpstreamFeedId', 'type': 'str'}, @@ -992,9 +1003,10 @@ class UpstreamSource(Model): 'upstream_source_type': {'key': 'upstreamSourceType', 'type': 'object'} } - def __init__(self, deleted_date=None, id=None, internal_upstream_collection_id=None, internal_upstream_feed_id=None, internal_upstream_view_id=None, location=None, name=None, protocol=None, upstream_source_type=None): + def __init__(self, deleted_date=None, display_location=None, id=None, internal_upstream_collection_id=None, internal_upstream_feed_id=None, internal_upstream_view_id=None, location=None, name=None, protocol=None, upstream_source_type=None): super(UpstreamSource, self).__init__() self.deleted_date = deleted_date + self.display_location = display_location self.id = id self.internal_upstream_collection_id = internal_upstream_collection_id self.internal_upstream_feed_id = internal_upstream_feed_id diff --git a/azure-devops/azure/devops/v5_1/graph/models.py b/azure-devops/azure/devops/v5_1/graph/models.py index 69fdeed3..35ba8fd0 100644 --- a/azure-devops/azure/devops/v5_1/graph/models.py +++ b/azure-devops/azure/devops/v5_1/graph/models.py @@ -78,8 +78,6 @@ class GraphFederatedProviderData(Model): :param access_token: The access token that can be used to communicated with the federated provider on behalf on the target identity, if we were able to successfully acquire one, otherwise null, if we were not. :type access_token: str - :param can_query_access_token: Whether or not the immediate provider (i.e. AAD) has indicated that we can call them to attempt to get an access token to communicate with the federated provider on behalf of the target identity. - :type can_query_access_token: bool :param provider_name: The name of the federated provider, e.g. "github.com". :type provider_name: str :param subject_descriptor: The descriptor of the graph subject to which this federated provider data corresponds. @@ -90,16 +88,14 @@ class GraphFederatedProviderData(Model): _attribute_map = { 'access_token': {'key': 'accessToken', 'type': 'str'}, - 'can_query_access_token': {'key': 'canQueryAccessToken', 'type': 'bool'}, 'provider_name': {'key': 'providerName', 'type': 'str'}, 'subject_descriptor': {'key': 'subjectDescriptor', 'type': 'str'}, 'version': {'key': 'version', 'type': 'long'} } - def __init__(self, access_token=None, can_query_access_token=None, provider_name=None, subject_descriptor=None, version=None): + def __init__(self, access_token=None, provider_name=None, subject_descriptor=None, version=None): super(GraphFederatedProviderData, self).__init__() self.access_token = access_token - self.can_query_access_token = can_query_access_token self.provider_name = provider_name self.subject_descriptor = subject_descriptor self.version = version @@ -626,6 +622,8 @@ class GraphUser(GraphMember): :type mail_address: str :param principal_name: This is the PrincipalName of this graph member from the source provider. The source provider may change this field over time and it is not guaranteed to be immutable for the life of the graph member by VSTS. :type principal_name: str + :param directory_alias: The short, generally unique name for the user in the backing directory. For AAD users, this corresponds to the mail nickname, which is often but not necessarily similar to the part of the user's mail address before the @ sign. For GitHub users, this corresponds to the GitHub user handle. + :type directory_alias: str :param is_deleted_in_origin: When true, the group has been deleted in the identity provider :type is_deleted_in_origin: bool :param metadata_update_date: @@ -646,13 +644,15 @@ class GraphUser(GraphMember): 'domain': {'key': 'domain', 'type': 'str'}, 'mail_address': {'key': 'mailAddress', 'type': 'str'}, 'principal_name': {'key': 'principalName', 'type': 'str'}, + 'directory_alias': {'key': 'directoryAlias', 'type': 'str'}, 'is_deleted_in_origin': {'key': 'isDeletedInOrigin', 'type': 'bool'}, 'metadata_update_date': {'key': 'metadataUpdateDate', 'type': 'iso-8601'}, 'meta_type': {'key': 'metaType', 'type': 'str'} } - def __init__(self, _links=None, descriptor=None, display_name=None, url=None, legacy_descriptor=None, origin=None, origin_id=None, subject_kind=None, domain=None, mail_address=None, principal_name=None, is_deleted_in_origin=None, metadata_update_date=None, meta_type=None): + def __init__(self, _links=None, descriptor=None, display_name=None, url=None, legacy_descriptor=None, origin=None, origin_id=None, subject_kind=None, domain=None, mail_address=None, principal_name=None, directory_alias=None, is_deleted_in_origin=None, metadata_update_date=None, meta_type=None): super(GraphUser, self).__init__(_links=_links, descriptor=descriptor, display_name=display_name, url=url, legacy_descriptor=legacy_descriptor, origin=origin, origin_id=origin_id, subject_kind=subject_kind, domain=domain, mail_address=mail_address, principal_name=principal_name) + self.directory_alias = directory_alias self.is_deleted_in_origin = is_deleted_in_origin self.metadata_update_date = metadata_update_date self.meta_type = meta_type diff --git a/azure-devops/azure/devops/v5_1/maven/models.py b/azure-devops/azure/devops/v5_1/maven/models.py index 86d645d9..9e119681 100644 --- a/azure-devops/azure/devops/v5_1/maven/models.py +++ b/azure-devops/azure/devops/v5_1/maven/models.py @@ -738,9 +738,11 @@ def __init__(self, links=None): class UpstreamSourceInfo(Model): """UpstreamSourceInfo. + :param display_location: Locator for connecting to the upstream source in a user friendly format, that may potentially change over time + :type display_location: str :param id: Identity of the upstream source. :type id: str - :param location: Locator for connecting to the upstream source. + :param location: Locator for connecting to the upstream source :type location: str :param name: Display name. :type name: str @@ -749,14 +751,16 @@ class UpstreamSourceInfo(Model): """ _attribute_map = { + 'display_location': {'key': 'displayLocation', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'source_type': {'key': 'sourceType', 'type': 'object'} } - def __init__(self, id=None, location=None, name=None, source_type=None): + def __init__(self, display_location=None, id=None, location=None, name=None, source_type=None): super(UpstreamSourceInfo, self).__init__() + self.display_location = display_location self.id = id self.location = location self.name = name diff --git a/azure-devops/azure/devops/v5_1/member_entitlement_management/models.py b/azure-devops/azure/devops/v5_1/member_entitlement_management/models.py index b4b31254..3d71a845 100644 --- a/azure-devops/azure/devops/v5_1/member_entitlement_management/models.py +++ b/azure-devops/azure/devops/v5_1/member_entitlement_management/models.py @@ -1080,6 +1080,8 @@ class GraphUser(GraphMember): :type mail_address: str :param principal_name: This is the PrincipalName of this graph member from the source provider. The source provider may change this field over time and it is not guaranteed to be immutable for the life of the graph member by VSTS. :type principal_name: str + :param directory_alias: The short, generally unique name for the user in the backing directory. For AAD users, this corresponds to the mail nickname, which is often but not necessarily similar to the part of the user's mail address before the @ sign. For GitHub users, this corresponds to the GitHub user handle. + :type directory_alias: str :param is_deleted_in_origin: When true, the group has been deleted in the identity provider :type is_deleted_in_origin: bool :param metadata_update_date: @@ -1100,13 +1102,15 @@ class GraphUser(GraphMember): 'domain': {'key': 'domain', 'type': 'str'}, 'mail_address': {'key': 'mailAddress', 'type': 'str'}, 'principal_name': {'key': 'principalName', 'type': 'str'}, + 'directory_alias': {'key': 'directoryAlias', 'type': 'str'}, 'is_deleted_in_origin': {'key': 'isDeletedInOrigin', 'type': 'bool'}, 'metadata_update_date': {'key': 'metadataUpdateDate', 'type': 'iso-8601'}, 'meta_type': {'key': 'metaType', 'type': 'str'} } - def __init__(self, _links=None, descriptor=None, display_name=None, url=None, legacy_descriptor=None, origin=None, origin_id=None, subject_kind=None, domain=None, mail_address=None, principal_name=None, is_deleted_in_origin=None, metadata_update_date=None, meta_type=None): + def __init__(self, _links=None, descriptor=None, display_name=None, url=None, legacy_descriptor=None, origin=None, origin_id=None, subject_kind=None, domain=None, mail_address=None, principal_name=None, directory_alias=None, is_deleted_in_origin=None, metadata_update_date=None, meta_type=None): super(GraphUser, self).__init__(_links=_links, descriptor=descriptor, display_name=display_name, url=url, legacy_descriptor=legacy_descriptor, origin=origin, origin_id=origin_id, subject_kind=subject_kind, domain=domain, mail_address=mail_address, principal_name=principal_name) + self.directory_alias = directory_alias self.is_deleted_in_origin = is_deleted_in_origin self.metadata_update_date = metadata_update_date self.meta_type = meta_type diff --git a/azure-devops/azure/devops/v5_1/npm/models.py b/azure-devops/azure/devops/v5_1/npm/models.py index 0aca121c..ee728987 100644 --- a/azure-devops/azure/devops/v5_1/npm/models.py +++ b/azure-devops/azure/devops/v5_1/npm/models.py @@ -216,9 +216,11 @@ def __init__(self, links=None): class UpstreamSourceInfo(Model): """UpstreamSourceInfo. + :param display_location: Locator for connecting to the upstream source in a user friendly format, that may potentially change over time + :type display_location: str :param id: Identity of the upstream source. :type id: str - :param location: Locator for connecting to the upstream source. + :param location: Locator for connecting to the upstream source :type location: str :param name: Display name. :type name: str @@ -227,14 +229,16 @@ class UpstreamSourceInfo(Model): """ _attribute_map = { + 'display_location': {'key': 'displayLocation', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'source_type': {'key': 'sourceType', 'type': 'object'} } - def __init__(self, id=None, location=None, name=None, source_type=None): + def __init__(self, display_location=None, id=None, location=None, name=None, source_type=None): super(UpstreamSourceInfo, self).__init__() + self.display_location = display_location self.id = id self.location = location self.name = name diff --git a/azure-devops/azure/devops/v5_1/nuget/models.py b/azure-devops/azure/devops/v5_1/nuget/models.py index 6bca3f3d..db93fd76 100644 --- a/azure-devops/azure/devops/v5_1/nuget/models.py +++ b/azure-devops/azure/devops/v5_1/nuget/models.py @@ -212,9 +212,11 @@ def __init__(self, links=None): class UpstreamSourceInfo(Model): """UpstreamSourceInfo. + :param display_location: Locator for connecting to the upstream source in a user friendly format, that may potentially change over time + :type display_location: str :param id: Identity of the upstream source. :type id: str - :param location: Locator for connecting to the upstream source. + :param location: Locator for connecting to the upstream source :type location: str :param name: Display name. :type name: str @@ -223,14 +225,16 @@ class UpstreamSourceInfo(Model): """ _attribute_map = { + 'display_location': {'key': 'displayLocation', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'source_type': {'key': 'sourceType', 'type': 'object'} } - def __init__(self, id=None, location=None, name=None, source_type=None): + def __init__(self, display_location=None, id=None, location=None, name=None, source_type=None): super(UpstreamSourceInfo, self).__init__() + self.display_location = display_location self.id = id self.location = location self.name = name diff --git a/azure-devops/azure/devops/v5_1/nuget/nuget_client.py b/azure-devops/azure/devops/v5_1/nuget/nuget_client.py index 1423fc70..564926ac 100644 --- a/azure-devops/azure/devops/v5_1/nuget/nuget_client.py +++ b/azure-devops/azure/devops/v5_1/nuget/nuget_client.py @@ -25,7 +25,7 @@ def __init__(self, base_url=None, creds=None): resource_area_identifier = 'b3be7473-68ea-4a81-bfc7-9530baaa19ad' - def download_package(self, feed_id, package_name, package_version, project=None, source_protocol_version=None): + def download_package(self, feed_id, package_name, package_version, project=None, source_protocol_version=None, **kwargs): """DownloadPackage. [Preview API] Download a package version directly. This API is intended for manual UI download options, not for programmatic access and scripting. You may be heavily throttled if accessing this api for scripting purposes. :param str feed_id: Name or ID of the feed. @@ -51,8 +51,13 @@ def download_package(self, feed_id, package_name, package_version, project=None, location_id='6ea81b8c-7386-490b-a71f-6cf23c80b388', version='5.1-preview.1', route_values=route_values, - query_parameters=query_parameters) - return self._deserialize('object', response) + query_parameters=query_parameters, + accept_media_type='application/octet-stream') + if "callback" in kwargs: + callback = kwargs["callback"] + else: + callback = None + return self._client.stream_download(response, callback=callback) def update_package_versions(self, batch_request, feed_id, project=None): """UpdatePackageVersions. diff --git a/azure-devops/azure/devops/v5_1/pipelines/__init__.py b/azure-devops/azure/devops/v5_1/pipelines/__init__.py index 7eccf7a8..4f6bf8f0 100644 --- a/azure-devops/azure/devops/v5_1/pipelines/__init__.py +++ b/azure-devops/azure/devops/v5_1/pipelines/__init__.py @@ -13,6 +13,13 @@ 'CreatePipelineConfigurationParameters', 'CreatePipelineParameters', 'Pipeline', + 'PipelineBase', 'PipelineConfiguration', + 'PipelineReference', + 'ReferenceLinks', + 'Run', + 'RunPipelineParameters', + 'RunReference', + 'Variable', 'PipelinesClient' ] diff --git a/azure-devops/azure/devops/v5_1/pipelines/models.py b/azure-devops/azure/devops/v5_1/pipelines/models.py index c7c7f764..ad4d8c27 100644 --- a/azure-devops/azure/devops/v5_1/pipelines/models.py +++ b/azure-devops/azure/devops/v5_1/pipelines/models.py @@ -49,32 +49,32 @@ def __init__(self, configuration=None, folder=None, name=None): self.name = name -class Pipeline(Model): - """Pipeline. +class PipelineBase(Model): + """PipelineBase. - :param configuration: - :type configuration: :class:`PipelineConfiguration ` :param folder: :type folder: str :param id: :type id: int :param name: :type name: str + :param revision: + :type revision: int """ _attribute_map = { - 'configuration': {'key': 'configuration', 'type': 'PipelineConfiguration'}, 'folder': {'key': 'folder', 'type': 'str'}, 'id': {'key': 'id', 'type': 'int'}, - 'name': {'key': 'name', 'type': 'str'} + 'name': {'key': 'name', 'type': 'str'}, + 'revision': {'key': 'revision', 'type': 'int'} } - def __init__(self, configuration=None, folder=None, id=None, name=None): - super(Pipeline, self).__init__() - self.configuration = configuration + def __init__(self, folder=None, id=None, name=None, revision=None): + super(PipelineBase, self).__init__() self.folder = folder self.id = id self.name = name + self.revision = revision class PipelineConfiguration(Model): @@ -93,9 +93,206 @@ def __init__(self, type=None): self.type = type +class PipelineReference(PipelineBase): + """PipelineReference. + + :param folder: + :type folder: str + :param id: + :type id: int + :param name: + :type name: str + :param revision: + :type revision: int + :param url: + :type url: str + """ + + _attribute_map = { + 'folder': {'key': 'folder', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'revision': {'key': 'revision', 'type': 'int'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, folder=None, id=None, name=None, revision=None, url=None): + super(PipelineReference, self).__init__(folder=folder, id=id, name=name, revision=revision) + self.url = url + + +class ReferenceLinks(Model): + """ReferenceLinks. + + :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 RunPipelineParameters(Model): + """RunPipelineParameters. + + :param configuration: + :type configuration: JustInTimeConfiguration + :param variables: + :type variables: dict + """ + + _attribute_map = { + 'configuration': {'key': 'configuration', 'type': 'JustInTimeConfiguration'}, + 'variables': {'key': 'variables', 'type': '{Variable}'} + } + + def __init__(self, configuration=None, variables=None): + super(RunPipelineParameters, self).__init__() + self.configuration = configuration + self.variables = variables + + +class RunReference(Model): + """RunReference. + + :param id: + :type id: int + :param name: + :type name: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, id=None, name=None): + super(RunReference, self).__init__() + self.id = id + self.name = name + + +class Variable(Model): + """Variable. + + :param is_secret: + :type is_secret: bool + :param value: + :type value: str + """ + + _attribute_map = { + 'is_secret': {'key': 'isSecret', 'type': 'bool'}, + 'value': {'key': 'value', 'type': 'str'} + } + + def __init__(self, is_secret=None, value=None): + super(Variable, self).__init__() + self.is_secret = is_secret + self.value = value + + +class Pipeline(PipelineBase): + """Pipeline. + + :param folder: + :type folder: str + :param id: + :type id: int + :param name: + :type name: str + :param revision: + :type revision: int + :param _links: + :type _links: :class:`ReferenceLinks ` + :param configuration: + :type configuration: :class:`PipelineConfiguration ` + :param url: + :type url: str + """ + + _attribute_map = { + 'folder': {'key': 'folder', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'revision': {'key': 'revision', 'type': 'int'}, + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'configuration': {'key': 'configuration', 'type': 'PipelineConfiguration'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, folder=None, id=None, name=None, revision=None, _links=None, configuration=None, url=None): + super(Pipeline, self).__init__(folder=folder, id=id, name=name, revision=revision) + self._links = _links + self.configuration = configuration + self.url = url + + +class Run(RunReference): + """Run. + + :param id: + :type id: int + :param name: + :type name: str + :param _links: + :type _links: :class:`ReferenceLinks ` + :param created_date: + :type created_date: datetime + :param finished_date: + :type finished_date: datetime + :param pipeline: + :type pipeline: :class:`PipelineReference ` + :param result: + :type result: object + :param state: + :type state: object + :param url: + :type url: str + :param variables: + :type variables: dict + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'finished_date': {'key': 'finishedDate', 'type': 'iso-8601'}, + 'pipeline': {'key': 'pipeline', 'type': 'PipelineReference'}, + 'result': {'key': 'result', 'type': 'object'}, + 'state': {'key': 'state', 'type': 'object'}, + 'url': {'key': 'url', 'type': 'str'}, + 'variables': {'key': 'variables', 'type': '{Variable}'} + } + + def __init__(self, id=None, name=None, _links=None, created_date=None, finished_date=None, pipeline=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.finished_date = finished_date + self.pipeline = pipeline + self.result = result + self.state = state + self.url = url + self.variables = variables + + __all__ = [ 'CreatePipelineConfigurationParameters', 'CreatePipelineParameters', - 'Pipeline', + 'PipelineBase', 'PipelineConfiguration', + 'PipelineReference', + 'ReferenceLinks', + 'RunPipelineParameters', + 'RunReference', + 'Variable', + 'Pipeline', + 'Run', ] diff --git a/azure-devops/azure/devops/v5_1/pipelines/pipelines_client.py b/azure-devops/azure/devops/v5_1/pipelines/pipelines_client.py index a92b0c48..2725d588 100644 --- a/azure-devops/azure/devops/v5_1/pipelines/pipelines_client.py +++ b/azure-devops/azure/devops/v5_1/pipelines/pipelines_client.py @@ -43,12 +43,12 @@ def create_pipeline(self, input_parameters, project): content=content) return self._deserialize('Pipeline', response) - def get_pipeline(self, project, pipeline_id, revision=None): + def get_pipeline(self, project, pipeline_id, pipeline_version=None): """GetPipeline. - [Preview API] + [Preview API] Gets a pipeline, optionally at the specified version :param str project: Project ID or project name - :param int pipeline_id: - :param int revision: + :param int pipeline_id: The pipeline id + :param int pipeline_version: The pipeline version :rtype: :class:` ` """ route_values = {} @@ -57,8 +57,8 @@ def get_pipeline(self, project, pipeline_id, revision=None): if pipeline_id is not None: route_values['pipelineId'] = self._serialize.url('pipeline_id', pipeline_id, 'int') query_parameters = {} - if revision is not None: - query_parameters['revision'] = self._serialize.query('revision', revision, 'int') + if pipeline_version is not None: + query_parameters['pipelineVersion'] = self._serialize.query('pipeline_version', pipeline_version, 'int') response = self._send(http_method='GET', location_id='28e1305e-2afe-47bf-abaf-cbb0e6a91988', version='5.1-preview.1', @@ -66,3 +66,94 @@ def get_pipeline(self, project, pipeline_id, revision=None): query_parameters=query_parameters) return self._deserialize('Pipeline', response) + def list_pipelines(self, project, order_by=None, top=None, continuation_token=None): + """ListPipelines. + [Preview API] Gets 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 + :param str continuation_token: A continuation token from a previous request, to retrieve the next page of results + :rtype: [Pipeline] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if order_by is not None: + query_parameters['orderBy'] = self._serialize.query('order_by', order_by, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query('top', top, 'int') + if continuation_token is not None: + query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'str') + response = self._send(http_method='GET', + location_id='28e1305e-2afe-47bf-abaf-cbb0e6a91988', + version='5.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('[Pipeline]', self._unwrap_collection(response)) + + def get_run(self, project, pipeline_id, run_id): + """GetRun. + [Preview API] Gets a run for a particular pipeline. + :param str project: Project ID or project name + :param int pipeline_id: The pipeline id + :param int run_id: The run id + :rtype: :class:` ` + """ + 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='7859261e-d2e9-4a68-b820-a5d84cc5bb3d', + version='5.1-preview.1', + route_values=route_values) + return self._deserialize('Run', response) + + def list_runs(self, project, pipeline_id): + """ListRuns. + [Preview API] Gets top 10000 runs for a particular pipeline. + :param str project: Project ID or project name + :param int pipeline_id: The pipeline id + :rtype: [Run] + """ + 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') + response = self._send(http_method='GET', + location_id='7859261e-d2e9-4a68-b820-a5d84cc5bb3d', + version='5.1-preview.1', + route_values=route_values) + return self._deserialize('[Run]', self._unwrap_collection(response)) + + def run_pipeline(self, run_parameters, project, pipeline_id, pipeline_version=None): + """RunPipeline. + [Preview API] Runs a pipeline. + :param :class:` ` run_parameters: Optional. + :param str project: Project ID or project name + :param int pipeline_id: The pipeline id + :param int pipeline_version: The pipeline version + :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') + query_parameters = {} + if pipeline_version is not None: + query_parameters['pipelineVersion'] = self._serialize.query('pipeline_version', pipeline_version, 'int') + content = self._serialize.body(run_parameters, 'RunPipelineParameters') + response = self._send(http_method='POST', + location_id='7859261e-d2e9-4a68-b820-a5d84cc5bb3d', + version='5.1-preview.1', + route_values=route_values, + query_parameters=query_parameters, + content=content) + return self._deserialize('Run', response) + diff --git a/azure-devops/azure/devops/v5_1/provenance/provenance_client.py b/azure-devops/azure/devops/v5_1/provenance/provenance_client.py index a72a5eeb..b44cc5b8 100644 --- a/azure-devops/azure/devops/v5_1/provenance/provenance_client.py +++ b/azure-devops/azure/devops/v5_1/provenance/provenance_client.py @@ -25,14 +25,17 @@ def __init__(self, base_url=None, creds=None): resource_area_identifier = 'b40c1171-807a-493a-8f3f-5c26d5e2f5aa' - def create_session(self, session_request, protocol): + def create_session(self, session_request, protocol, project=None): """CreateSession. [Preview API] Creates a session, a wrapper around a feed that can store additional metadata on the packages published to it. :param :class:` ` session_request: The feed and metadata for the session :param str protocol: The protocol that the session will target + :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 protocol is not None: route_values['protocol'] = self._serialize.url('protocol', protocol, 'str') content = self._serialize.body(session_request, 'SessionRequest') diff --git a/azure-devops/azure/devops/v5_1/py_pi_api/models.py b/azure-devops/azure/devops/v5_1/py_pi_api/models.py index 98490ccf..219e435f 100644 --- a/azure-devops/azure/devops/v5_1/py_pi_api/models.py +++ b/azure-devops/azure/devops/v5_1/py_pi_api/models.py @@ -208,9 +208,11 @@ def __init__(self, links=None): class UpstreamSourceInfo(Model): """UpstreamSourceInfo. + :param display_location: Locator for connecting to the upstream source in a user friendly format, that may potentially change over time + :type display_location: str :param id: Identity of the upstream source. :type id: str - :param location: Locator for connecting to the upstream source. + :param location: Locator for connecting to the upstream source :type location: str :param name: Display name. :type name: str @@ -219,14 +221,16 @@ class UpstreamSourceInfo(Model): """ _attribute_map = { + 'display_location': {'key': 'displayLocation', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'source_type': {'key': 'sourceType', 'type': 'object'} } - def __init__(self, id=None, location=None, name=None, source_type=None): + def __init__(self, display_location=None, id=None, location=None, name=None, source_type=None): super(UpstreamSourceInfo, self).__init__() + self.display_location = display_location self.id = id self.location = location self.name = name diff --git a/azure-devops/azure/devops/v5_1/task_agent/task_agent_client.py b/azure-devops/azure/devops/v5_1/task_agent/task_agent_client.py index 98ab3f6a..bf67f983 100644 --- a/azure-devops/azure/devops/v5_1/task_agent/task_agent_client.py +++ b/azure-devops/azure/devops/v5_1/task_agent/task_agent_client.py @@ -426,6 +426,25 @@ def get_agent_pools(self, pool_name=None, properties=None, pool_type=None, actio 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. + :param [int] pool_ids: pool Ids to fetch + :param str action_filter: Filter by whether the calling user has use or manage permissions + :rtype: [TaskAgentPool] + """ + query_parameters = {} + if pool_ids is not None: + pool_ids = ",".join(map(str, pool_ids)) + query_parameters['poolIds'] = self._serialize.query('pool_ids', pool_ids, 'str') + if action_filter is not None: + query_parameters['actionFilter'] = self._serialize.query('action_filter', action_filter, 'str') + response = self._send(http_method='GET', + location_id='a8c47e17-4d56-4a56-92bb-de7ea7dc65be', + version='5.1-preview.1', + query_parameters=query_parameters) + return self._deserialize('[TaskAgentPool]', self._unwrap_collection(response)) + def update_agent_pool(self, pool, pool_id): """UpdateAgentPool. [Preview API] Update properties on an agent pool diff --git a/azure-devops/azure/devops/v5_1/test/__init__.py b/azure-devops/azure/devops/v5_1/test/__init__.py index 109482fe..b6456e75 100644 --- a/azure-devops/azure/devops/v5_1/test/__init__.py +++ b/azure-devops/azure/devops/v5_1/test/__init__.py @@ -34,11 +34,14 @@ 'FunctionCoverage', 'GraphSubjectBase', 'IdentityRef', + 'JobReference', 'LastResultDetails', 'LinkedWorkItemsQuery', 'LinkedWorkItemsQueryResult', 'ModuleCoverage', 'NameValuePair', + 'PhaseReference', + 'PipelineReference', 'PlanUpdateModel', 'PointAssignment', 'PointsFilter', @@ -58,6 +61,7 @@ 'ShallowReference', 'ShallowTestCaseResult', 'SharedStepModel', + 'StageReference', 'SuiteCreateModel', 'SuiteEntry', 'SuiteEntryUpdateModel', diff --git a/azure-devops/azure/devops/v5_1/test/models.py b/azure-devops/azure/devops/v5_1/test/models.py index 25a3b1f4..9899decc 100644 --- a/azure-devops/azure/devops/v5_1/test/models.py +++ b/azure-devops/azure/devops/v5_1/test/models.py @@ -200,35 +200,35 @@ def __init__(self, results_by_outcome=None, runs_count=None, state=None): class BuildConfiguration(Model): """BuildConfiguration. - :param branch_name: + :param branch_name: Branch name for which build is generated. :type branch_name: str - :param build_definition_id: + :param build_definition_id: BuildDefnitionId for build. :type build_definition_id: int - :param build_system: + :param build_system: Build system. :type build_system: str - :param creation_date: + :param creation_date: Build Creation Date. :type creation_date: datetime - :param flavor: + :param flavor: Build flavor (eg Build/Release). :type flavor: str - :param id: + :param id: BuildConfiguration Id. :type id: int - :param number: + :param number: Build Number. :type number: str - :param platform: + :param platform: BuildConfiguration Platform. :type platform: str - :param project: + :param project: Project associated with this BuildConfiguration. :type project: :class:`ShallowReference ` - :param repository_guid: + :param repository_guid: ResposotoryGuid for the Build. :type repository_guid: str - :param repository_id: + :param repository_id: Repository Id. :type repository_id: int - :param repository_type: + :param repository_type: Repository Type (eg. TFSGit). :type repository_type: str - :param source_version: + :param source_version: Source Version(/first commit) for the build was triggered. :type source_version: str - :param target_branch_name: + :param target_branch_name: Target BranchName. :type target_branch_name: str - :param uri: + :param uri: Build Uri. :type uri: str """ @@ -833,14 +833,34 @@ def __init__(self, _links=None, descriptor=None, display_name=None, url=None, di self.unique_name = unique_name +class JobReference(Model): + """JobReference. + + :param attempt: Attempt number of the job + :type attempt: int + :param job_name: Matrixing in YAML generates copies of a job with different inputs in matrix. JobName is the name of those input. + :type job_name: str + """ + + _attribute_map = { + 'attempt': {'key': 'attempt', 'type': 'int'}, + 'job_name': {'key': 'jobName', 'type': 'str'} + } + + def __init__(self, attempt=None, job_name=None): + super(JobReference, self).__init__() + self.attempt = attempt + self.job_name = job_name + + class LastResultDetails(Model): """LastResultDetails. - :param date_completed: + :param date_completed: CompletedDate of LastResult. :type date_completed: datetime - :param duration: + :param duration: Duration of LastResult. :type duration: long - :param run_by: + :param run_by: RunBy. :type run_by: :class:`IdentityRef ` """ @@ -993,6 +1013,54 @@ def __init__(self, name=None, value=None): self.value = value +class PhaseReference(Model): + """PhaseReference. + + :param attempt: Attempt number of the pahse + :type attempt: int + :param phase_name: Name of the phase + :type phase_name: str + """ + + _attribute_map = { + 'attempt': {'key': 'attempt', 'type': 'int'}, + 'phase_name': {'key': 'phaseName', 'type': 'str'} + } + + def __init__(self, attempt=None, phase_name=None): + super(PhaseReference, self).__init__() + self.attempt = attempt + self.phase_name = phase_name + + +class PipelineReference(Model): + """PipelineReference. + + :param job_reference: Reference of the job + :type job_reference: :class:`JobReference ` + :param phase_reference: Reference of the phase. + :type phase_reference: :class:`PhaseReference ` + :param pipeline_id: Reference of the pipeline with which this pipeline intance is related. + :type pipeline_id: int + :param stage_reference: Reference of the stage. + :type stage_reference: :class:`StageReference ` + """ + + _attribute_map = { + 'job_reference': {'key': 'jobReference', 'type': 'JobReference'}, + 'phase_reference': {'key': 'phaseReference', 'type': 'PhaseReference'}, + 'pipeline_id': {'key': 'pipelineId', 'type': 'int'}, + 'stage_reference': {'key': 'stageReference', 'type': 'StageReference'} + } + + def __init__(self, job_reference=None, phase_reference=None, pipeline_id=None, stage_reference=None): + super(PipelineReference, self).__init__() + self.job_reference = job_reference + self.phase_reference = phase_reference + self.pipeline_id = pipeline_id + self.stage_reference = stage_reference + + class PlanUpdateModel(Model): """PlanUpdateModel. @@ -1216,13 +1284,13 @@ def __init__(self, definition_id=None, environment_definition_id=None): class ReleaseReference(Model): """ReleaseReference. - :param attempt: + :param attempt: Number of Release Attempt. :type attempt: int - :param creation_date: + :param creation_date: Release Creation Date. :type creation_date: datetime :param definition_id: Release definition ID. :type definition_id: int - :param environment_creation_date: + :param environment_creation_date: Environment creation Date. :type environment_creation_date: datetime :param environment_definition_id: Release environment definition ID. :type environment_definition_id: int @@ -1366,7 +1434,7 @@ class RunCreateModel(Model): :type build_flavor: str :param build_platform: Platform of the build used for test run. (E.g.: x86, amd64) :type build_platform: str - :param build_reference: + :param build_reference: BuildReference of the test run. :type build_reference: :class:`BuildConfiguration ` :param comment: Comments entered by those analyzing the run. :type comment: str @@ -1376,7 +1444,7 @@ class RunCreateModel(Model): :type configuration_ids: list of int :param controller: Name of the test controller used for automated run. :type controller: str - :param custom_test_fields: + :param custom_test_fields: Additional properties of test Run. :type custom_test_fields: list of :class:`CustomTestField ` :param dtl_aut_environment: An abstracted reference to DtlAutEnvironment. :type dtl_aut_environment: :class:`ShallowReference ` @@ -1388,7 +1456,7 @@ class RunCreateModel(Model): :type environment_details: :class:`DtlEnvironmentDetails ` :param error_message: Error message associated with the run. :type error_message: str - :param filter: + :param filter: Filter used for discovering the Run. :type filter: :class:`RunFilter ` :param iteration: The iteration in which to create the run. Root iteration of the team project will be default :type iteration: str @@ -1396,35 +1464,37 @@ class RunCreateModel(Model): :type name: str :param owner: Display name of the owner of the run. :type owner: :class:`IdentityRef ` + :param pipeline_reference: Reference of the pipeline to which this test run belongs. PipelineReference.PipelineId should be equal to RunCreateModel.Build.Id + :type pipeline_reference: :class:`PipelineReference ` :param plan: An abstracted reference to the plan that it belongs. :type plan: :class:`ShallowReference ` :param point_ids: IDs of the test points to use in the run. :type point_ids: list of int :param release_environment_uri: URI of release environment associated with the run. :type release_environment_uri: str - :param release_reference: + :param release_reference: Reference to release associated with test run. :type release_reference: :class:`ReleaseReference ` :param release_uri: URI of release associated with the run. :type release_uri: str :param run_summary: Run summary for run Type = NoConfigRun. :type run_summary: list of :class:`RunSummaryModel ` - :param run_timeout: + :param run_timeout: Timespan till the Run RunTimesout. :type run_timeout: object - :param source_workflow: + :param source_workflow: SourceWorkFlow(CI/CD) of the test run. :type source_workflow: str :param start_date: Start date time of the run. :type start_date: str - :param state: The state of the run. Valid states - NotStarted, InProgress, Waiting + :param state: The state of the run. Type TestRunState Valid states - Unspecified ,NotStarted, InProgress, Completed, Waiting, Aborted, NeedsInvestigation :type state: str :param tags: Tags to attach with the test run, maximum of 5 tags can be added to run. :type tags: list of :class:`TestTag ` - :param test_configurations_mapping: + :param test_configurations_mapping: TestConfgurationMapping of the test run. :type test_configurations_mapping: str :param test_environment_id: ID of the test environment associated with the run. :type test_environment_id: str :param test_settings: An abstracted reference to the test settings resource. :type test_settings: :class:`ShallowReference ` - :param type: Type of the run(RunType) + :param type: Type of the run(RunType) Valid Values : (Unspecified, Normal, Blocking, Web, MtrRunInitiatedFromWeb, RunWithDtlEnv, NoConfigRun) :type type: str """ @@ -1449,6 +1519,7 @@ class RunCreateModel(Model): 'iteration': {'key': 'iteration', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'owner': {'key': 'owner', 'type': 'IdentityRef'}, + 'pipeline_reference': {'key': 'pipelineReference', 'type': 'PipelineReference'}, 'plan': {'key': 'plan', 'type': 'ShallowReference'}, 'point_ids': {'key': 'pointIds', 'type': '[int]'}, 'release_environment_uri': {'key': 'releaseEnvironmentUri', 'type': 'str'}, @@ -1466,7 +1537,7 @@ class RunCreateModel(Model): 'type': {'key': 'type', 'type': 'str'} } - def __init__(self, automated=None, build=None, build_drop_location=None, build_flavor=None, build_platform=None, build_reference=None, comment=None, complete_date=None, configuration_ids=None, controller=None, custom_test_fields=None, dtl_aut_environment=None, dtl_test_environment=None, due_date=None, environment_details=None, error_message=None, filter=None, iteration=None, name=None, owner=None, plan=None, point_ids=None, release_environment_uri=None, release_reference=None, release_uri=None, run_summary=None, run_timeout=None, source_workflow=None, start_date=None, state=None, tags=None, test_configurations_mapping=None, test_environment_id=None, test_settings=None, type=None): + def __init__(self, automated=None, build=None, build_drop_location=None, build_flavor=None, build_platform=None, build_reference=None, comment=None, complete_date=None, configuration_ids=None, controller=None, custom_test_fields=None, dtl_aut_environment=None, dtl_test_environment=None, due_date=None, environment_details=None, error_message=None, filter=None, iteration=None, name=None, owner=None, pipeline_reference=None, plan=None, point_ids=None, release_environment_uri=None, release_reference=None, release_uri=None, run_summary=None, run_timeout=None, source_workflow=None, start_date=None, state=None, tags=None, test_configurations_mapping=None, test_environment_id=None, test_settings=None, type=None): super(RunCreateModel, self).__init__() self.automated = automated self.build = build @@ -1488,6 +1559,7 @@ def __init__(self, automated=None, build=None, build_drop_location=None, build_f self.iteration = iteration self.name = name self.owner = owner + self.pipeline_reference = pipeline_reference self.plan = plan self.point_ids = point_ids self.release_environment_uri = release_environment_uri @@ -1528,11 +1600,11 @@ def __init__(self, source_filter=None, test_case_filter=None): class RunStatistic(Model): """RunStatistic. - :param count: + :param count: Test result count fo the given outcome. :type count: int - :param outcome: Test run outcome + :param outcome: Test result outcome :type outcome: str - :param resolution_state: + :param resolution_state: Test run Resolution State. :type resolution_state: :class:`TestResolutionState ` :param state: State of the test run :type state: str @@ -1582,11 +1654,11 @@ class RunUpdateModel(Model): :param build: An abstracted reference to the build that it belongs. :type build: :class:`ShallowReference ` - :param build_drop_location: + :param build_drop_location: Drop location of the build used for test run. :type build_drop_location: str - :param build_flavor: + :param build_flavor: Flavor of the build used for test run. (E.g: Release, Debug) :type build_flavor: str - :param build_platform: + :param build_platform: Platform of the build used for test run. (E.g.: x86, amd64) :type build_platform: str :param comment: Comments entered by those analyzing the run. :type comment: str @@ -1594,7 +1666,7 @@ class RunUpdateModel(Model): :type completed_date: str :param controller: Name of the test controller used for automated run. :type controller: str - :param delete_in_progress_results: + :param delete_in_progress_results: true to delete inProgess Results , false otherwise. :type delete_in_progress_results: bool :param dtl_aut_environment: An abstracted reference to DtlAutEnvironment. :type dtl_aut_environment: :class:`ShallowReference ` @@ -1612,23 +1684,23 @@ class RunUpdateModel(Model): :type log_entries: list of :class:`TestMessageLogDetails ` :param name: Name of the test run. :type name: str - :param release_environment_uri: + :param release_environment_uri: URI of release environment associated with the run. :type release_environment_uri: str - :param release_uri: + :param release_uri: URI of release associated with the run. :type release_uri: str :param run_summary: Run summary for run Type = NoConfigRun. :type run_summary: list of :class:`RunSummaryModel ` - :param source_workflow: + :param source_workflow: SourceWorkFlow(CI/CD) of the test run. :type source_workflow: str :param started_date: Start date time of the run. :type started_date: str :param state: The state of the test run Below are the valid values - NotStarted, InProgress, Completed, Aborted, Waiting :type state: str - :param substate: + :param substate: The types of sub states for test run. :type substate: object :param tags: Tags to attach with the test run. :type tags: list of :class:`TestTag ` - :param test_environment_id: + :param test_environment_id: ID of the test environment associated with the run. :type test_environment_id: str :param test_settings: An abstracted reference to test setting resource. :type test_settings: :class:`ShallowReference ` @@ -1797,6 +1869,26 @@ def __init__(self, id=None, revision=None): self.revision = revision +class StageReference(Model): + """StageReference. + + :param attempt: Attempt number of stage + :type attempt: int + :param stage_name: Name of the stage. + :type stage_name: str + """ + + _attribute_map = { + 'attempt': {'key': 'attempt', 'type': 'int'}, + 'stage_name': {'key': 'stageName', 'type': 'str'} + } + + def __init__(self, attempt=None, stage_name=None): + super(StageReference, self).__init__() + self.attempt = attempt + self.stage_name = stage_name + + class SuiteCreateModel(Model): """SuiteCreateModel. @@ -2134,41 +2226,41 @@ class TestCaseResult(Model): :type automated_test_storage: str :param automated_test_type: Type of automated test. :type automated_test_type: str - :param automated_test_type_id: + :param automated_test_type_id: TypeId of automated test. :type automated_test_type_id: str :param build: Shallow reference to build associated with test result. :type build: :class:`ShallowReference ` :param build_reference: Reference to build associated with test result. :type build_reference: :class:`BuildReference ` - :param comment: Comment in a test result. + :param comment: Comment in a test result with maxSize= 1000 chars. :type comment: str - :param completed_date: Time when test execution completed. + :param completed_date: Time when test execution completed. Completed date should be greater than StartedDate. :type completed_date: datetime :param computer_name: Machine name where test executed. :type computer_name: str - :param configuration: Test configuration of a test result. + :param configuration: Reference to test configuration. Type ShallowReference. :type configuration: :class:`ShallowReference ` :param created_date: Timestamp when test result created. :type created_date: datetime :param custom_fields: Additional properties of test result. :type custom_fields: list of :class:`CustomTestField ` - :param duration_in_ms: Duration of test execution in milliseconds. + :param duration_in_ms: Duration of test execution in milliseconds. If not provided value will be set as CompletedDate - StartedDate :type duration_in_ms: float :param error_message: Error message in test execution. :type error_message: str :param failing_since: Information when test results started failing. :type failing_since: :class:`FailingSince ` - :param failure_type: Failure type of test result. + :param failure_type: Failure type of test result. Valid Value= (Known Issue, New Issue, Regression, Unknown, None) :type failure_type: str :param id: ID of a test result. :type id: int - :param iteration_details: Test result details of test iterations. + :param iteration_details: Test result details of test iterations used only for Manual Testing. :type iteration_details: list of :class:`TestIterationDetailsModel ` :param last_updated_by: Reference to identity last updated test result. :type last_updated_by: :class:`IdentityRef ` :param last_updated_date: Last updated datetime of test result. :type last_updated_date: datetime - :param outcome: Test outcome of test result. + :param outcome: Test outcome of test result. Valid values = (Unspecified, None, Passed, Failed, Inconclusive, Timeout, Aborted, Blocked, NotExecuted, Warning, Error, NotApplicable, Paused, InProgress, NotImpacted) :type outcome: str :param owner: Reference to test owner. :type owner: :class:`IdentityRef ` @@ -2180,7 +2272,7 @@ class TestCaseResult(Model): :type release: :class:`ShallowReference ` :param release_reference: Reference to release associated with test result. :type release_reference: :class:`ReleaseReference ` - :param reset_count: + :param reset_count: ResetCount. :type reset_count: int :param resolution_state: Resolution state of test result. :type resolution_state: str @@ -2192,19 +2284,19 @@ class TestCaseResult(Model): :type revision: int :param run_by: Reference to identity executed the test. :type run_by: :class:`IdentityRef ` - :param stack_trace: Stacktrace. + :param stack_trace: Stacktrace with maxSize= 1000 chars. :type stack_trace: str :param started_date: Time when test execution started. :type started_date: datetime - :param state: State of test result. + :param state: State of test result. Type TestRunState. :type state: str :param sub_results: List of sub results inside a test result, if ResultGroupType is not None, it holds corresponding type sub results. :type sub_results: list of :class:`TestSubResult ` :param test_case: Reference to the test executed. :type test_case: :class:`ShallowReference ` - :param test_case_reference_id: Reference ID of test used by test result. + :param test_case_reference_id: Reference ID of test used by test result. Type TestResultMetaData :type test_case_reference_id: int - :param test_case_revision: Name of test. + :param test_case_revision: TestCaseRevision Number. :type test_case_revision: int :param test_case_title: Name of test. :type test_case_title: str @@ -2528,9 +2620,9 @@ def __init__(self, area=None, description=None, id=None, is_default=None, last_u class TestEnvironment(Model): """TestEnvironment. - :param environment_id: + :param environment_id: Test Environment Id. :type environment_id: str - :param environment_name: + :param environment_name: Test Environment Name. :type environment_name: str """ @@ -3076,9 +3168,9 @@ def __init__(self, order_by=None, points=None, points_filter=None, wit_fields=No class TestResolutionState(Model): """TestResolutionState. - :param id: + :param id: Test Resolution state Id. :type id: int - :param name: + :param name: Test Resolution State Name. :type name: str :param project: :type project: :class:`ShallowReference ` @@ -3664,13 +3756,13 @@ class TestRun(Model): :type comment: str :param completed_date: Completed date time of the run. :type completed_date: datetime - :param controller: + :param controller: Test Run Controller. :type controller: str - :param created_date: + :param created_date: Test Run CreatedDate. :type created_date: datetime - :param custom_fields: + :param custom_fields: List of Custom Fields for TestRun. :type custom_fields: list of :class:`CustomTestField ` - :param drop_location: + :param drop_location: Drop Location for the test Run. :type drop_location: str :param dtl_aut_environment: :type dtl_aut_environment: :class:`ShallowReference ` @@ -3686,7 +3778,7 @@ class TestRun(Model): :type filter: :class:`RunFilter ` :param id: ID of the test run. :type id: int - :param incomplete_tests: + :param incomplete_tests: Number of Incomplete Tests. :type incomplete_tests: int :param is_automated: true if test run is automated, false otherwise. :type is_automated: bool @@ -3698,35 +3790,35 @@ class TestRun(Model): :type last_updated_date: datetime :param name: Name of the test run. :type name: str - :param not_applicable_tests: + :param not_applicable_tests: Number of Not Applicable Tests. :type not_applicable_tests: int :param owner: Team Foundation ID of the owner of the runs. :type owner: :class:`IdentityRef ` :param passed_tests: Number of passed tests in the run :type passed_tests: int - :param phase: + :param phase: Phase/State for the testRun. :type phase: str :param plan: Test plan associated with this test run. :type plan: :class:`ShallowReference ` - :param post_process_state: + :param post_process_state: Post Process State. :type post_process_state: str :param project: Project associated with this run. :type project: :class:`ShallowReference ` - :param release: + :param release: Release Reference for the Test Run. :type release: :class:`ReleaseReference ` - :param release_environment_uri: + :param release_environment_uri: Release Environment Uri for TestRun. :type release_environment_uri: str - :param release_uri: + :param release_uri: Release Uri for TestRun. :type release_uri: str :param revision: :type revision: int - :param run_statistics: + :param run_statistics: RunSummary by outcome. :type run_statistics: list of :class:`RunStatistic ` :param started_date: Start date time of the run. :type started_date: datetime - :param state: The state of the run. { NotStarted, InProgress, Waiting } + :param state: The state of the run. Type TestRunState Valid states - Unspecified ,NotStarted, InProgress, Completed, Waiting, Aborted, NeedsInvestigation :type state: str - :param substate: + :param substate: TestRun Substate. :type substate: object :param tags: Tags attached with this test run. :type tags: list of :class:`TestTag ` @@ -3738,11 +3830,11 @@ class TestRun(Model): :type test_settings: :class:`ShallowReference ` :param total_tests: Total tests in the run :type total_tests: int - :param unanalyzed_tests: + :param unanalyzed_tests: Number of failed tests in the run. :type unanalyzed_tests: int :param url: Url of the test run :type url: str - :param web_access_url: + :param web_access_url: Web Access Url for TestRun. :type web_access_url: str """ @@ -4320,15 +4412,15 @@ def __init__(self, description=None, id=None, name=None, project=None, revision= class WorkItemReference(Model): """WorkItemReference. - :param id: + :param id: WorkItem Id. :type id: str - :param name: + :param name: WorkItem Name. :type name: str - :param type: + :param type: WorkItem Type. :type type: str - :param url: + :param url: WorkItem Url. Valid Values : (Bug, Task, User Story, Test Case) :type url: str - :param web_url: + :param web_url: WorkItem WebUrl. :type web_url: str """ @@ -4448,11 +4540,14 @@ def __init__(self, comment=None, completed_date=None, duration_in_ms=None, error 'FunctionCoverage', 'GraphSubjectBase', 'IdentityRef', + 'JobReference', 'LastResultDetails', 'LinkedWorkItemsQuery', 'LinkedWorkItemsQueryResult', 'ModuleCoverage', 'NameValuePair', + 'PhaseReference', + 'PipelineReference', 'PlanUpdateModel', 'PointAssignment', 'PointsFilter', @@ -4472,6 +4567,7 @@ def __init__(self, comment=None, completed_date=None, duration_in_ms=None, error 'ShallowReference', 'ShallowTestCaseResult', 'SharedStepModel', + 'StageReference', 'SuiteCreateModel', 'SuiteEntry', 'SuiteEntryUpdateModel', diff --git a/azure-devops/azure/devops/v5_1/test/test_client.py b/azure-devops/azure/devops/v5_1/test/test_client.py index 3701c663..c8fa437f 100644 --- a/azure-devops/azure/devops/v5_1/test/test_client.py +++ b/azure-devops/azure/devops/v5_1/test/test_client.py @@ -761,7 +761,7 @@ def update_test_results(self, results, project, run_id): def get_test_run_statistics(self, project, run_id): """GetTestRunStatistics. - [Preview API] Get test run statistics + [Preview API] Get test run statistics , used when we want to get summary of a run by outcome. :param str project: Project ID or project name :param int run_id: ID of the run to get. :rtype: :class:` ` diff --git a/azure-devops/azure/devops/v5_1/test_plan/models.py b/azure-devops/azure/devops/v5_1/test_plan/models.py index 72100565..129241be 100644 --- a/azure-devops/azure/devops/v5_1/test_plan/models.py +++ b/azure-devops/azure/devops/v5_1/test_plan/models.py @@ -372,11 +372,11 @@ def __init__(self, _links=None, descriptor=None, display_name=None, url=None, di class LastResultDetails(Model): """LastResultDetails. - :param date_completed: + :param date_completed: CompletedDate of LastResult. :type date_completed: datetime - :param duration: + :param duration: Duration of LastResult. :type duration: long - :param run_by: + :param run_by: RunBy. :type run_by: :class:`IdentityRef ` """ @@ -739,9 +739,9 @@ def __init__(self, id=None, name=None): class TestEnvironment(Model): """TestEnvironment. - :param environment_id: + :param environment_id: Test Environment Id. :type environment_id: str - :param environment_name: + :param environment_name: Test Environment Name. :type environment_name: str """ diff --git a/azure-devops/azure/devops/v5_1/test_plan/test_plan_client.py b/azure-devops/azure/devops/v5_1/test_plan/test_plan_client.py index 3194f46b..d3029f74 100644 --- a/azure-devops/azure/devops/v5_1/test_plan/test_plan_client.py +++ b/azure-devops/azure/devops/v5_1/test_plan/test_plan_client.py @@ -405,10 +405,10 @@ def get_suites_by_test_case_id(self, test_case_id): def add_test_cases_to_suite(self, suite_test_case_create_update_parameters, project, plan_id, suite_id): """AddTestCasesToSuite. [Preview API] Add test cases to a suite with specified configurations - :param [SuiteTestCaseCreateUpdateParameters] suite_test_case_create_update_parameters: + :param [SuiteTestCaseCreateUpdateParameters] suite_test_case_create_update_parameters: SuiteTestCaseCreateUpdateParameters object. :param str project: Project ID or project name - :param int plan_id: - :param int suite_id: + :param int plan_id: ID of the test plan to which test cases are to be added. + :param int suite_id: ID of the test suite to which test cases are to be added. :rtype: [TestCase] """ route_values = {} @@ -428,12 +428,12 @@ def add_test_cases_to_suite(self, suite_test_case_create_update_parameters, proj def get_test_case(self, project, plan_id, suite_id, test_case_ids, wit_fields=None): """GetTestCase. - [Preview API] + [Preview API] Get Test Cases For a Suite. :param str project: Project ID or project name - :param int plan_id: - :param int suite_id: - :param str test_case_ids: - :param str wit_fields: + :param int plan_id: ID of the test plan for which test cases are requested. + :param int suite_id: ID of the test suite for which test cases are requested. + :param str test_case_ids: Test Case Ids to be fetched. + :param str wit_fields: Get the list of witFields. :rtype: [TestCase] """ route_values = {} @@ -459,12 +459,12 @@ def get_test_case_list(self, project, plan_id, suite_id, test_ids=None, configur """GetTestCaseList. [Preview API] Get Test Case List return those test cases which have all the configuration Ids as mentioned in the optional paramter. If configuration Ids is null, it return all the test cases :param str project: Project ID or project name - :param int plan_id: - :param int suite_id: - :param str test_ids: - :param str configuration_ids: - :param str wit_fields: - :param str continuation_token: + :param int plan_id: ID of the test plan for which test cases are requested. + :param int suite_id: ID of the test suite for which test cases are requested. + :param str test_ids: Test Case Ids to be fetched. + :param str configuration_ids: Fetch Test Cases which contains all the configuration Ids specified. + :param str wit_fields: Get the list of witFields. + :param str continuation_token: If the list of test cases returned is not complete, a continuation token to query next batch of test cases is included in the response header as "x-ms-continuationtoken". Omit this parameter to get the first batch of test cases. :rtype: [TestCase] """ route_values = {} @@ -494,9 +494,9 @@ def remove_test_cases_from_suite(self, project, plan_id, suite_id, test_case_ids """RemoveTestCasesFromSuite. [Preview API] Removes test cases from a suite based on the list of test case Ids provided. :param str project: Project ID or project name - :param int plan_id: - :param int suite_id: - :param str test_case_ids: + :param int plan_id: ID of the test plan from which test cases are to be removed. + :param int suite_id: ID of the test suite from which test cases are to be removed. + :param str test_case_ids: Test Case Ids to be removed. """ route_values = {} if project is not None: @@ -515,10 +515,10 @@ def remove_test_cases_from_suite(self, project, plan_id, suite_id, test_case_ids def update_suite_test_cases(self, suite_test_case_create_update_parameters, project, plan_id, suite_id): """UpdateSuiteTestCases. [Preview API] Update the configurations for test cases - :param [SuiteTestCaseCreateUpdateParameters] suite_test_case_create_update_parameters: + :param [SuiteTestCaseCreateUpdateParameters] suite_test_case_create_update_parameters: A SuiteTestCaseCreateUpdateParameters object. :param str project: Project ID or project name - :param int plan_id: - :param int suite_id: + :param int plan_id: ID of the test plan to which test cases are to be updated. + :param int suite_id: ID of the test suite to which test cases are to be updated. :rtype: [TestCase] """ route_values = {} @@ -597,9 +597,9 @@ def get_points(self, project, plan_id, suite_id, point_ids): """GetPoints. [Preview API] Get a list of points based on point Ids provided. :param str project: Project ID or project name - :param int plan_id: - :param int suite_id: - :param str point_ids: + :param int plan_id: ID of the test plan for which test points are requested. + :param int suite_id: ID of the test suite for which test points are requested. + :param str point_ids: ID of test points to be fetched. :rtype: [TestPoint] """ route_values = {} @@ -621,11 +621,11 @@ def get_points_list(self, project, plan_id, suite_id, test_point_ids=None, test_ """GetPointsList. [Preview API] Get all the points inside a suite based on some filters :param str project: Project ID or project name - :param int plan_id: - :param int suite_id: - :param str test_point_ids: - :param str test_case_id: - :param str continuation_token: + :param int plan_id: ID of the test plan for which test points are requested. + :param int suite_id: ID of the test suite for which test points are requested + :param str test_point_ids: ID of test points to fetch. + :param str test_case_id: Get Test Points for specific test case Ids. + :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. :rtype: [TestPoint] """ route_values = {} @@ -652,10 +652,10 @@ def get_points_list(self, project, plan_id, suite_id, test_point_ids=None, test_ def update_test_points(self, test_point_update_params, project, plan_id, suite_id): """UpdateTestPoints. [Preview API] Update Test Points. This is used to Reset test point to active, update the outcome of a test point or update the tester of a test point - :param [TestPointUpdateParams] test_point_update_params: + :param [TestPointUpdateParams] test_point_update_params: A TestPointUpdateParams Object. :param str project: Project ID or project name - :param int plan_id: - :param int suite_id: + :param int plan_id: ID of the test plan for which test points are requested. + :param int suite_id: ID of the test suite for which test points are requested. :rtype: [TestPoint] """ route_values = {} diff --git a/azure-devops/azure/devops/v5_1/work/work_client.py b/azure-devops/azure/devops/v5_1/work/work_client.py index f6bb6f63..0816c889 100644 --- a/azure-devops/azure/devops/v5_1/work/work_client.py +++ b/azure-devops/azure/devops/v5_1/work/work_client.py @@ -546,7 +546,7 @@ def get_board_card_rule_settings(self, team_context, board): route_values['board'] = self._serialize.url('board', board, 'str') response = self._send(http_method='GET', location_id='b044a3d9-02ea-49c7-91a1-b730949cc896', - version='5.1-preview.1', + version='5.1-preview.2', route_values=route_values) return self._deserialize('BoardCardRuleSettings', response) @@ -580,11 +580,41 @@ def update_board_card_rule_settings(self, board_card_rule_settings, team_context content = self._serialize.body(board_card_rule_settings, 'BoardCardRuleSettings') response = self._send(http_method='PATCH', location_id='b044a3d9-02ea-49c7-91a1-b730949cc896', - version='5.1-preview.1', + version='5.1-preview.2', route_values=route_values, content=content) return self._deserialize('BoardCardRuleSettings', response) + def update_taskboard_card_rule_settings(self, board_card_rule_settings, team_context): + """UpdateTaskboardCardRuleSettings. + [Preview API] Update taskboard card Rule settings + :param :class:` ` board_card_rule_settings: + :param :class:` ` team_context: The team context for the operation + """ + project = None + team = None + if team_context is not None: + if team_context.project_id: + project = team_context.project_id + else: + project = team_context.project + if team_context.team_id: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + content = self._serialize.body(board_card_rule_settings, 'BoardCardRuleSettings') + self._send(http_method='PATCH', + location_id='3f84a8d1-1aab-423e-a94b-6dcbdcca511f', + version='5.1-preview.2', + route_values=route_values, + content=content) + def get_board_card_settings(self, team_context, board): """GetBoardCardSettings. [Preview API] Get board card settings for the board id or board by name @@ -613,7 +643,7 @@ def get_board_card_settings(self, team_context, board): route_values['board'] = self._serialize.url('board', board, 'str') response = self._send(http_method='GET', location_id='07c3b467-bc60-4f05-8e34-599ce288fafc', - version='5.1-preview.1', + version='5.1-preview.2', route_values=route_values) return self._deserialize('BoardCardSettings', response) @@ -647,11 +677,41 @@ def update_board_card_settings(self, board_card_settings_to_save, team_context, content = self._serialize.body(board_card_settings_to_save, 'BoardCardSettings') response = self._send(http_method='PUT', location_id='07c3b467-bc60-4f05-8e34-599ce288fafc', - version='5.1-preview.1', + version='5.1-preview.2', route_values=route_values, content=content) return self._deserialize('BoardCardSettings', response) + def update_taskboard_card_settings(self, board_card_settings_to_save, team_context): + """UpdateTaskboardCardSettings. + [Preview API] Update taskboard card settings + :param :class:` ` board_card_settings_to_save: + :param :class:` ` team_context: The team context for the operation + """ + project = None + team = None + if team_context is not None: + if team_context.project_id: + project = team_context.project_id + else: + project = team_context.project + if team_context.team_id: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + content = self._serialize.body(board_card_settings_to_save, 'BoardCardSettings') + self._send(http_method='PUT', + location_id='0d63745f-31f3-4cf3-9056-2a064e567637', + version='5.1-preview.2', + route_values=route_values, + content=content) + def get_board_chart(self, team_context, board, name): """GetBoardChart. [Preview API] Get a board chart diff --git a/azure-devops/azure/devops/v5_1/work_item_tracking/__init__.py b/azure-devops/azure/devops/v5_1/work_item_tracking/__init__.py index 7bca4a9a..84d16ffa 100644 --- a/azure-devops/azure/devops/v5_1/work_item_tracking/__init__.py +++ b/azure-devops/azure/devops/v5_1/work_item_tracking/__init__.py @@ -22,8 +22,8 @@ 'Comment', 'CommentCreate', 'CommentList', + 'CommentMention', 'CommentReaction', - 'CommentReportingList', 'CommentUpdate', 'CommentVersion', 'FieldDependentRule', diff --git a/azure-devops/azure/devops/v5_1/work_item_tracking/models.py b/azure-devops/azure/devops/v5_1/work_item_tracking/models.py index f716a6d3..082b8cb2 100644 --- a/azure-devops/azure/devops/v5_1/work_item_tracking/models.py +++ b/azure-devops/azure/devops/v5_1/work_item_tracking/models.py @@ -1782,6 +1782,8 @@ class Comment(WorkItemTrackingResource): :type id: int :param is_deleted: Indicates if the comment has been deleted. :type is_deleted: bool + :param mentions: The mentions of the comment. + :type mentions: list of :class:`CommentMention ` :param modified_by: IdentityRef of the user who last modified the comment. :type modified_by: :class:`IdentityRef ` :param modified_date: The last modification date of the comment. @@ -1805,6 +1807,7 @@ class Comment(WorkItemTrackingResource): 'created_on_behalf_of': {'key': 'createdOnBehalfOf', 'type': 'IdentityRef'}, 'id': {'key': 'id', 'type': 'int'}, 'is_deleted': {'key': 'isDeleted', 'type': 'bool'}, + 'mentions': {'key': 'mentions', 'type': '[CommentMention]'}, 'modified_by': {'key': 'modifiedBy', 'type': 'IdentityRef'}, 'modified_date': {'key': 'modifiedDate', 'type': 'iso-8601'}, 'reactions': {'key': 'reactions', 'type': '[CommentReaction]'}, @@ -1813,7 +1816,7 @@ class Comment(WorkItemTrackingResource): 'work_item_id': {'key': 'workItemId', 'type': 'int'} } - def __init__(self, url=None, _links=None, created_by=None, created_date=None, created_on_behalf_date=None, created_on_behalf_of=None, id=None, is_deleted=None, modified_by=None, modified_date=None, reactions=None, text=None, version=None, work_item_id=None): + def __init__(self, url=None, _links=None, created_by=None, created_date=None, created_on_behalf_date=None, created_on_behalf_of=None, id=None, is_deleted=None, mentions=None, modified_by=None, modified_date=None, reactions=None, text=None, version=None, work_item_id=None): super(Comment, self).__init__(url=url, _links=_links) self.created_by = created_by self.created_date = created_date @@ -1821,6 +1824,7 @@ def __init__(self, url=None, _links=None, created_by=None, created_date=None, cr self.created_on_behalf_of = created_on_behalf_of self.id = id self.is_deleted = is_deleted + self.mentions = mentions self.modified_by = modified_by self.modified_date = modified_date self.reactions = reactions @@ -1867,6 +1871,40 @@ def __init__(self, url=None, _links=None, comments=None, continuation_token=None self.total_count = total_count +class CommentMention(WorkItemTrackingResource): + """CommentMention. + + :param url: + :type url: str + :param _links: Link references to related REST resources. + :type _links: :class:`ReferenceLinks ` + :param artifact_id: The artifact portion of the parsed text. (i.e. the work item's id) + :type artifact_id: str + :param artifact_type: The type the parser assigned to the mention. (i.e. person, work item, etc) + :type artifact_type: str + :param comment_id: The comment id of the mention. + :type comment_id: int + :param target_id: The resolved target of the mention. An example of this could be a user's tfid + :type target_id: str + """ + + _attribute_map = { + 'url': {'key': 'url', 'type': 'str'}, + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'artifact_id': {'key': 'artifactId', 'type': 'str'}, + 'artifact_type': {'key': 'artifactType', 'type': 'str'}, + 'comment_id': {'key': 'commentId', 'type': 'int'}, + 'target_id': {'key': 'targetId', 'type': 'str'} + } + + def __init__(self, url=None, _links=None, artifact_id=None, artifact_type=None, comment_id=None, target_id=None): + super(CommentMention, self).__init__(url=url, _links=_links) + self.artifact_id = artifact_id + self.artifact_type = artifact_type + self.comment_id = comment_id + self.target_id = target_id + + class CommentReaction(WorkItemTrackingResource): """CommentReaction. @@ -1901,43 +1939,6 @@ def __init__(self, url=None, _links=None, comment_id=None, count=None, is_curren self.type = type -class CommentReportingList(CommentList): - """CommentReportingList. - - :param url: - :type url: str - :param _links: Link references to related REST resources. - :type _links: :class:`ReferenceLinks ` - :param comments: List of comments in the current batch. - :type comments: list of :class:`Comment ` - :param continuation_token: A string token that can be used to retrieving next page of comments if available. Otherwise null. - :type continuation_token: str - :param count: The count of comments in the current batch. - :type count: int - :param next_page: Uri to the next page of comments if it is available. Otherwise null. - :type next_page: str - :param total_count: Total count of comments on a work item. - :type total_count: int - :param is_last_batch: Indicates if this is the last batch. - :type is_last_batch: bool - """ - - _attribute_map = { - 'url': {'key': 'url', 'type': 'str'}, - '_links': {'key': '_links', 'type': 'ReferenceLinks'}, - 'comments': {'key': 'comments', 'type': '[Comment]'}, - 'continuation_token': {'key': 'continuationToken', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'int'}, - 'next_page': {'key': 'nextPage', 'type': 'str'}, - 'total_count': {'key': 'totalCount', 'type': 'int'}, - 'is_last_batch': {'key': 'isLastBatch', 'type': 'bool'} - } - - def __init__(self, url=None, _links=None, comments=None, continuation_token=None, count=None, next_page=None, total_count=None, is_last_batch=None): - super(CommentReportingList, self).__init__(url=url, _links=_links, comments=comments, continuation_token=continuation_token, count=count, next_page=next_page, total_count=total_count) - self.is_last_batch = is_last_batch - - class CommentVersion(WorkItemTrackingResource): """CommentVersion. @@ -2588,8 +2589,8 @@ def __init__(self, url=None, _links=None, description=None, id=None, name=None, 'WorkItemUpdate', 'Comment', 'CommentList', + 'CommentMention', 'CommentReaction', - 'CommentReportingList', 'CommentVersion', 'FieldDependentRule', 'QueryHierarchyItem', diff --git a/azure-devops/azure/devops/v5_1/work_item_tracking/work_item_tracking_client.py b/azure-devops/azure/devops/v5_1/work_item_tracking/work_item_tracking_client.py index 5188b345..e2d3b74f 100644 --- a/azure-devops/azure/devops/v5_1/work_item_tracking/work_item_tracking_client.py +++ b/azure-devops/azure/devops/v5_1/work_item_tracking/work_item_tracking_client.py @@ -531,35 +531,6 @@ def get_comment_reactions(self, project, work_item_id, comment_id): route_values=route_values) return self._deserialize('[CommentReaction]', self._unwrap_collection(response)) - def read_reporting_comments(self, project, continuation_token=None, top=None, include_deleted=None, expand=None): - """ReadReportingComments. - [Preview API] - :param str project: Project ID or project name - :param str continuation_token: - :param int top: - :param bool include_deleted: - :param str expand: - :rtype: :class:` ` - """ - route_values = {} - if project is not None: - route_values['project'] = self._serialize.url('project', project, 'str') - query_parameters = {} - if continuation_token is not None: - query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'str') - if top is not None: - query_parameters['top'] = self._serialize.query('top', top, 'int') - if include_deleted is not None: - query_parameters['includeDeleted'] = self._serialize.query('include_deleted', include_deleted, 'bool') - if expand is not None: - query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') - response = self._send(http_method='GET', - location_id='370b8590-9562-42be-b0d8-ac06668fc5dc', - version='5.1-preview.1', - route_values=route_values, - query_parameters=query_parameters) - return self._deserialize('CommentReportingList', response) - def get_comment_version(self, project, work_item_id, comment_id, version): """GetCommentVersion. [Preview API]