diff --git a/azure-devops/azure/devops/v5_1/cix/__init__.py b/azure-devops/azure/devops/v5_1/cix/__init__.py index bf3d8afc..07cc0f94 100644 --- a/azure-devops/azure/devops/v5_1/cix/__init__.py +++ b/azure-devops/azure/devops/v5_1/cix/__init__.py @@ -11,6 +11,7 @@ __all__ = [ 'ConfigurationFile', + 'CreatedResources', 'CreatePipelineConnectionInputs', 'DetectedBuildFramework', 'DetectedBuildTarget', @@ -19,9 +20,11 @@ 'OperationResultReference', 'PipelineConnection', 'ReferenceLinks', + 'ResourceCreationParameter', 'TeamProject', 'TeamProjectReference', 'Template', + 'TemplateAsset', 'TemplateParameterDefinition', 'TemplateParameters', 'WebApiTeamRef', diff --git a/azure-devops/azure/devops/v5_1/cix/cix_client.py b/azure-devops/azure/devops/v5_1/cix/cix_client.py index dff4428d..f6e35ae1 100644 --- a/azure-devops/azure/devops/v5_1/cix/cix_client.py +++ b/azure-devops/azure/devops/v5_1/cix/cix_client.py @@ -54,22 +54,9 @@ def get_configurations(self, project, repository_type=None, repository_id=None, query_parameters=query_parameters) return self._deserialize('[ConfigurationFile]', self._unwrap_collection(response)) - def create_connection(self, create_connection_inputs): - """CreateConnection. - [Preview API] LEGACY METHOD - Obsolete Creates a new team project with the name provided if one does not already exist and then creates a new Pipeline connection within that project. Returns an Operation object that wraps the Job and provides status - :param :class:` ` create_connection_inputs: - :rtype: :class:` ` - """ - content = self._serialize.body(create_connection_inputs, 'CreatePipelineConnectionInputs') - response = self._send(http_method='POST', - location_id='00df4879-9216-45d5-b38d-4a487b626b2c', - version='5.1-preview.1', - content=content) - return self._deserialize('Operation', response) - def create_project_connection(self, create_connection_inputs, project): """CreateProjectConnection. - [Preview API] Creates a new team project with the name provided if one does not already exist and then creates a new Pipeline connection within that project. Returns an Operation object that wraps the Job and provides status + [Preview API] Creates a new Pipeline connection between the provider installation and the specified project. Returns the PipelineConnection object created. :param :class:` ` create_connection_inputs: :param str project: :rtype: :class:` ` @@ -146,6 +133,24 @@ def get_template_recommendations(self, project, repository_type=None, repository query_parameters=query_parameters) return self._deserialize('[Template]', self._unwrap_collection(response)) + def create_resources(self, creation_parameters, project): + """CreateResources. + [Preview API] + :param {ResourceCreationParameter} creation_parameters: + :param str project: Project ID or project name + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(creation_parameters, '{ResourceCreationParameter}') + response = self._send(http_method='POST', + location_id='43201899-7690-4870-9c79-ab69605f21ed', + version='5.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('CreatedResources', response) + def render_template(self, template_parameters, template_id): """RenderTemplate. [Preview API] diff --git a/azure-devops/azure/devops/v5_1/cix/models.py b/azure-devops/azure/devops/v5_1/cix/models.py index c1f0273c..8c2c654f 100644 --- a/azure-devops/azure/devops/v5_1/cix/models.py +++ b/azure-devops/azure/devops/v5_1/cix/models.py @@ -33,13 +33,29 @@ def __init__(self, content=None, is_base64_encoded=None, path=None): self.path = path +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): + super(CreatedResources, self).__init__() + self.error = error + self.resources = resources + + class CreatePipelineConnectionInputs(Model): """CreatePipelineConnectionInputs. - :param configuration_file_path: The path to the VSTS YAML file in the repository. (use only forward slashes as path separators) - :type configuration_file_path: str - :param create_build_definition: Use true to create a build definition for this connection. Requires repository information be supplied. - :type create_build_definition: bool :param project: The team project settings for an existing team project or for a new team project. :type project: :class:`TeamProject ` :param provider_data: This dictionary contains information that is specific to the provider. This data is opaque to the rest of the Pipelines infrastructure and does NOT contribute to the resources Token. The format of the string and its contents depend on the implementation of the provider. @@ -48,45 +64,25 @@ class CreatePipelineConnectionInputs(Model): :type provider_id: str :param redirect_url: If provided, this will be the URL returned with the PipelineConnection. This will override any other redirect URL that would have been generated for the connection. :type redirect_url: str - :param repository_id: The repository id for which the connection is being made. This may be the same as the name. - :type repository_id: str - :param repository_name: The repository name for which the connection is being made. - :type repository_name: str :param request_source: Where the request to create the pipeline originated (such as 'GitHub Marketplace' or 'Azure DevOps') :type request_source: str - :param routing_method: The method used to identify the target hostd. - :type routing_method: object - :param target_branch: The target branch for which the connection is being made. - :type target_branch: str """ _attribute_map = { - 'configuration_file_path': {'key': 'configurationFilePath', 'type': 'str'}, - 'create_build_definition': {'key': 'createBuildDefinition', 'type': 'bool'}, 'project': {'key': 'project', 'type': 'TeamProject'}, 'provider_data': {'key': 'providerData', 'type': '{str}'}, 'provider_id': {'key': 'providerId', 'type': 'str'}, 'redirect_url': {'key': 'redirectUrl', 'type': 'str'}, - 'repository_id': {'key': 'repositoryId', 'type': 'str'}, - 'repository_name': {'key': 'repositoryName', 'type': 'str'}, - 'request_source': {'key': 'requestSource', 'type': 'str'}, - 'routing_method': {'key': 'routingMethod', 'type': 'object'}, - 'target_branch': {'key': 'targetBranch', 'type': 'str'} + 'request_source': {'key': 'requestSource', 'type': 'str'} } - def __init__(self, configuration_file_path=None, create_build_definition=None, project=None, provider_data=None, provider_id=None, redirect_url=None, repository_id=None, repository_name=None, request_source=None, routing_method=None, target_branch=None): + def __init__(self, project=None, provider_data=None, provider_id=None, redirect_url=None, request_source=None): super(CreatePipelineConnectionInputs, self).__init__() - self.configuration_file_path = configuration_file_path - self.create_build_definition = create_build_definition self.project = project self.provider_data = provider_data self.provider_id = provider_id self.redirect_url = redirect_url - self.repository_id = repository_id - self.repository_name = repository_name self.request_source = request_source - self.routing_method = routing_method - self.target_branch = target_branch class DetectedBuildFramework(Model): @@ -233,6 +229,26 @@ def __init__(self, links=None): self.links = links +class ResourceCreationParameter(Model): + """ResourceCreationParameter. + + :param resource_to_create: + :type resource_to_create: :class:`object ` + :param type: + :type type: str + """ + + _attribute_map = { + 'resource_to_create': {'key': 'resourceToCreate', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'} + } + + def __init__(self, resource_to_create=None, type=None): + super(ResourceCreationParameter, self).__init__() + self.resource_to_create = resource_to_create + self.type = type + + class TeamProjectReference(Model): """TeamProjectReference. @@ -288,6 +304,8 @@ def __init__(self, abbreviation=None, default_team_image_url=None, description=N class Template(Model): """Template. + :param assets: + :type assets: list of :class:`TemplateAsset ` :param content: :type content: str :param description: @@ -305,6 +323,7 @@ class Template(Model): """ _attribute_map = { + 'assets': {'key': 'assets', 'type': '[TemplateAsset]'}, 'content': {'key': 'content', 'type': 'str'}, 'description': {'key': 'description', 'type': 'str'}, 'icon_url': {'key': 'iconUrl', 'type': 'str'}, @@ -314,8 +333,9 @@ class Template(Model): 'recommended_weight': {'key': 'recommendedWeight', 'type': 'int'} } - def __init__(self, content=None, description=None, icon_url=None, id=None, name=None, parameters=None, recommended_weight=None): + def __init__(self, assets=None, content=None, description=None, icon_url=None, id=None, name=None, parameters=None, recommended_weight=None): super(Template, self).__init__() + self.assets = assets self.content = content self.description = description self.icon_url = icon_url @@ -325,9 +345,45 @@ def __init__(self, content=None, description=None, icon_url=None, id=None, name= self.recommended_weight = recommended_weight +class TemplateAsset(Model): + """TemplateAsset. + + :param content: + :type content: str + :param description: + :type description: str + :param destination_path: + :type destination_path: str + :param path: + :type path: str + :param type: + :type type: str + """ + + _attribute_map = { + 'content': {'key': 'content', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'destination_path': {'key': 'destinationPath', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'} + } + + def __init__(self, content=None, description=None, destination_path=None, path=None, type=None): + super(TemplateAsset, self).__init__() + self.content = content + self.description = description + self.destination_path = destination_path + self.path = path + self.type = type + + class TemplateParameterDefinition(Model): """TemplateParameterDefinition. + :param default_value: + :type default_value: str + :param display_name: + :type display_name: str :param name: :type name: str :param required: @@ -337,13 +393,17 @@ class TemplateParameterDefinition(Model): """ _attribute_map = { + 'default_value': {'key': 'defaultValue', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'required': {'key': 'required', 'type': 'bool'}, 'type': {'key': 'type', 'type': 'str'} } - def __init__(self, name=None, required=None, type=None): + def __init__(self, default_value=None, display_name=None, name=None, required=None, type=None): super(TemplateParameterDefinition, self).__init__() + self.default_value = default_value + self.display_name = display_name self.name = name self.required = required self.type = type @@ -357,7 +417,7 @@ class TemplateParameters(Model): """ _attribute_map = { - 'tokens': {'key': 'tokens', 'type': '{str}'} + 'tokens': {'key': 'tokens', 'type': '{object}'} } def __init__(self, tokens=None): @@ -485,6 +545,7 @@ def __init__(self, abbreviation=None, default_team_image_url=None, description=N __all__ = [ 'ConfigurationFile', + 'CreatedResources', 'CreatePipelineConnectionInputs', 'DetectedBuildFramework', 'DetectedBuildTarget', @@ -492,8 +553,10 @@ def __init__(self, abbreviation=None, default_team_image_url=None, description=N 'OperationResultReference', 'PipelineConnection', 'ReferenceLinks', + 'ResourceCreationParameter', 'TeamProjectReference', 'Template', + 'TemplateAsset', 'TemplateParameterDefinition', 'TemplateParameters', 'WebApiTeamRef', diff --git a/azure-devops/azure/devops/v5_1/client_factory.py b/azure-devops/azure/devops/v5_1/client_factory.py index bc5110e7..d1dbcb1a 100644 --- a/azure-devops/azure/devops/v5_1/client_factory.py +++ b/azure-devops/azure/devops/v5_1/client_factory.py @@ -309,6 +309,13 @@ def get_test_client(self): """ return self._connection.get_client('azure.devops.v5_1.test.test_client.TestClient') + def get_test_plan_client(self): + """get_test_plan_client. + Gets the 5.1 version of the TestPlanClient + :rtype: :class:` ` + """ + return self._connection.get_client('azure.devops.v5_1.test_plan.test_plan_client.TestPlanClient') + def get_tfvc_client(self): """get_tfvc_client. Gets the 5.1 version of the TfvcClient 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 b44a0c4e..ab615df3 100644 --- a/azure-devops/azure/devops/v5_1/feed/feed_client.py +++ b/azure-devops/azure/devops/v5_1/feed/feed_client.py @@ -99,7 +99,7 @@ def create_feed(self, feed, project=None): def delete_feed(self, feed_id, project=None): """DeleteFeed. - [Preview API] Remove a feed and all its packages. The action does not result in packages moving to the RecycleBin and is not reversible. + [Preview API] Remove a feed and all its packages. The action does not result in packages moving to the RecycleBin and is not reversible. :param str feed_id: Name or Id of the feed. :param str project: Project ID or project name """ @@ -226,14 +226,17 @@ def get_package_changes(self, feed_id, continuation_token=None, batch_size=None) query_parameters=query_parameters) return self._deserialize('PackageChangesResponse', response) - def query_package_metrics(self, package_id_query, feed_id): + def query_package_metrics(self, package_id_query, feed_id, project=None): """QueryPackageMetrics. [Preview API] :param :class:` ` package_id_query: :param str feed_id: + :param str project: Project ID or project name :rtype: [PackageMetrics] """ 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(package_id_query, 'PackageMetricsQuery') @@ -244,20 +247,23 @@ def query_package_metrics(self, package_id_query, feed_id): content=content) return self._deserialize('[PackageMetrics]', self._unwrap_collection(response)) - def get_package(self, feed_id, package_id, include_all_versions=None, include_urls=None, is_listed=None, is_release=None, include_deleted=None, include_description=None): + def get_package(self, feed_id, package_id, project=None, include_all_versions=None, include_urls=None, is_listed=None, is_release=None, include_deleted=None, include_description=None): """GetPackage. [Preview API] Get details about a specific package. :param str feed_id: Name or Id of the feed. :param str package_id: The package Id (GUID Id, not the package name). - :param bool include_all_versions: True to return all versions of the package in the response. Default is false (latest version only). - :param bool include_urls: True to return REST Urls with the response. Default is True. - :param bool is_listed: Only applicable for NuGet packages, setting it for other package types will result in a 404. If false, delisted package versions will be returned. Use this to filter the response when includeAllVersions is set to true. Default is unset (do not return delisted packages). - :param bool is_release: Only applicable for Nuget packages. Use this to filter the response when includeAllVersions is set to true. Default is True (only return packages without prerelease versioning). + :param str project: Project ID or project name + :param bool include_all_versions: True to return all versions of the package in the response. Default is false (latest version only). + :param bool include_urls: True to return REST Urls with the response. Default is True. + :param bool is_listed: Only applicable for NuGet packages, setting it for other package types will result in a 404. If false, delisted package versions will be returned. Use this to filter the response when includeAllVersions is set to true. Default is unset (do not return delisted packages). + :param bool is_release: Only applicable for Nuget packages. Use this to filter the response when includeAllVersions is set to true. Default is True (only return packages without prerelease versioning). :param bool include_deleted: Return deleted or unpublished versions of packages in the response. Default is False. - :param bool include_description: Return the description for every version of each package in the response. Default is False. + :param bool include_description: Return the description for every version of each package in the response. Default is False. :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') if package_id is not None: @@ -282,27 +288,30 @@ def get_package(self, feed_id, package_id, include_all_versions=None, include_ur query_parameters=query_parameters) return self._deserialize('Package', response) - def get_packages(self, feed_id, protocol_type=None, package_name_query=None, normalized_package_name=None, include_urls=None, include_all_versions=None, is_listed=None, get_top_package_versions=None, is_release=None, include_description=None, top=None, skip=None, include_deleted=None, is_cached=None, direct_upstream_id=None): + def get_packages(self, feed_id, project=None, protocol_type=None, package_name_query=None, normalized_package_name=None, include_urls=None, include_all_versions=None, is_listed=None, get_top_package_versions=None, is_release=None, include_description=None, top=None, skip=None, include_deleted=None, is_cached=None, direct_upstream_id=None): """GetPackages. - [Preview API] Get details about all of the packages in the feed. Use the various filters to include or exclude information from the result set. + [Preview API] Get details about all of the packages in the feed. Use the various filters to include or exclude information from the result set. :param str feed_id: Name or Id of the feed. + :param str project: Project ID or project name :param str protocol_type: One of the supported artifact package types. - :param str package_name_query: Filter to packages that contain the provided string. Characters in the string must conform to the package name constraints. + :param str package_name_query: Filter to packages that contain the provided string. Characters in the string must conform to the package name constraints. :param str normalized_package_name: [Obsolete] Used for legacy scenarios and may be removed in future versions. - :param bool include_urls: True to return REST Urls with the response. Default is True. - :param bool include_all_versions: True to return all versions of the package in the response. Default is false (latest version only). - :param bool is_listed: Only applicable for NuGet packages, setting it for other package types will result in a 404. If false, delisted package versions will be returned. Use this to filter the response when includeAllVersions is set to true. Default is unset (do not return delisted packages). + :param bool include_urls: True to return REST Urls with the response. Default is True. + :param bool include_all_versions: True to return all versions of the package in the response. Default is false (latest version only). + :param bool is_listed: Only applicable for NuGet packages, setting it for other package types will result in a 404. If false, delisted package versions will be returned. Use this to filter the response when includeAllVersions is set to true. Default is unset (do not return delisted packages). :param bool get_top_package_versions: Changes the behavior of $top and $skip to return all versions of each package up to $top. Must be used in conjunction with includeAllVersions=true - :param bool is_release: Only applicable for Nuget packages. Use this to filter the response when includeAllVersions is set to true. Default is True (only return packages without prerelease versioning). - :param bool include_description: Return the description for every version of each package in the response. Default is False. + :param bool is_release: Only applicable for Nuget packages. Use this to filter the response when includeAllVersions is set to true. Default is True (only return packages without prerelease versioning). + :param bool include_description: Return the description for every version of each package in the response. Default is False. :param int top: Get the top N packages (or package versions where getTopPackageVersions=true) :param int skip: Skip the first N packages (or package versions where getTopPackageVersions=true) :param bool include_deleted: Return deleted or unpublished versions of packages in the response. Default is False. - :param bool is_cached: [Obsolete] Used for legacy scenarios and may be removed in future versions. + :param bool is_cached: [Obsolete] Used for legacy scenarios and may be removed in future versions. :param str direct_upstream_id: Filter results to return packages from a specific upstream. :rtype: [Package] """ 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 = {} @@ -385,15 +394,18 @@ def set_feed_permissions(self, feed_permission, feed_id): content=content) return self._deserialize('[FeedPermission]', self._unwrap_collection(response)) - def get_package_version_provenance(self, feed_id, package_id, package_version_id): + def get_package_version_provenance(self, feed_id, package_id, package_version_id, project=None): """GetPackageVersionProvenance. [Preview API] Gets provenance for a package version. :param str feed_id: Name or Id of the feed. :param str package_id: Id of the package (GUID Id, not name). :param str package_version_id: Id of the package version (GUID Id, not name). + :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') if package_id is not None: @@ -406,15 +418,18 @@ def get_package_version_provenance(self, feed_id, package_id, package_version_id route_values=route_values) return self._deserialize('PackageVersionProvenance', response) - def get_recycle_bin_package(self, feed_id, package_id, include_urls=None): + def get_recycle_bin_package(self, feed_id, package_id, project=None, include_urls=None): """GetRecycleBinPackage. [Preview API] Get information about a package and all its versions within the recycle bin. :param str feed_id: Name or Id of the feed. :param str package_id: The package Id (GUID Id, not the package name). + :param str project: Project ID or project name :param bool include_urls: True to return REST Urls with the response. Default is True. :rtype: :class:` ` """ 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: @@ -429,10 +444,11 @@ def get_recycle_bin_package(self, feed_id, package_id, include_urls=None): query_parameters=query_parameters) return self._deserialize('Package', response) - def get_recycle_bin_packages(self, feed_id, protocol_type=None, package_name_query=None, include_urls=None, top=None, skip=None, include_all_versions=None): + def get_recycle_bin_packages(self, feed_id, project=None, protocol_type=None, package_name_query=None, include_urls=None, top=None, skip=None, include_all_versions=None): """GetRecycleBinPackages. [Preview API] Query for packages within the recycle bin. :param str feed_id: Name or Id of the feed. + :param str project: Project ID or project name :param str protocol_type: Type of package (e.g. NuGet, npm, ...). :param str package_name_query: Filter to packages matching this name. :param bool include_urls: True to return REST Urls with the response. Default is True. @@ -442,6 +458,8 @@ def get_recycle_bin_packages(self, feed_id, protocol_type=None, package_name_que :rtype: [Package] """ 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 = {} @@ -464,16 +482,19 @@ def get_recycle_bin_packages(self, feed_id, protocol_type=None, package_name_que query_parameters=query_parameters) return self._deserialize('[Package]', self._unwrap_collection(response)) - def get_recycle_bin_package_version(self, feed_id, package_id, package_version_id, include_urls=None): + def get_recycle_bin_package_version(self, feed_id, package_id, package_version_id, project=None, include_urls=None): """GetRecycleBinPackageVersion. [Preview API] Get information about a package version within the recycle bin. :param str feed_id: Name or Id of the feed. :param str package_id: The package Id (GUID Id, not the package name). :param str package_version_id: The package version Id 9guid Id, not the version string). + :param str project: Project ID or project name :param bool include_urls: True to return REST Urls with the response. Default is True. :rtype: :class:` ` """ 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: @@ -490,15 +511,18 @@ def get_recycle_bin_package_version(self, feed_id, package_id, package_version_i query_parameters=query_parameters) return self._deserialize('RecycleBinPackageVersion', response) - def get_recycle_bin_package_versions(self, feed_id, package_id, include_urls=None): + def get_recycle_bin_package_versions(self, feed_id, package_id, project=None, include_urls=None): """GetRecycleBinPackageVersions. [Preview API] Get a list of package versions within the recycle bin. :param str feed_id: Name or Id of the feed. :param str package_id: The package Id (GUID Id, not the package name). + :param str project: Project ID or project name :param bool include_urls: True to return REST Urls with the response. Default is True. :rtype: [RecycleBinPackageVersion] """ 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: @@ -513,12 +537,15 @@ def get_recycle_bin_package_versions(self, feed_id, package_id, include_urls=Non query_parameters=query_parameters) return self._deserialize('[RecycleBinPackageVersion]', self._unwrap_collection(response)) - def delete_feed_retention_policies(self, feed_id): + def delete_feed_retention_policies(self, feed_id, project=None): """DeleteFeedRetentionPolicies. [Preview API] Delete the retention policy for a feed. :param str feed_id: Name or ID of the feed. + :param str project: Project ID or project name """ 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') self._send(http_method='DELETE', @@ -526,13 +553,16 @@ def delete_feed_retention_policies(self, feed_id): version='5.1-preview.1', route_values=route_values) - def get_feed_retention_policies(self, feed_id): + def get_feed_retention_policies(self, feed_id, project=None): """GetFeedRetentionPolicies. [Preview API] Get the retention policy for a feed. :param str feed_id: Name or ID of the feed. + :param str project: Project ID or project name :rtype: :class:` ` """ 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', @@ -541,14 +571,17 @@ def get_feed_retention_policies(self, feed_id): route_values=route_values) return self._deserialize('FeedRetentionPolicy', response) - def set_feed_retention_policies(self, policy, feed_id): + def set_feed_retention_policies(self, policy, feed_id, project=None): """SetFeedRetentionPolicies. [Preview API] Set the retention policy for a feed. :param :class:` ` policy: Feed retention policy. :param str feed_id: Name or ID of the feed. + :param str project: Project ID or project name :rtype: :class:` ` """ 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(policy, 'FeedRetentionPolicy') @@ -559,15 +592,18 @@ def set_feed_retention_policies(self, policy, feed_id): content=content) return self._deserialize('FeedRetentionPolicy', response) - def query_package_version_metrics(self, package_version_id_query, feed_id, package_id): + def query_package_version_metrics(self, package_version_id_query, feed_id, package_id, project=None): """QueryPackageVersionMetrics. [Preview API] :param :class:` ` package_version_id_query: :param str feed_id: :param str package_id: + :param str project: Project ID or project name :rtype: [PackageVersionMetrics] """ 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: @@ -580,18 +616,21 @@ def query_package_version_metrics(self, package_version_id_query, feed_id, packa content=content) return self._deserialize('[PackageVersionMetrics]', self._unwrap_collection(response)) - def get_package_version(self, feed_id, package_id, package_version_id, include_urls=None, is_listed=None, is_deleted=None): + def get_package_version(self, feed_id, package_id, package_version_id, project=None, include_urls=None, is_listed=None, is_deleted=None): """GetPackageVersion. [Preview API] Get details about a specific package version. :param str feed_id: Name or Id of the feed. :param str package_id: Id of the package (GUID Id, not name). :param str package_version_id: Id of the package version (GUID Id, not name). - :param bool include_urls: True to include urls for each version. Default is true. - :param bool is_listed: Only applicable for NuGet packages. If false, delisted package versions will be returned. - :param bool is_deleted: Return deleted or unpublished versions of packages in the response. Default is unset (do not return deleted versions). + :param str project: Project ID or project name + :param bool include_urls: True to include urls for each version. Default is true. + :param bool is_listed: Only applicable for NuGet packages. If false, delisted package versions will be returned. + :param bool is_deleted: This does not have any effect on the requested package version, for other versions returned specifies whether to return only deleted or non-deleted versions of packages in the response. Default is unset (return all versions). :rtype: :class:` ` """ 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: @@ -612,17 +651,20 @@ def get_package_version(self, feed_id, package_id, package_version_id, include_u query_parameters=query_parameters) return self._deserialize('PackageVersion', response) - def get_package_versions(self, feed_id, package_id, include_urls=None, is_listed=None, is_deleted=None): + def get_package_versions(self, feed_id, package_id, project=None, include_urls=None, is_listed=None, is_deleted=None): """GetPackageVersions. [Preview API] Get a list of package versions, optionally filtering by state. :param str feed_id: Name or Id of the feed. :param str package_id: Id of the package (GUID Id, not name). - :param bool include_urls: True to include urls for each version. Default is true. - :param bool is_listed: Only applicable for NuGet packages. If false, delisted package versions will be returned. - :param bool is_deleted: Return deleted or unpublished versions of packages in the response. Default is unset (do not return deleted versions). + :param str project: Project ID or project name + :param bool include_urls: True to include urls for each version. Default is true. + :param bool is_listed: Only applicable for NuGet packages. If false, delisted package versions will be returned. + :param bool is_deleted: If set specifies whether to return only deleted or non-deleted versions of packages in the response. Default is unset (return all versions). :rtype: [PackageVersion] """ 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: @@ -641,14 +683,17 @@ def get_package_versions(self, feed_id, package_id, include_urls=None, is_listed query_parameters=query_parameters) return self._deserialize('[PackageVersion]', self._unwrap_collection(response)) - def create_feed_view(self, view, feed_id): + def create_feed_view(self, view, feed_id, project=None): """CreateFeedView. [Preview API] Create a new view on the referenced feed. :param :class:` ` view: View to be created. :param str feed_id: Name or Id of the feed. + :param str project: Project ID or project name :rtype: :class:` ` """ 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(view, 'FeedView') @@ -659,13 +704,16 @@ def create_feed_view(self, view, feed_id): content=content) return self._deserialize('FeedView', response) - def delete_feed_view(self, feed_id, view_id): + def delete_feed_view(self, feed_id, view_id, project=None): """DeleteFeedView. [Preview API] Delete a feed view. :param str feed_id: Name or Id of the feed. :param str view_id: Name or Id of the view. + :param str project: Project ID or project name """ 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 view_id is not None: @@ -675,14 +723,17 @@ def delete_feed_view(self, feed_id, view_id): version='5.1-preview.1', route_values=route_values) - def get_feed_view(self, feed_id, view_id): + def get_feed_view(self, feed_id, view_id, project=None): """GetFeedView. [Preview API] Get a view by Id. :param str feed_id: Name or Id of the feed. :param str view_id: Name or Id of the view. + :param str project: Project ID or project name :rtype: :class:` ` """ 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 view_id is not None: @@ -693,13 +744,16 @@ def get_feed_view(self, feed_id, view_id): route_values=route_values) return self._deserialize('FeedView', response) - def get_feed_views(self, feed_id): + def get_feed_views(self, feed_id, project=None): """GetFeedViews. [Preview API] Get all views for a feed. :param str feed_id: Name or Id of the feed. + :param str project: Project ID or project name :rtype: [FeedView] """ 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', @@ -708,15 +762,18 @@ def get_feed_views(self, feed_id): route_values=route_values) return self._deserialize('[FeedView]', self._unwrap_collection(response)) - def update_feed_view(self, view, feed_id, view_id): + def update_feed_view(self, view, feed_id, view_id, project=None): """UpdateFeedView. [Preview API] Update a view. :param :class:` ` view: New settings to apply to the specified view. :param str feed_id: Name or Id of the feed. :param str view_id: Name or Id of the view. + :param str project: Project ID or project name :rtype: :class:` ` """ 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 view_id is not None: diff --git a/azure-devops/azure/devops/v5_1/git/models.py b/azure-devops/azure/devops/v5_1/git/models.py index 7cba6949..28c02b6a 100644 --- a/azure-devops/azure/devops/v5_1/git/models.py +++ b/azure-devops/azure/devops/v5_1/git/models.py @@ -2185,6 +2185,8 @@ class GitRepository(Model): :type url: str :param valid_remote_urls: :type valid_remote_urls: list of str + :param web_url: + :type web_url: str """ _attribute_map = { @@ -2199,10 +2201,11 @@ class GitRepository(Model): 'size': {'key': 'size', 'type': 'long'}, 'ssh_url': {'key': 'sshUrl', 'type': 'str'}, 'url': {'key': 'url', 'type': 'str'}, - 'valid_remote_urls': {'key': 'validRemoteUrls', 'type': '[str]'} + 'valid_remote_urls': {'key': 'validRemoteUrls', 'type': '[str]'}, + 'web_url': {'key': 'webUrl', 'type': 'str'} } - def __init__(self, _links=None, default_branch=None, id=None, is_fork=None, name=None, parent_repository=None, project=None, remote_url=None, size=None, ssh_url=None, url=None, valid_remote_urls=None): + def __init__(self, _links=None, default_branch=None, id=None, is_fork=None, name=None, parent_repository=None, project=None, remote_url=None, size=None, ssh_url=None, url=None, valid_remote_urls=None, web_url=None): super(GitRepository, self).__init__() self._links = _links self.default_branch = default_branch @@ -2216,6 +2219,7 @@ def __init__(self, _links=None, default_branch=None, id=None, is_fork=None, name self.ssh_url = ssh_url self.url = url self.valid_remote_urls = valid_remote_urls + self.web_url = web_url class GitRepositoryCreateOptions(Model): diff --git a/azure-devops/azure/devops/v5_1/identity/models.py b/azure-devops/azure/devops/v5_1/identity/models.py index cd776a31..98592f9b 100644 --- a/azure-devops/azure/devops/v5_1/identity/models.py +++ b/azure-devops/azure/devops/v5_1/identity/models.py @@ -242,6 +242,8 @@ class IdentityBase(Model): :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: @@ -262,11 +264,12 @@ class IdentityBase(Model): '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, subject_descriptor=None, unique_user_id=None): + 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 @@ -281,6 +284,7 @@ def __init__(self, custom_display_name=None, descriptor=None, id=None, is_active 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 @@ -605,6 +609,8 @@ class Identity(IdentityBase): :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: @@ -625,12 +631,13 @@ class Identity(IdentityBase): '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, 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, subject_descriptor=subject_descriptor, unique_user_id=unique_user_id) + 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) __all__ = [ diff --git a/azure-devops/azure/devops/v5_1/location/models.py b/azure-devops/azure/devops/v5_1/location/models.py index 80c2db61..482a210e 100644 --- a/azure-devops/azure/devops/v5_1/location/models.py +++ b/azure-devops/azure/devops/v5_1/location/models.py @@ -114,6 +114,8 @@ class IdentityBase(Model): :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: @@ -134,11 +136,12 @@ class IdentityBase(Model): '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, subject_descriptor=None, unique_user_id=None): + 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 @@ -153,6 +156,7 @@ def __init__(self, custom_display_name=None, descriptor=None, id=None, is_active 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 @@ -358,6 +362,8 @@ class Identity(IdentityBase): :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: @@ -378,12 +384,13 @@ class Identity(IdentityBase): '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, 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, subject_descriptor=subject_descriptor, unique_user_id=unique_user_id) + 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) __all__ = [ diff --git a/azure-devops/azure/devops/v5_1/maven/maven_client.py b/azure-devops/azure/devops/v5_1/maven/maven_client.py index 6c2768ab..cf56226b 100644 --- a/azure-devops/azure/devops/v5_1/maven/maven_client.py +++ b/azure-devops/azure/devops/v5_1/maven/maven_client.py @@ -25,6 +25,33 @@ def __init__(self, base_url=None, creds=None): resource_area_identifier = '6f7f8c07-ff36-473c-bcf3-bd6cc9b6c066' + def download_package(self, feed_id, group_id, artifact_id, version, file_name): + """DownloadPackage. + [Preview API] Fulfills maven package file download requests by returning the url of the package file requested. + :param str feed_id: Name or ID of the feed. + :param str group_id: GroupId of the maven package + :param str artifact_id: ArtifactId of the maven package + :param str version: Version of the package + :param str file_name: File name to download + :rtype: object + """ + route_values = {} + if feed_id is not None: + route_values['feedId'] = self._serialize.url('feed_id', feed_id, 'str') + if group_id is not None: + route_values['groupId'] = self._serialize.url('group_id', group_id, 'str') + if artifact_id is not None: + route_values['artifactId'] = self._serialize.url('artifact_id', artifact_id, 'str') + if version is not None: + route_values['version'] = self._serialize.url('version', version, 'str') + if file_name is not None: + route_values['fileName'] = self._serialize.url('file_name', file_name, 'str') + response = self._send(http_method='GET', + location_id='c338d4b5-d30a-47e2-95b7-f157ef558833', + version='5.1-preview.1', + route_values=route_values) + return self._deserialize('object', response) + def delete_package_version_from_recycle_bin(self, feed, group_id, artifact_id, version): """DeletePackageVersionFromRecycleBin. [Preview API] Permanently delete a package from a feed's recycle bin. 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 ab2d21fd..1423fc70 100644 --- a/azure-devops/azure/devops/v5_1/nuget/nuget_client.py +++ b/azure-devops/azure/devops/v5_1/nuget/nuget_client.py @@ -25,16 +25,19 @@ 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, source_protocol_version=None): + def download_package(self, feed_id, package_name, package_version, project=None, source_protocol_version=None): """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. :param str package_name: Name of the package. :param str package_version: Version of the package. + :param str project: Project ID or project name :param str source_protocol_version: Unused :rtype: object """ 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_name is not None: @@ -51,13 +54,16 @@ def download_package(self, feed_id, package_name, package_version, source_protoc query_parameters=query_parameters) return self._deserialize('object', response) - def update_package_versions(self, batch_request, feed_id): + def update_package_versions(self, batch_request, feed_id, project=None): """UpdatePackageVersions. [Preview API] Update several packages from a single feed in a single request. The updates to the packages do not happen atomically. :param :class:` ` batch_request: Information about the packages to update, the operation to perform, and its associated data. :param str feed_id: Name or ID of the feed. + :param str project: Project ID or project name """ 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(batch_request, 'NuGetPackagesBatchRequest') @@ -67,14 +73,17 @@ def update_package_versions(self, batch_request, feed_id): route_values=route_values, content=content) - def delete_package_version_from_recycle_bin(self, feed_id, package_name, package_version): + def delete_package_version_from_recycle_bin(self, feed_id, package_name, package_version, project=None): """DeletePackageVersionFromRecycleBin. [Preview API] Delete a package version from a feed's recycle bin. :param str feed_id: Name or ID of the feed. :param str package_name: Name of the package. :param str package_version: Version of the package. + :param str project: Project ID or project name """ 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_name is not None: @@ -86,15 +95,18 @@ def delete_package_version_from_recycle_bin(self, feed_id, package_name, package version='5.1-preview.1', route_values=route_values) - def get_package_version_metadata_from_recycle_bin(self, feed_id, package_name, package_version): + def get_package_version_metadata_from_recycle_bin(self, feed_id, package_name, package_version, project=None): """GetPackageVersionMetadataFromRecycleBin. [Preview API] View a package version's deletion/recycled status :param str feed_id: Name or ID of the feed. :param str package_name: Name of the package. :param str package_version: Version of the package. + :param str project: Project ID or project name :rtype: :class:` ` """ 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_name is not None: @@ -107,15 +119,18 @@ def get_package_version_metadata_from_recycle_bin(self, feed_id, package_name, p route_values=route_values) return self._deserialize('NuGetPackageVersionDeletionState', response) - def restore_package_version_from_recycle_bin(self, package_version_details, feed_id, package_name, package_version): + def restore_package_version_from_recycle_bin(self, package_version_details, feed_id, package_name, package_version, project=None): """RestorePackageVersionFromRecycleBin. [Preview API] Restore a package version from a feed's recycle bin back into the active feed. :param :class:` ` package_version_details: Set the 'Deleted' member to 'false' to apply the restore operation :param str feed_id: Name or ID of the feed. :param str package_name: Name of the package. :param str package_version: Version of the package. + :param str project: Project ID or project name """ 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_name is not None: @@ -129,15 +144,18 @@ def restore_package_version_from_recycle_bin(self, package_version_details, feed route_values=route_values, content=content) - def delete_package_version(self, feed_id, package_name, package_version): + def delete_package_version(self, feed_id, package_name, package_version, project=None): """DeletePackageVersion. [Preview API] Send a package version from the feed to its paired recycle bin. :param str feed_id: Name or ID of the feed. :param str package_name: Name of the package to delete. :param str package_version: Version of the package to delete. + :param str project: Project ID or project name :rtype: :class:` ` """ 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_name is not None: @@ -150,16 +168,19 @@ def delete_package_version(self, feed_id, package_name, package_version): route_values=route_values) return self._deserialize('Package', response) - def get_package_version(self, feed_id, package_name, package_version, show_deleted=None): + def get_package_version(self, feed_id, package_name, package_version, project=None, show_deleted=None): """GetPackageVersion. [Preview API] Get information about a package version. :param str feed_id: Name or ID of the feed. :param str package_name: Name of the package. :param str package_version: Version of the package. + :param str project: Project ID or project name :param bool show_deleted: True to include deleted packages in the response. :rtype: :class:` ` """ 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_name is not None: @@ -176,15 +197,18 @@ def get_package_version(self, feed_id, package_name, package_version, show_delet query_parameters=query_parameters) return self._deserialize('Package', response) - def update_package_version(self, package_version_details, feed_id, package_name, package_version): + def update_package_version(self, package_version_details, feed_id, package_name, package_version, project=None): """UpdatePackageVersion. [Preview API] Set mutable state on a package version. :param :class:` ` package_version_details: New state to apply to the referenced package. :param str feed_id: Name or ID of the feed. :param str package_name: Name of the package to update. :param str package_version: Version of the package to update. + :param str project: Project ID or project name """ 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_name is not None: diff --git a/azure-devops/azure/devops/v5_1/pipelines/__init__.py b/azure-devops/azure/devops/v5_1/pipelines/__init__.py index 86dd5906..7eccf7a8 100644 --- a/azure-devops/azure/devops/v5_1/pipelines/__init__.py +++ b/azure-devops/azure/devops/v5_1/pipelines/__init__.py @@ -10,6 +10,8 @@ from .pipelines_client import PipelinesClient __all__ = [ + 'CreatePipelineConfigurationParameters', + 'CreatePipelineParameters', 'Pipeline', 'PipelineConfiguration', 'PipelinesClient' diff --git a/azure-devops/azure/devops/v5_1/pipelines/models.py b/azure-devops/azure/devops/v5_1/pipelines/models.py index ca8f8741..c7c7f764 100644 --- a/azure-devops/azure/devops/v5_1/pipelines/models.py +++ b/azure-devops/azure/devops/v5_1/pipelines/models.py @@ -9,24 +9,72 @@ from msrest.serialization import Model +class CreatePipelineConfigurationParameters(Model): + """CreatePipelineConfigurationParameters. + + :param type: + :type type: object + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'object'} + } + + def __init__(self, type=None): + super(CreatePipelineConfigurationParameters, self).__init__() + self.type = type + + +class CreatePipelineParameters(Model): + """CreatePipelineParameters. + + :param configuration: + :type configuration: :class:`CreatePipelineConfigurationParameters ` + :param folder: + :type folder: str + :param name: + :type name: str + """ + + _attribute_map = { + 'configuration': {'key': 'configuration', 'type': 'CreatePipelineConfigurationParameters'}, + 'folder': {'key': 'folder', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, configuration=None, folder=None, name=None): + super(CreatePipelineParameters, self).__init__() + self.configuration = configuration + self.folder = folder + self.name = name + + class Pipeline(Model): """Pipeline. :param configuration: :type configuration: :class:`PipelineConfiguration ` + :param folder: + :type folder: str :param id: :type id: int + :param name: + :type name: str """ _attribute_map = { 'configuration': {'key': 'configuration', 'type': 'PipelineConfiguration'}, - 'id': {'key': 'id', 'type': 'int'} + 'folder': {'key': 'folder', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'} } - def __init__(self, configuration=None, id=None): + def __init__(self, configuration=None, folder=None, id=None, name=None): super(Pipeline, self).__init__() self.configuration = configuration + self.folder = folder self.id = id + self.name = name class PipelineConfiguration(Model): @@ -46,6 +94,8 @@ def __init__(self, type=None): __all__ = [ + 'CreatePipelineConfigurationParameters', + 'CreatePipelineParameters', 'Pipeline', 'PipelineConfiguration', ] 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 387b0428..a92b0c48 100644 --- a/azure-devops/azure/devops/v5_1/pipelines/pipelines_client.py +++ b/azure-devops/azure/devops/v5_1/pipelines/pipelines_client.py @@ -25,6 +25,24 @@ def __init__(self, base_url=None, creds=None): resource_area_identifier = None + def create_pipeline(self, input_parameters, project): + """CreatePipeline. + [Preview API] + :param :class:` ` input_parameters: + :param str project: Project ID or project name + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(input_parameters, 'CreatePipelineParameters') + response = self._send(http_method='POST', + location_id='28e1305e-2afe-47bf-abaf-cbb0e6a91988', + version='5.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('Pipeline', response) + def get_pipeline(self, project, pipeline_id, revision=None): """GetPipeline. [Preview API] diff --git a/azure-devops/azure/devops/v5_1/py_pi_api/__init__.py b/azure-devops/azure/devops/v5_1/py_pi_api/__init__.py index 2778b298..c5e186c1 100644 --- a/azure-devops/azure/devops/v5_1/py_pi_api/__init__.py +++ b/azure-devops/azure/devops/v5_1/py_pi_api/__init__.py @@ -19,5 +19,6 @@ 'PyPiPackageVersionDeletionState', 'PyPiRecycleBinPackageVersionDetails', 'ReferenceLinks', + 'UpstreamSourceInfo', 'PyPiApiClient' ] 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 a94be18e..98490ccf 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 @@ -82,6 +82,8 @@ class Package(Model): :type name: str :param permanently_deleted_date: If and when the package was permanently deleted. :type permanently_deleted_date: datetime + :param source_chain: The history of upstream sources for this package. The first source in the list is the immediate source from which this package was saved. + :type source_chain: list of :class:`UpstreamSourceInfo ` :param version: The version of the package. :type version: str """ @@ -92,16 +94,18 @@ class Package(Model): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'permanently_deleted_date': {'key': 'permanentlyDeletedDate', 'type': 'iso-8601'}, + 'source_chain': {'key': 'sourceChain', 'type': '[UpstreamSourceInfo]'}, 'version': {'key': 'version', 'type': 'str'} } - def __init__(self, _links=None, deleted_date=None, id=None, name=None, permanently_deleted_date=None, version=None): + def __init__(self, _links=None, deleted_date=None, id=None, name=None, permanently_deleted_date=None, source_chain=None, version=None): super(Package, self).__init__() self._links = _links self.deleted_date = deleted_date self.id = id self.name = name self.permanently_deleted_date = permanently_deleted_date + self.source_chain = source_chain self.version = version @@ -201,6 +205,34 @@ def __init__(self, links=None): self.links = links +class UpstreamSourceInfo(Model): + """UpstreamSourceInfo. + + :param id: Identity of the upstream source. + :type id: str + :param location: Locator for connecting to the upstream source. + :type location: str + :param name: Display name. + :type name: str + :param source_type: Source type, such as Public or Internal. + :type source_type: object + """ + + _attribute_map = { + '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): + super(UpstreamSourceInfo, self).__init__() + self.id = id + self.location = location + self.name = name + self.source_type = source_type + + __all__ = [ 'BatchOperationData', 'JsonPatchOperation', @@ -211,4 +243,5 @@ def __init__(self, links=None): 'PyPiPackageVersionDeletionState', 'PyPiRecycleBinPackageVersionDetails', 'ReferenceLinks', + 'UpstreamSourceInfo', ] diff --git a/azure-devops/azure/devops/v5_1/release/models.py b/azure-devops/azure/devops/v5_1/release/models.py index 1926f56b..778fbcbb 100644 --- a/azure-devops/azure/devops/v5_1/release/models.py +++ b/azure-devops/azure/devops/v5_1/release/models.py @@ -3177,6 +3177,8 @@ def __init__(self, days_to_keep_deleted_releases=None, default_environment_reten class SourcePullRequestVersion(Model): """SourcePullRequestVersion. + :param iteration_id: Pull Request Iteration Id for which the release will publish status. + :type iteration_id: str :param pull_request_id: Pull Request Id for which the release will publish status. :type pull_request_id: str :param pull_request_merged_at: Date and time of the pull request merge creation. It is required to keep timeline record of Releases created by pull request. @@ -3190,6 +3192,7 @@ class SourcePullRequestVersion(Model): """ _attribute_map = { + 'iteration_id': {'key': 'iterationId', 'type': 'str'}, 'pull_request_id': {'key': 'pullRequestId', 'type': 'str'}, 'pull_request_merged_at': {'key': 'pullRequestMergedAt', 'type': 'iso-8601'}, 'source_branch': {'key': 'sourceBranch', 'type': 'str'}, @@ -3197,8 +3200,9 @@ class SourcePullRequestVersion(Model): 'target_branch': {'key': 'targetBranch', 'type': 'str'} } - def __init__(self, pull_request_id=None, pull_request_merged_at=None, source_branch=None, source_branch_commit_id=None, target_branch=None): + def __init__(self, iteration_id=None, pull_request_id=None, pull_request_merged_at=None, source_branch=None, source_branch_commit_id=None, target_branch=None): super(SourcePullRequestVersion, self).__init__() + self.iteration_id = iteration_id self.pull_request_id = pull_request_id self.pull_request_merged_at = pull_request_merged_at self.source_branch = source_branch diff --git a/azure-devops/azure/devops/v5_1/service_hooks/service_hooks_client.py b/azure-devops/azure/devops/v5_1/service_hooks/service_hooks_client.py index 5c02d2f4..30c2fd4d 100644 --- a/azure-devops/azure/devops/v5_1/service_hooks/service_hooks_client.py +++ b/azure-devops/azure/devops/v5_1/service_hooks/service_hooks_client.py @@ -327,7 +327,7 @@ def list_subscriptions(self, publisher_id=None, event_type=None, consumer_id=Non """ListSubscriptions. [Preview API] Get a list of subscriptions. :param str publisher_id: ID for a subscription. - :param str event_type: Maximum number of notifications to return. Default is 100. + :param str event_type: The event type to filter on (if any). :param str consumer_id: ID for a consumer. :param str consumer_action_id: ID for a consumerActionId. :rtype: [Subscription] diff --git a/azure-devops/azure/devops/v5_1/task_agent/models.py b/azure-devops/azure/devops/v5_1/task_agent/models.py index 86dc5ffd..4fbddf2e 100644 --- a/azure-devops/azure/devops/v5_1/task_agent/models.py +++ b/azure-devops/azure/devops/v5_1/task_agent/models.py @@ -712,6 +712,10 @@ class EnvironmentDeploymentExecutionRecord(Model): :type finish_time: datetime :param id: Id of the Environment deployment execution history record :type id: long + :param job_attempt: Job Attempt + :type job_attempt: int + :param job_name: Job name + :type job_name: str :param owner: Owner of the environment deployment execution record :type owner: :class:`TaskOrchestrationOwner ` :param plan_id: Plan Id @@ -730,6 +734,10 @@ class EnvironmentDeploymentExecutionRecord(Model): :type scope_id: str :param service_owner: Service owner Id :type service_owner: str + :param stage_attempt: Stage Attempt + :type stage_attempt: int + :param stage_name: Stage name + :type stage_name: str :param start_time: Start time of the environment deployment execution :type start_time: datetime """ @@ -739,6 +747,8 @@ class EnvironmentDeploymentExecutionRecord(Model): 'environment_id': {'key': 'environmentId', 'type': 'int'}, 'finish_time': {'key': 'finishTime', 'type': 'iso-8601'}, 'id': {'key': 'id', 'type': 'long'}, + 'job_attempt': {'key': 'jobAttempt', 'type': 'int'}, + 'job_name': {'key': 'jobName', 'type': 'str'}, 'owner': {'key': 'owner', 'type': 'TaskOrchestrationOwner'}, 'plan_id': {'key': 'planId', 'type': 'str'}, 'plan_type': {'key': 'planType', 'type': 'str'}, @@ -748,15 +758,19 @@ class EnvironmentDeploymentExecutionRecord(Model): 'result': {'key': 'result', 'type': 'object'}, 'scope_id': {'key': 'scopeId', 'type': 'str'}, 'service_owner': {'key': 'serviceOwner', 'type': 'str'}, + 'stage_attempt': {'key': 'stageAttempt', 'type': 'int'}, + 'stage_name': {'key': 'stageName', 'type': 'str'}, 'start_time': {'key': 'startTime', 'type': 'iso-8601'} } - def __init__(self, definition=None, environment_id=None, finish_time=None, id=None, owner=None, plan_id=None, plan_type=None, queue_time=None, request_identifier=None, resource_id=None, result=None, scope_id=None, service_owner=None, start_time=None): + def __init__(self, definition=None, environment_id=None, finish_time=None, id=None, job_attempt=None, job_name=None, owner=None, plan_id=None, plan_type=None, queue_time=None, request_identifier=None, resource_id=None, result=None, scope_id=None, service_owner=None, stage_attempt=None, stage_name=None, start_time=None): super(EnvironmentDeploymentExecutionRecord, self).__init__() self.definition = definition self.environment_id = environment_id self.finish_time = finish_time self.id = id + self.job_attempt = job_attempt + self.job_name = job_name self.owner = owner self.plan_id = plan_id self.plan_type = plan_type @@ -766,6 +780,8 @@ def __init__(self, definition=None, environment_id=None, finish_time=None, id=No self.result = result self.scope_id = scope_id self.service_owner = service_owner + self.stage_attempt = stage_attempt + self.stage_name = stage_name self.start_time = start_time @@ -1256,6 +1272,8 @@ class KubernetesResource(EnvironmentResource): :type name: str :param type: Environment resource type :type type: object + :param cluster_name: + :type cluster_name: str :param namespace: :type namespace: str :param service_endpoint_id: @@ -1271,12 +1289,14 @@ class KubernetesResource(EnvironmentResource): 'last_modified_on': {'key': 'lastModifiedOn', 'type': 'iso-8601'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'object'}, + 'cluster_name': {'key': 'clusterName', 'type': 'str'}, 'namespace': {'key': 'namespace', 'type': 'str'}, 'service_endpoint_id': {'key': 'serviceEndpointId', 'type': 'str'} } - def __init__(self, created_by=None, created_on=None, environment_reference=None, id=None, last_modified_by=None, last_modified_on=None, name=None, type=None, namespace=None, service_endpoint_id=None): + def __init__(self, created_by=None, created_on=None, environment_reference=None, id=None, last_modified_by=None, last_modified_on=None, name=None, type=None, cluster_name=None, namespace=None, service_endpoint_id=None): super(KubernetesResource, self).__init__(created_by=created_by, created_on=created_on, environment_reference=environment_reference, id=id, last_modified_by=last_modified_by, last_modified_on=last_modified_on, name=name, type=type) + self.cluster_name = cluster_name self.namespace = namespace self.service_endpoint_id = service_endpoint_id @@ -1284,6 +1304,8 @@ def __init__(self, created_by=None, created_on=None, environment_reference=None, class KubernetesResourceCreateParameters(Model): """KubernetesResourceCreateParameters. + :param cluster_name: + :type cluster_name: str :param name: :type name: str :param namespace: @@ -1293,13 +1315,15 @@ class KubernetesResourceCreateParameters(Model): """ _attribute_map = { + 'cluster_name': {'key': 'clusterName', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'namespace': {'key': 'namespace', 'type': 'str'}, 'service_endpoint_id': {'key': 'serviceEndpointId', 'type': 'str'} } - def __init__(self, name=None, namespace=None, service_endpoint_id=None): + def __init__(self, cluster_name=None, name=None, namespace=None, service_endpoint_id=None): super(KubernetesResourceCreateParameters, self).__init__() + self.cluster_name = cluster_name self.name = name self.namespace = namespace self.service_endpoint_id = service_endpoint_id @@ -2532,6 +2556,8 @@ class TaskAgentPoolReference(Model): :type id: int :param is_hosted: Gets or sets a value indicating whether or not this pool is managed by the service. :type is_hosted: bool + :param is_legacy: Determines whether the pool is legacy. + :type is_legacy: bool :param name: :type name: str :param pool_type: Gets or sets the type of the pool @@ -2545,16 +2571,18 @@ class TaskAgentPoolReference(Model): _attribute_map = { 'id': {'key': 'id', 'type': 'int'}, 'is_hosted': {'key': 'isHosted', 'type': 'bool'}, + 'is_legacy': {'key': 'isLegacy', 'type': 'bool'}, 'name': {'key': 'name', 'type': 'str'}, 'pool_type': {'key': 'poolType', 'type': 'object'}, 'scope': {'key': 'scope', 'type': 'str'}, 'size': {'key': 'size', 'type': 'int'} } - def __init__(self, id=None, is_hosted=None, name=None, pool_type=None, scope=None, size=None): + def __init__(self, id=None, is_hosted=None, is_legacy=None, name=None, pool_type=None, scope=None, size=None): super(TaskAgentPoolReference, self).__init__() self.id = id self.is_hosted = is_hosted + self.is_legacy = is_legacy self.name = name self.pool_type = pool_type self.scope = scope @@ -4179,6 +4207,8 @@ class TaskAgentPool(TaskAgentPoolReference): :type id: int :param is_hosted: Gets or sets a value indicating whether or not this pool is managed by the service. :type is_hosted: bool + :param is_legacy: Determines whether the pool is legacy. + :type is_legacy: bool :param name: :type name: str :param pool_type: Gets or sets the type of the pool @@ -4208,6 +4238,7 @@ class TaskAgentPool(TaskAgentPoolReference): _attribute_map = { 'id': {'key': 'id', 'type': 'int'}, 'is_hosted': {'key': 'isHosted', 'type': 'bool'}, + 'is_legacy': {'key': 'isLegacy', 'type': 'bool'}, 'name': {'key': 'name', 'type': 'str'}, 'pool_type': {'key': 'poolType', 'type': 'object'}, 'scope': {'key': 'scope', 'type': 'str'}, @@ -4222,8 +4253,8 @@ class TaskAgentPool(TaskAgentPoolReference): 'target_size': {'key': 'targetSize', 'type': 'int'} } - def __init__(self, id=None, is_hosted=None, name=None, pool_type=None, scope=None, size=None, agent_cloud_id=None, auto_provision=None, auto_size=None, created_by=None, created_on=None, owner=None, properties=None, target_size=None): - super(TaskAgentPool, self).__init__(id=id, is_hosted=is_hosted, name=name, pool_type=pool_type, scope=scope, size=size) + def __init__(self, id=None, is_hosted=None, is_legacy=None, name=None, pool_type=None, scope=None, size=None, agent_cloud_id=None, auto_provision=None, auto_size=None, created_by=None, created_on=None, owner=None, properties=None, target_size=None): + super(TaskAgentPool, self).__init__(id=id, is_hosted=is_hosted, is_legacy=is_legacy, name=name, pool_type=pool_type, scope=scope, size=size) self.agent_cloud_id = agent_cloud_id self.auto_provision = auto_provision self.auto_size = auto_size 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 9163868b..98ab3f6a 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 @@ -122,13 +122,14 @@ def delete_agent(self, pool_id, agent_id): version='5.1-preview.1', route_values=route_values) - def get_agent(self, pool_id, agent_id, include_capabilities=None, include_assigned_request=None, property_filters=None): + def get_agent(self, pool_id, agent_id, include_capabilities=None, include_assigned_request=None, include_last_completed_request=None, property_filters=None): """GetAgent. [Preview API] Get information about an agent. :param int pool_id: The agent pool containing the agent :param int agent_id: The agent ID to get information about :param bool include_capabilities: Whether to include the agent's capabilities in the response :param bool include_assigned_request: Whether to include details about the agent's current work + :param bool include_last_completed_request: Whether to include details about the agents' most recent completed work :param [str] property_filters: Filter which custom properties will be returned :rtype: :class:` ` """ @@ -142,6 +143,8 @@ def get_agent(self, pool_id, agent_id, include_capabilities=None, include_assign query_parameters['includeCapabilities'] = self._serialize.query('include_capabilities', include_capabilities, 'bool') if include_assigned_request is not None: query_parameters['includeAssignedRequest'] = self._serialize.query('include_assigned_request', include_assigned_request, 'bool') + if include_last_completed_request is not None: + query_parameters['includeLastCompletedRequest'] = self._serialize.query('include_last_completed_request', include_last_completed_request, 'bool') if property_filters is not None: property_filters = ",".join(property_filters) query_parameters['propertyFilters'] = self._serialize.query('property_filters', property_filters, 'str') @@ -152,13 +155,14 @@ def get_agent(self, pool_id, agent_id, include_capabilities=None, include_assign query_parameters=query_parameters) return self._deserialize('TaskAgent', response) - def get_agents(self, pool_id, agent_name=None, include_capabilities=None, include_assigned_request=None, property_filters=None, demands=None): + def get_agents(self, pool_id, agent_name=None, include_capabilities=None, include_assigned_request=None, include_last_completed_request=None, property_filters=None, demands=None): """GetAgents. [Preview API] Get a list of agents. :param int pool_id: The agent pool containing the agents :param str agent_name: Filter on agent name :param bool include_capabilities: Whether to include the agents' capabilities in the response :param bool include_assigned_request: Whether to include details about the agents' current work + :param bool include_last_completed_request: Whether to include details about the agents' most recent completed work :param [str] property_filters: Filter which custom properties will be returned :param [str] demands: Filter by demands the agents can satisfy :rtype: [TaskAgent] @@ -173,6 +177,8 @@ def get_agents(self, pool_id, agent_name=None, include_capabilities=None, includ query_parameters['includeCapabilities'] = self._serialize.query('include_capabilities', include_capabilities, 'bool') if include_assigned_request is not None: query_parameters['includeAssignedRequest'] = self._serialize.query('include_assigned_request', include_assigned_request, 'bool') + if include_last_completed_request is not None: + query_parameters['includeLastCompletedRequest'] = self._serialize.query('include_last_completed_request', include_last_completed_request, 'bool') if property_filters is not None: property_filters = ",".join(property_filters) query_parameters['propertyFilters'] = self._serialize.query('property_filters', property_filters, 'str') diff --git a/azure-devops/azure/devops/v5_1/test_plan/__init__.py b/azure-devops/azure/devops/v5_1/test_plan/__init__.py new file mode 100644 index 00000000..ae45d174 --- /dev/null +++ b/azure-devops/azure/devops/v5_1/test_plan/__init__.py @@ -0,0 +1,67 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +# Generated file, DO NOT EDIT +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------------------------- + +from .models import * +from .test_plan_client import TestPlanClient + +__all__ = [ + 'BuildDefinitionReference', + 'CloneOperationCommonResponse', + 'CloneOptions', + 'CloneStatistics', + 'CloneTestPlanOperationInformation', + 'CloneTestPlanParams', + 'CloneTestSuiteOperationInformation', + 'CloneTestSuiteParams', + 'Configuration', + 'DestinationTestPlanCloneParams', + 'DestinationTestSuiteInfo', + 'GraphSubjectBase', + 'IdentityRef', + 'LastResultDetails', + 'NameValuePair', + 'PointAssignment', + 'ReferenceLinks', + 'ReleaseEnvironmentDefinitionReference', + 'Results', + 'SourceTestPlanInfo', + 'SourceTestplanResponse', + 'SourceTestSuiteInfo', + 'SuiteEntry', + 'SuiteEntryUpdateParams', + 'SuiteTestCaseCreateUpdateParameters', + 'TeamProjectReference', + 'TestCase', + 'TestCaseReference', + 'TestConfiguration', + 'TestConfigurationCreateUpdateParameters', + 'TestConfigurationReference', + 'TestEnvironment', + 'TestOutcomeSettings', + 'TestPlan', + 'TestPlanCreateParams', + 'TestPlanDetailedReference', + 'TestPlanReference', + 'TestPlansHubRefreshData', + 'TestPlanUpdateParams', + 'TestPoint', + 'TestPointResults', + 'TestPointUpdateParams', + 'TestSettings', + 'TestSuite', + 'TestSuiteCreateParams', + 'TestSuiteCreateUpdateCommonParams', + 'TestSuiteReference', + 'TestSuiteReferenceWithProject', + 'TestSuiteUpdateParams', + 'TestVariable', + 'TestVariableCreateUpdateParameters', + 'WorkItem', + 'WorkItemDetails', + 'TestPlanClient' +] diff --git a/azure-devops/azure/devops/v5_1/test_plan/models.py b/azure-devops/azure/devops/v5_1/test_plan/models.py new file mode 100644 index 00000000..72100565 --- /dev/null +++ b/azure-devops/azure/devops/v5_1/test_plan/models.py @@ -0,0 +1,1831 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +# Generated file, DO NOT EDIT +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BuildDefinitionReference(Model): + """BuildDefinitionReference. + + :param id: ID of the build definition + :type id: int + :param name: Name of the build definition + :type name: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, id=None, name=None): + super(BuildDefinitionReference, self).__init__() + self.id = id + self.name = name + + +class CloneOperationCommonResponse(Model): + """CloneOperationCommonResponse. + + :param clone_statistics: Various statistics related to the clone operation + :type clone_statistics: :class:`CloneStatistics ` + :param completion_date: Completion data of the operation + :type completion_date: datetime + :param creation_date: Creation data of the operation + :type creation_date: datetime + :param links: Reference links + :type links: :class:`ReferenceLinks ` + :param message: Message related to the job + :type message: str + :param op_id: Clone operation Id + :type op_id: int + :param state: Clone operation state + :type state: object + """ + + _attribute_map = { + 'clone_statistics': {'key': 'cloneStatistics', 'type': 'CloneStatistics'}, + 'completion_date': {'key': 'completionDate', 'type': 'iso-8601'}, + 'creation_date': {'key': 'creationDate', 'type': 'iso-8601'}, + 'links': {'key': 'links', 'type': 'ReferenceLinks'}, + 'message': {'key': 'message', 'type': 'str'}, + 'op_id': {'key': 'opId', 'type': 'int'}, + 'state': {'key': 'state', 'type': 'object'} + } + + def __init__(self, clone_statistics=None, completion_date=None, creation_date=None, links=None, message=None, op_id=None, state=None): + super(CloneOperationCommonResponse, self).__init__() + self.clone_statistics = clone_statistics + self.completion_date = completion_date + self.creation_date = creation_date + self.links = links + self.message = message + self.op_id = op_id + self.state = state + + +class CloneOptions(Model): + """CloneOptions. + + :param clone_requirements: If set to true requirements will be cloned + :type clone_requirements: bool + :param copy_all_suites: copy all suites from a source plan + :type copy_all_suites: bool + :param copy_ancestor_hierarchy: copy ancestor hieracrchy + :type copy_ancestor_hierarchy: bool + :param destination_work_item_type: Name of the workitem type of the clone + :type destination_work_item_type: str + :param override_parameters: Key value pairs where the key value is overridden by the value. + :type override_parameters: dict + :param related_link_comment: Comment on the link that will link the new clone test case to the original Set null for no comment + :type related_link_comment: str + """ + + _attribute_map = { + 'clone_requirements': {'key': 'cloneRequirements', 'type': 'bool'}, + 'copy_all_suites': {'key': 'copyAllSuites', 'type': 'bool'}, + 'copy_ancestor_hierarchy': {'key': 'copyAncestorHierarchy', 'type': 'bool'}, + 'destination_work_item_type': {'key': 'destinationWorkItemType', 'type': 'str'}, + 'override_parameters': {'key': 'overrideParameters', 'type': '{str}'}, + 'related_link_comment': {'key': 'relatedLinkComment', 'type': 'str'} + } + + def __init__(self, clone_requirements=None, copy_all_suites=None, copy_ancestor_hierarchy=None, destination_work_item_type=None, override_parameters=None, related_link_comment=None): + super(CloneOptions, self).__init__() + self.clone_requirements = clone_requirements + self.copy_all_suites = copy_all_suites + self.copy_ancestor_hierarchy = copy_ancestor_hierarchy + self.destination_work_item_type = destination_work_item_type + self.override_parameters = override_parameters + self.related_link_comment = related_link_comment + + +class CloneStatistics(Model): + """CloneStatistics. + + :param cloned_requirements_count: Number of Requirments cloned so far. + :type cloned_requirements_count: int + :param cloned_shared_steps_count: Number of shared steps cloned so far. + :type cloned_shared_steps_count: int + :param cloned_test_cases_count: Number of test cases cloned so far + :type cloned_test_cases_count: int + :param total_requirements_count: Total number of requirements to be cloned + :type total_requirements_count: int + :param total_test_cases_count: Total number of test cases to be cloned + :type total_test_cases_count: int + """ + + _attribute_map = { + 'cloned_requirements_count': {'key': 'clonedRequirementsCount', 'type': 'int'}, + 'cloned_shared_steps_count': {'key': 'clonedSharedStepsCount', 'type': 'int'}, + 'cloned_test_cases_count': {'key': 'clonedTestCasesCount', 'type': 'int'}, + 'total_requirements_count': {'key': 'totalRequirementsCount', 'type': 'int'}, + 'total_test_cases_count': {'key': 'totalTestCasesCount', 'type': 'int'} + } + + def __init__(self, cloned_requirements_count=None, cloned_shared_steps_count=None, cloned_test_cases_count=None, total_requirements_count=None, total_test_cases_count=None): + super(CloneStatistics, self).__init__() + self.cloned_requirements_count = cloned_requirements_count + self.cloned_shared_steps_count = cloned_shared_steps_count + self.cloned_test_cases_count = cloned_test_cases_count + self.total_requirements_count = total_requirements_count + self.total_test_cases_count = total_test_cases_count + + +class CloneTestPlanOperationInformation(Model): + """CloneTestPlanOperationInformation. + + :param clone_operation_response: Various information related to the clone + :type clone_operation_response: :class:`CloneOperationCommonResponse ` + :param clone_options: Test Plan Clone create parameters + :type clone_options: :class:`CloneOptions ` + :param destination_test_plan: Information of destination Test Plan + :type destination_test_plan: :class:`TestPlan ` + :param source_test_plan: Information of source Test Plan + :type source_test_plan: :class:`SourceTestplanResponse ` + """ + + _attribute_map = { + 'clone_operation_response': {'key': 'cloneOperationResponse', 'type': 'CloneOperationCommonResponse'}, + 'clone_options': {'key': 'cloneOptions', 'type': 'CloneOptions'}, + 'destination_test_plan': {'key': 'destinationTestPlan', 'type': 'TestPlan'}, + 'source_test_plan': {'key': 'sourceTestPlan', 'type': 'SourceTestplanResponse'} + } + + def __init__(self, clone_operation_response=None, clone_options=None, destination_test_plan=None, source_test_plan=None): + super(CloneTestPlanOperationInformation, self).__init__() + self.clone_operation_response = clone_operation_response + self.clone_options = clone_options + self.destination_test_plan = destination_test_plan + self.source_test_plan = source_test_plan + + +class CloneTestPlanParams(Model): + """CloneTestPlanParams. + + :param clone_options: Test Plan Clone create parameters + :type clone_options: :class:`CloneOptions ` + :param destination_test_plan: Information about destination Test Plan + :type destination_test_plan: :class:`DestinationTestPlanCloneParams ` + :param source_test_plan: Information about source Test Plan + :type source_test_plan: :class:`SourceTestPlanInfo ` + """ + + _attribute_map = { + 'clone_options': {'key': 'cloneOptions', 'type': 'CloneOptions'}, + 'destination_test_plan': {'key': 'destinationTestPlan', 'type': 'DestinationTestPlanCloneParams'}, + 'source_test_plan': {'key': 'sourceTestPlan', 'type': 'SourceTestPlanInfo'} + } + + def __init__(self, clone_options=None, destination_test_plan=None, source_test_plan=None): + super(CloneTestPlanParams, self).__init__() + self.clone_options = clone_options + self.destination_test_plan = destination_test_plan + self.source_test_plan = source_test_plan + + +class CloneTestSuiteOperationInformation(Model): + """CloneTestSuiteOperationInformation. + + :param cloned_test_suite: Information of newly cloned Test Suite + :type cloned_test_suite: :class:`TestSuiteReferenceWithProject ` + :param clone_operation_response: Various information related to the clone + :type clone_operation_response: :class:`CloneOperationCommonResponse ` + :param clone_options: Test Plan Clone create parameters + :type clone_options: :class:`CloneOptions ` + :param destination_test_suite: Information of destination Test Suite + :type destination_test_suite: :class:`TestSuiteReferenceWithProject ` + :param source_test_suite: Information of source Test Suite + :type source_test_suite: :class:`TestSuiteReferenceWithProject ` + """ + + _attribute_map = { + 'cloned_test_suite': {'key': 'clonedTestSuite', 'type': 'TestSuiteReferenceWithProject'}, + 'clone_operation_response': {'key': 'cloneOperationResponse', 'type': 'CloneOperationCommonResponse'}, + 'clone_options': {'key': 'cloneOptions', 'type': 'CloneOptions'}, + 'destination_test_suite': {'key': 'destinationTestSuite', 'type': 'TestSuiteReferenceWithProject'}, + 'source_test_suite': {'key': 'sourceTestSuite', 'type': 'TestSuiteReferenceWithProject'} + } + + def __init__(self, cloned_test_suite=None, clone_operation_response=None, clone_options=None, destination_test_suite=None, source_test_suite=None): + super(CloneTestSuiteOperationInformation, self).__init__() + self.cloned_test_suite = cloned_test_suite + self.clone_operation_response = clone_operation_response + self.clone_options = clone_options + self.destination_test_suite = destination_test_suite + self.source_test_suite = source_test_suite + + +class CloneTestSuiteParams(Model): + """CloneTestSuiteParams. + + :param clone_options: Test Plan Clone create parameters + :type clone_options: :class:`CloneOptions ` + :param destination_test_suite: Information about destination Test Suite + :type destination_test_suite: :class:`DestinationTestSuiteInfo ` + :param source_test_suite: Information about source Test Suite + :type source_test_suite: :class:`SourceTestSuiteInfo ` + """ + + _attribute_map = { + 'clone_options': {'key': 'cloneOptions', 'type': 'CloneOptions'}, + 'destination_test_suite': {'key': 'destinationTestSuite', 'type': 'DestinationTestSuiteInfo'}, + 'source_test_suite': {'key': 'sourceTestSuite', 'type': 'SourceTestSuiteInfo'} + } + + def __init__(self, clone_options=None, destination_test_suite=None, source_test_suite=None): + super(CloneTestSuiteParams, self).__init__() + self.clone_options = clone_options + self.destination_test_suite = destination_test_suite + self.source_test_suite = source_test_suite + + +class Configuration(Model): + """Configuration. + + :param configuration_id: Id of the Configuration Assigned to the Test Point + :type configuration_id: int + """ + + _attribute_map = { + 'configuration_id': {'key': 'configurationId', 'type': 'int'} + } + + def __init__(self, configuration_id=None): + super(Configuration, self).__init__() + self.configuration_id = configuration_id + + +class DestinationTestSuiteInfo(Model): + """DestinationTestSuiteInfo. + + :param id: Destination Suite Id + :type id: int + :param project: Destination Project Name + :type project: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'project': {'key': 'project', 'type': 'str'} + } + + def __init__(self, id=None, project=None): + super(DestinationTestSuiteInfo, self).__init__() + self.id = id + self.project = project + + +class GraphSubjectBase(Model): + """GraphSubjectBase. + + :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. + :type _links: :class:`ReferenceLinks ` + :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. + :type descriptor: str + :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. + :type display_name: str + :param url: This url is the full route to the source resource of this graph subject. + :type url: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'descriptor': {'key': 'descriptor', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, _links=None, descriptor=None, display_name=None, url=None): + super(GraphSubjectBase, self).__init__() + self._links = _links + self.descriptor = descriptor + self.display_name = display_name + self.url = url + + +class IdentityRef(GraphSubjectBase): + """IdentityRef. + + :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. + :type _links: :class:`ReferenceLinks ` + :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. + :type descriptor: str + :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. + :type display_name: str + :param url: This url is the full route to the source resource of this graph subject. + :type url: str + :param directory_alias: Deprecated - Can be retrieved by querying the Graph user referenced in the "self" entry of the IdentityRef "_links" dictionary + :type directory_alias: str + :param id: + :type id: str + :param image_url: Deprecated - Available in the "avatar" entry of the IdentityRef "_links" dictionary + :type image_url: str + :param inactive: Deprecated - Can be retrieved by querying the Graph membership state referenced in the "membershipState" entry of the GraphUser "_links" dictionary + :type inactive: bool + :param is_aad_identity: Deprecated - Can be inferred from the subject type of the descriptor (Descriptor.IsAadUserType/Descriptor.IsAadGroupType) + :type is_aad_identity: bool + :param is_container: Deprecated - Can be inferred from the subject type of the descriptor (Descriptor.IsGroupType) + :type is_container: bool + :param is_deleted_in_origin: + :type is_deleted_in_origin: bool + :param profile_url: Deprecated - not in use in most preexisting implementations of ToIdentityRef + :type profile_url: str + :param unique_name: Deprecated - use Domain+PrincipalName instead + :type unique_name: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'descriptor': {'key': 'descriptor', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'directory_alias': {'key': 'directoryAlias', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'image_url': {'key': 'imageUrl', 'type': 'str'}, + 'inactive': {'key': 'inactive', 'type': 'bool'}, + 'is_aad_identity': {'key': 'isAadIdentity', 'type': 'bool'}, + 'is_container': {'key': 'isContainer', 'type': 'bool'}, + 'is_deleted_in_origin': {'key': 'isDeletedInOrigin', 'type': 'bool'}, + 'profile_url': {'key': 'profileUrl', 'type': 'str'}, + 'unique_name': {'key': 'uniqueName', 'type': 'str'} + } + + def __init__(self, _links=None, descriptor=None, display_name=None, url=None, directory_alias=None, id=None, image_url=None, inactive=None, is_aad_identity=None, is_container=None, is_deleted_in_origin=None, profile_url=None, unique_name=None): + super(IdentityRef, self).__init__(_links=_links, descriptor=descriptor, display_name=display_name, url=url) + self.directory_alias = directory_alias + self.id = id + self.image_url = image_url + self.inactive = inactive + self.is_aad_identity = is_aad_identity + self.is_container = is_container + self.is_deleted_in_origin = is_deleted_in_origin + self.profile_url = profile_url + self.unique_name = unique_name + + +class LastResultDetails(Model): + """LastResultDetails. + + :param date_completed: + :type date_completed: datetime + :param duration: + :type duration: long + :param run_by: + :type run_by: :class:`IdentityRef ` + """ + + _attribute_map = { + 'date_completed': {'key': 'dateCompleted', 'type': 'iso-8601'}, + 'duration': {'key': 'duration', 'type': 'long'}, + 'run_by': {'key': 'runBy', 'type': 'IdentityRef'} + } + + def __init__(self, date_completed=None, duration=None, run_by=None): + super(LastResultDetails, self).__init__() + self.date_completed = date_completed + self.duration = duration + self.run_by = run_by + + +class NameValuePair(Model): + """NameValuePair. + + :param name: Name + :type name: str + :param value: Value + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'} + } + + def __init__(self, name=None, value=None): + super(NameValuePair, self).__init__() + self.name = name + self.value = value + + +class PointAssignment(Configuration): + """PointAssignment. + + :param configuration_id: Id of the Configuration Assigned to the Test Point + :type configuration_id: int + :param configuration_name: Name of the Configuration Assigned to the Test Point + :type configuration_name: str + :param id: Id of the Test Point + :type id: int + :param tester: Tester Assigned to the Test Point + :type tester: :class:`IdentityRef ` + """ + + _attribute_map = { + 'configuration_id': {'key': 'configurationId', 'type': 'int'}, + 'configuration_name': {'key': 'configurationName', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'int'}, + 'tester': {'key': 'tester', 'type': 'IdentityRef'} + } + + def __init__(self, configuration_id=None, configuration_name=None, id=None, tester=None): + super(PointAssignment, self).__init__(configuration_id=configuration_id) + self.configuration_name = configuration_name + self.id = id + self.tester = tester + + +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 ReleaseEnvironmentDefinitionReference(Model): + """ReleaseEnvironmentDefinitionReference. + + :param definition_id: ID of the release definition that contains the release environment definition. + :type definition_id: int + :param environment_definition_id: ID of the release environment definition. + :type environment_definition_id: int + """ + + _attribute_map = { + 'definition_id': {'key': 'definitionId', 'type': 'int'}, + 'environment_definition_id': {'key': 'environmentDefinitionId', 'type': 'int'} + } + + def __init__(self, definition_id=None, environment_definition_id=None): + super(ReleaseEnvironmentDefinitionReference, self).__init__() + self.definition_id = definition_id + self.environment_definition_id = environment_definition_id + + +class Results(Model): + """Results. + + :param outcome: Outcome of the Test Point + :type outcome: object + """ + + _attribute_map = { + 'outcome': {'key': 'outcome', 'type': 'object'} + } + + def __init__(self, outcome=None): + super(Results, self).__init__() + self.outcome = outcome + + +class SourceTestPlanInfo(Model): + """SourceTestPlanInfo. + + :param id: ID of the source Test Plan + :type id: int + :param suite_ids: Id of suites to be cloned inside source Test Plan + :type suite_ids: list of int + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'suite_ids': {'key': 'suiteIds', 'type': '[int]'} + } + + def __init__(self, id=None, suite_ids=None): + super(SourceTestPlanInfo, self).__init__() + self.id = id + self.suite_ids = suite_ids + + +class SourceTestSuiteInfo(Model): + """SourceTestSuiteInfo. + + :param id: Id of the Source Test Suite + :type id: int + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'} + } + + def __init__(self, id=None): + super(SourceTestSuiteInfo, self).__init__() + self.id = id + + +class SuiteEntryUpdateParams(Model): + """SuiteEntryUpdateParams. + + :param id: Id of the suite entry in the test suite: either a test case id or child suite id. + :type id: int + :param sequence_number: Sequence number for the suite entry object in the test suite. + :type sequence_number: int + :param suite_entry_type: Defines whther the entry is of type test case or suite. + :type suite_entry_type: object + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'sequence_number': {'key': 'sequenceNumber', 'type': 'int'}, + 'suite_entry_type': {'key': 'suiteEntryType', 'type': 'object'} + } + + def __init__(self, id=None, sequence_number=None, suite_entry_type=None): + super(SuiteEntryUpdateParams, self).__init__() + self.id = id + self.sequence_number = sequence_number + self.suite_entry_type = suite_entry_type + + +class SuiteTestCaseCreateUpdateParameters(Model): + """SuiteTestCaseCreateUpdateParameters. + + :param point_assignments: Configurations Ids + :type point_assignments: list of :class:`Configuration ` + :param work_item: Id of Test Case to be updated or created + :type work_item: :class:`WorkItem ` + """ + + _attribute_map = { + 'point_assignments': {'key': 'pointAssignments', 'type': '[Configuration]'}, + 'work_item': {'key': 'workItem', 'type': 'WorkItem'} + } + + def __init__(self, point_assignments=None, work_item=None): + super(SuiteTestCaseCreateUpdateParameters, self).__init__() + self.point_assignments = point_assignments + self.work_item = work_item + + +class TeamProjectReference(Model): + """TeamProjectReference. + + :param abbreviation: Project abbreviation. + :type abbreviation: str + :param default_team_image_url: Url to default team identity image. + :type default_team_image_url: str + :param description: The project's description (if any). + :type description: str + :param id: Project identifier. + :type id: str + :param last_update_time: Project last update time. + :type last_update_time: datetime + :param name: Project name. + :type name: str + :param revision: Project revision. + :type revision: long + :param state: Project state. + :type state: object + :param url: Url to the full version of the object. + :type url: str + :param visibility: Project visibility. + :type visibility: object + """ + + _attribute_map = { + 'abbreviation': {'key': 'abbreviation', 'type': 'str'}, + 'default_team_image_url': {'key': 'defaultTeamImageUrl', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'last_update_time': {'key': 'lastUpdateTime', 'type': 'iso-8601'}, + 'name': {'key': 'name', 'type': 'str'}, + 'revision': {'key': 'revision', 'type': 'long'}, + 'state': {'key': 'state', 'type': 'object'}, + 'url': {'key': 'url', 'type': 'str'}, + 'visibility': {'key': 'visibility', 'type': 'object'} + } + + def __init__(self, abbreviation=None, default_team_image_url=None, description=None, id=None, last_update_time=None, name=None, revision=None, state=None, url=None, visibility=None): + super(TeamProjectReference, self).__init__() + self.abbreviation = abbreviation + self.default_team_image_url = default_team_image_url + self.description = description + self.id = id + self.last_update_time = last_update_time + self.name = name + self.revision = revision + self.state = state + self.url = url + self.visibility = visibility + + +class TestCase(Model): + """TestCase. + + :param links: Reference links + :type links: :class:`ReferenceLinks ` + :param order: Order of the TestCase in the Suite + :type order: int + :param point_assignments: List of Points associated with the Test Case + :type point_assignments: list of :class:`PointAssignment ` + :param project: Project under which the Test Case is + :type project: :class:`TeamProjectReference ` + :param test_plan: Test Plan under which the Test Case is + :type test_plan: :class:`TestPlanReference ` + :param test_suite: Test Suite under which the Test Case is + :type test_suite: :class:`TestSuiteReference ` + :param work_item: Work Item details of the TestCase + :type work_item: :class:`WorkItemDetails ` + """ + + _attribute_map = { + 'links': {'key': 'links', 'type': 'ReferenceLinks'}, + 'order': {'key': 'order', 'type': 'int'}, + 'point_assignments': {'key': 'pointAssignments', 'type': '[PointAssignment]'}, + 'project': {'key': 'project', 'type': 'TeamProjectReference'}, + 'test_plan': {'key': 'testPlan', 'type': 'TestPlanReference'}, + 'test_suite': {'key': 'testSuite', 'type': 'TestSuiteReference'}, + 'work_item': {'key': 'workItem', 'type': 'WorkItemDetails'} + } + + def __init__(self, links=None, order=None, point_assignments=None, project=None, test_plan=None, test_suite=None, work_item=None): + super(TestCase, self).__init__() + self.links = links + self.order = order + self.point_assignments = point_assignments + self.project = project + self.test_plan = test_plan + self.test_suite = test_suite + self.work_item = work_item + + +class TestCaseReference(Model): + """TestCaseReference. + + :param id: Test Case Id + :type id: int + :param name: Test Case Name + :type name: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, id=None, name=None): + super(TestCaseReference, self).__init__() + self.id = id + self.name = name + + +class TestConfigurationCreateUpdateParameters(Model): + """TestConfigurationCreateUpdateParameters. + + :param description: Description of the configuration + :type description: str + :param is_default: Is the configuration a default for the test plans + :type is_default: bool + :param name: Name of the configuration + :type name: str + :param state: State of the configuration + :type state: object + :param values: Dictionary of Test Variable, Selected Value + :type values: list of :class:`NameValuePair ` + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'is_default': {'key': 'isDefault', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'object'}, + 'values': {'key': 'values', 'type': '[NameValuePair]'} + } + + def __init__(self, description=None, is_default=None, name=None, state=None, values=None): + super(TestConfigurationCreateUpdateParameters, self).__init__() + self.description = description + self.is_default = is_default + self.name = name + self.state = state + self.values = values + + +class TestConfigurationReference(Model): + """TestConfigurationReference. + + :param id: Id of the configuration + :type id: int + :param name: Name of the configuration + :type name: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, id=None, name=None): + super(TestConfigurationReference, self).__init__() + self.id = id + self.name = name + + +class TestEnvironment(Model): + """TestEnvironment. + + :param environment_id: + :type environment_id: str + :param environment_name: + :type environment_name: str + """ + + _attribute_map = { + 'environment_id': {'key': 'environmentId', 'type': 'str'}, + 'environment_name': {'key': 'environmentName', 'type': 'str'} + } + + def __init__(self, environment_id=None, environment_name=None): + super(TestEnvironment, self).__init__() + self.environment_id = environment_id + self.environment_name = environment_name + + +class TestOutcomeSettings(Model): + """TestOutcomeSettings. + + :param sync_outcome_across_suites: Value to configure how test outcomes for the same tests across suites are shown + :type sync_outcome_across_suites: bool + """ + + _attribute_map = { + 'sync_outcome_across_suites': {'key': 'syncOutcomeAcrossSuites', 'type': 'bool'} + } + + def __init__(self, sync_outcome_across_suites=None): + super(TestOutcomeSettings, self).__init__() + self.sync_outcome_across_suites = sync_outcome_across_suites + + +class TestPlanCreateParams(Model): + """TestPlanCreateParams. + + :param area_path: Area of the test plan. + :type area_path: str + :param automated_test_environment: + :type automated_test_environment: :class:`TestEnvironment ` + :param automated_test_settings: + :type automated_test_settings: :class:`TestSettings ` + :param build_definition: The Build Definition that generates a build associated with this test plan. + :type build_definition: :class:`BuildDefinitionReference ` + :param build_id: Build to be tested. + :type build_id: int + :param description: Description of the test plan. + :type description: str + :param end_date: End date for the test plan. + :type end_date: datetime + :param iteration: Iteration path of the test plan. + :type iteration: str + :param manual_test_environment: + :type manual_test_environment: :class:`TestEnvironment ` + :param manual_test_settings: + :type manual_test_settings: :class:`TestSettings ` + :param name: Name of the test plan. + :type name: str + :param owner: Owner of the test plan. + :type owner: :class:`IdentityRef ` + :param release_environment_definition: Release Environment to be used to deploy the build and run automated tests from this test plan. + :type release_environment_definition: :class:`ReleaseEnvironmentDefinitionReference ` + :param start_date: Start date for the test plan. + :type start_date: datetime + :param state: State of the test plan. + :type state: str + :param test_outcome_settings: Value to configure how same tests across test suites under a test plan need to behave + :type test_outcome_settings: :class:`TestOutcomeSettings ` + """ + + _attribute_map = { + 'area_path': {'key': 'areaPath', 'type': 'str'}, + 'automated_test_environment': {'key': 'automatedTestEnvironment', 'type': 'TestEnvironment'}, + 'automated_test_settings': {'key': 'automatedTestSettings', 'type': 'TestSettings'}, + 'build_definition': {'key': 'buildDefinition', 'type': 'BuildDefinitionReference'}, + 'build_id': {'key': 'buildId', 'type': 'int'}, + 'description': {'key': 'description', 'type': 'str'}, + 'end_date': {'key': 'endDate', 'type': 'iso-8601'}, + 'iteration': {'key': 'iteration', 'type': 'str'}, + 'manual_test_environment': {'key': 'manualTestEnvironment', 'type': 'TestEnvironment'}, + 'manual_test_settings': {'key': 'manualTestSettings', 'type': 'TestSettings'}, + 'name': {'key': 'name', 'type': 'str'}, + 'owner': {'key': 'owner', 'type': 'IdentityRef'}, + 'release_environment_definition': {'key': 'releaseEnvironmentDefinition', 'type': 'ReleaseEnvironmentDefinitionReference'}, + 'start_date': {'key': 'startDate', 'type': 'iso-8601'}, + 'state': {'key': 'state', 'type': 'str'}, + 'test_outcome_settings': {'key': 'testOutcomeSettings', 'type': 'TestOutcomeSettings'} + } + + def __init__(self, area_path=None, automated_test_environment=None, automated_test_settings=None, build_definition=None, build_id=None, description=None, end_date=None, iteration=None, manual_test_environment=None, manual_test_settings=None, name=None, owner=None, release_environment_definition=None, start_date=None, state=None, test_outcome_settings=None): + super(TestPlanCreateParams, self).__init__() + self.area_path = area_path + self.automated_test_environment = automated_test_environment + self.automated_test_settings = automated_test_settings + self.build_definition = build_definition + self.build_id = build_id + self.description = description + self.end_date = end_date + self.iteration = iteration + self.manual_test_environment = manual_test_environment + self.manual_test_settings = manual_test_settings + self.name = name + self.owner = owner + self.release_environment_definition = release_environment_definition + self.start_date = start_date + self.state = state + self.test_outcome_settings = test_outcome_settings + + +class TestPlanReference(Model): + """TestPlanReference. + + :param id: ID of the test plan. + :type id: int + :param name: Name of the test plan. + :type name: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, id=None, name=None): + super(TestPlanReference, self).__init__() + self.id = id + self.name = name + + +class TestPlansHubRefreshData(Model): + """TestPlansHubRefreshData. + + :param is_advanced_extension_enabled: + :type is_advanced_extension_enabled: bool + :param selected_suite_id: + :type selected_suite_id: int + :param selected_suite_name: + :type selected_suite_name: str + :param test_cases: + :type test_cases: list of :class:`TestCase ` + :param test_cases_continuation_token: + :type test_cases_continuation_token: str + :param test_plan: + :type test_plan: :class:`TestPlanDetailedReference ` + :param test_points: + :type test_points: list of :class:`TestPoint ` + :param test_points_continuation_token: + :type test_points_continuation_token: str + :param test_suites: + :type test_suites: list of :class:`TestSuite ` + :param test_suites_continuation_token: + :type test_suites_continuation_token: str + """ + + _attribute_map = { + 'is_advanced_extension_enabled': {'key': 'isAdvancedExtensionEnabled', 'type': 'bool'}, + 'selected_suite_id': {'key': 'selectedSuiteId', 'type': 'int'}, + 'selected_suite_name': {'key': 'selectedSuiteName', 'type': 'str'}, + 'test_cases': {'key': 'testCases', 'type': '[TestCase]'}, + 'test_cases_continuation_token': {'key': 'testCasesContinuationToken', 'type': 'str'}, + 'test_plan': {'key': 'testPlan', 'type': 'TestPlanDetailedReference'}, + 'test_points': {'key': 'testPoints', 'type': '[TestPoint]'}, + 'test_points_continuation_token': {'key': 'testPointsContinuationToken', 'type': 'str'}, + 'test_suites': {'key': 'testSuites', 'type': '[TestSuite]'}, + 'test_suites_continuation_token': {'key': 'testSuitesContinuationToken', 'type': 'str'} + } + + def __init__(self, is_advanced_extension_enabled=None, selected_suite_id=None, selected_suite_name=None, test_cases=None, test_cases_continuation_token=None, test_plan=None, test_points=None, test_points_continuation_token=None, test_suites=None, test_suites_continuation_token=None): + super(TestPlansHubRefreshData, self).__init__() + self.is_advanced_extension_enabled = is_advanced_extension_enabled + self.selected_suite_id = selected_suite_id + self.selected_suite_name = selected_suite_name + self.test_cases = test_cases + self.test_cases_continuation_token = test_cases_continuation_token + self.test_plan = test_plan + self.test_points = test_points + self.test_points_continuation_token = test_points_continuation_token + self.test_suites = test_suites + self.test_suites_continuation_token = test_suites_continuation_token + + +class TestPlanUpdateParams(TestPlanCreateParams): + """TestPlanUpdateParams. + + :param area_path: Area of the test plan. + :type area_path: str + :param automated_test_environment: + :type automated_test_environment: :class:`TestEnvironment ` + :param automated_test_settings: + :type automated_test_settings: :class:`TestSettings ` + :param build_definition: The Build Definition that generates a build associated with this test plan. + :type build_definition: :class:`BuildDefinitionReference ` + :param build_id: Build to be tested. + :type build_id: int + :param description: Description of the test plan. + :type description: str + :param end_date: End date for the test plan. + :type end_date: datetime + :param iteration: Iteration path of the test plan. + :type iteration: str + :param manual_test_environment: + :type manual_test_environment: :class:`TestEnvironment ` + :param manual_test_settings: + :type manual_test_settings: :class:`TestSettings ` + :param name: Name of the test plan. + :type name: str + :param owner: Owner of the test plan. + :type owner: :class:`IdentityRef ` + :param release_environment_definition: Release Environment to be used to deploy the build and run automated tests from this test plan. + :type release_environment_definition: :class:`ReleaseEnvironmentDefinitionReference ` + :param start_date: Start date for the test plan. + :type start_date: datetime + :param state: State of the test plan. + :type state: str + :param test_outcome_settings: Value to configure how same tests across test suites under a test plan need to behave + :type test_outcome_settings: :class:`TestOutcomeSettings ` + :param revision: Revision of the test plan. + :type revision: int + """ + + _attribute_map = { + 'area_path': {'key': 'areaPath', 'type': 'str'}, + 'automated_test_environment': {'key': 'automatedTestEnvironment', 'type': 'TestEnvironment'}, + 'automated_test_settings': {'key': 'automatedTestSettings', 'type': 'TestSettings'}, + 'build_definition': {'key': 'buildDefinition', 'type': 'BuildDefinitionReference'}, + 'build_id': {'key': 'buildId', 'type': 'int'}, + 'description': {'key': 'description', 'type': 'str'}, + 'end_date': {'key': 'endDate', 'type': 'iso-8601'}, + 'iteration': {'key': 'iteration', 'type': 'str'}, + 'manual_test_environment': {'key': 'manualTestEnvironment', 'type': 'TestEnvironment'}, + 'manual_test_settings': {'key': 'manualTestSettings', 'type': 'TestSettings'}, + 'name': {'key': 'name', 'type': 'str'}, + 'owner': {'key': 'owner', 'type': 'IdentityRef'}, + 'release_environment_definition': {'key': 'releaseEnvironmentDefinition', 'type': 'ReleaseEnvironmentDefinitionReference'}, + 'start_date': {'key': 'startDate', 'type': 'iso-8601'}, + 'state': {'key': 'state', 'type': 'str'}, + 'test_outcome_settings': {'key': 'testOutcomeSettings', 'type': 'TestOutcomeSettings'}, + 'revision': {'key': 'revision', 'type': 'int'} + } + + def __init__(self, area_path=None, automated_test_environment=None, automated_test_settings=None, build_definition=None, build_id=None, description=None, end_date=None, iteration=None, manual_test_environment=None, manual_test_settings=None, name=None, owner=None, release_environment_definition=None, start_date=None, state=None, test_outcome_settings=None, revision=None): + super(TestPlanUpdateParams, self).__init__(area_path=area_path, automated_test_environment=automated_test_environment, automated_test_settings=automated_test_settings, build_definition=build_definition, build_id=build_id, description=description, end_date=end_date, iteration=iteration, manual_test_environment=manual_test_environment, manual_test_settings=manual_test_settings, name=name, owner=owner, release_environment_definition=release_environment_definition, start_date=start_date, state=state, test_outcome_settings=test_outcome_settings) + self.revision = revision + + +class TestPoint(Model): + """TestPoint. + + :param comment: Comment associated to the Test Point + :type comment: str + :param configuration: Configuration associated with the Test Point + :type configuration: :class:`TestConfigurationReference ` + :param id: Id of the Test Point + :type id: int + :param is_active: Variable to decide whether the test case is Active or not + :type is_active: bool + :param is_automated: Is the Test Point for Automated Test Case or Manual + :type is_automated: bool + :param last_reset_to_active: Last Reset to Active Time Stamp for the Test Point + :type last_reset_to_active: datetime + :param last_updated_by: Last Updated details for the Test Point + :type last_updated_by: :class:`IdentityRef ` + :param last_updated_date: Last Update Time Stamp for the Test Point + :type last_updated_date: datetime + :param links: Reference links + :type links: :class:`ReferenceLinks ` + :param project: Project under which the Test Point is + :type project: :class:`TeamProjectReference ` + :param results: Results associated to the Test Point + :type results: :class:`TestPointResults ` + :param test_case_reference: Test Case Reference + :type test_case_reference: :class:`TestCaseReference ` + :param tester: Tester associated with the Test Point + :type tester: :class:`IdentityRef ` + :param test_plan: Test Plan under which the Test Point is + :type test_plan: :class:`TestPlanReference ` + :param test_suite: Test Suite under which the Test Point is + :type test_suite: :class:`TestSuiteReference ` + """ + + _attribute_map = { + 'comment': {'key': 'comment', 'type': 'str'}, + 'configuration': {'key': 'configuration', 'type': 'TestConfigurationReference'}, + 'id': {'key': 'id', 'type': 'int'}, + 'is_active': {'key': 'isActive', 'type': 'bool'}, + 'is_automated': {'key': 'isAutomated', 'type': 'bool'}, + 'last_reset_to_active': {'key': 'lastResetToActive', 'type': 'iso-8601'}, + 'last_updated_by': {'key': 'lastUpdatedBy', 'type': 'IdentityRef'}, + 'last_updated_date': {'key': 'lastUpdatedDate', 'type': 'iso-8601'}, + 'links': {'key': 'links', 'type': 'ReferenceLinks'}, + 'project': {'key': 'project', 'type': 'TeamProjectReference'}, + 'results': {'key': 'results', 'type': 'TestPointResults'}, + 'test_case_reference': {'key': 'testCaseReference', 'type': 'TestCaseReference'}, + 'tester': {'key': 'tester', 'type': 'IdentityRef'}, + 'test_plan': {'key': 'testPlan', 'type': 'TestPlanReference'}, + 'test_suite': {'key': 'testSuite', 'type': 'TestSuiteReference'} + } + + def __init__(self, comment=None, configuration=None, id=None, is_active=None, is_automated=None, last_reset_to_active=None, last_updated_by=None, last_updated_date=None, links=None, project=None, results=None, test_case_reference=None, tester=None, test_plan=None, test_suite=None): + super(TestPoint, self).__init__() + self.comment = comment + self.configuration = configuration + self.id = id + self.is_active = is_active + self.is_automated = is_automated + self.last_reset_to_active = last_reset_to_active + self.last_updated_by = last_updated_by + self.last_updated_date = last_updated_date + self.links = links + self.project = project + self.results = results + self.test_case_reference = test_case_reference + self.tester = tester + self.test_plan = test_plan + self.test_suite = test_suite + + +class TestPointResults(Model): + """TestPointResults. + + :param failure_type: Failure Type for the Test Point + :type failure_type: object + :param last_resolution_state: Last Resolution State Id for the TEst Point + :type last_resolution_state: object + :param last_result_details: Last Result Details for the Test Point + :type last_result_details: :class:`LastResultDetails ` + :param last_result_id: Last Result Id + :type last_result_id: int + :param last_result_state: Last Result State of the Test Point + :type last_result_state: object + :param last_run_build_number: Last RUn Build Number for the Test Point + :type last_run_build_number: str + :param last_test_run_id: Last Test Run Id for the Test Point + :type last_test_run_id: int + :param outcome: Outcome of the Test Point + :type outcome: object + :param state: State of the Test Point + :type state: object + """ + + _attribute_map = { + 'failure_type': {'key': 'failureType', 'type': 'object'}, + 'last_resolution_state': {'key': 'lastResolutionState', 'type': 'object'}, + 'last_result_details': {'key': 'lastResultDetails', 'type': 'LastResultDetails'}, + 'last_result_id': {'key': 'lastResultId', 'type': 'int'}, + 'last_result_state': {'key': 'lastResultState', 'type': 'object'}, + 'last_run_build_number': {'key': 'lastRunBuildNumber', 'type': 'str'}, + 'last_test_run_id': {'key': 'lastTestRunId', 'type': 'int'}, + 'outcome': {'key': 'outcome', 'type': 'object'}, + 'state': {'key': 'state', 'type': 'object'} + } + + def __init__(self, failure_type=None, last_resolution_state=None, last_result_details=None, last_result_id=None, last_result_state=None, last_run_build_number=None, last_test_run_id=None, outcome=None, state=None): + super(TestPointResults, self).__init__() + self.failure_type = failure_type + self.last_resolution_state = last_resolution_state + self.last_result_details = last_result_details + self.last_result_id = last_result_id + self.last_result_state = last_result_state + self.last_run_build_number = last_run_build_number + self.last_test_run_id = last_test_run_id + self.outcome = outcome + self.state = state + + +class TestPointUpdateParams(Model): + """TestPointUpdateParams. + + :param id: Id of Test Point to be updated + :type id: int + :param is_active: Reset the Test Point to Active + :type is_active: bool + :param results: Results of the test point + :type results: :class:`Results ` + :param tester: Tester of the Test Point + :type tester: :class:`IdentityRef ` + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'is_active': {'key': 'isActive', 'type': 'bool'}, + 'results': {'key': 'results', 'type': 'Results'}, + 'tester': {'key': 'tester', 'type': 'IdentityRef'} + } + + def __init__(self, id=None, is_active=None, results=None, tester=None): + super(TestPointUpdateParams, self).__init__() + self.id = id + self.is_active = is_active + self.results = results + self.tester = tester + + +class TestSettings(Model): + """TestSettings. + + :param area_path: Area path required to create test settings + :type area_path: str + :param description: Description of the test settings. Used in create test settings. + :type description: str + :param is_public: Indicates if the tests settings is public or private.Used in create test settings. + :type is_public: bool + :param machine_roles: Xml string of machine roles. Used in create test settings. + :type machine_roles: str + :param test_settings_content: Test settings content. + :type test_settings_content: str + :param test_settings_id: Test settings id. + :type test_settings_id: int + :param test_settings_name: Test settings name. + :type test_settings_name: str + """ + + _attribute_map = { + 'area_path': {'key': 'areaPath', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'is_public': {'key': 'isPublic', 'type': 'bool'}, + 'machine_roles': {'key': 'machineRoles', 'type': 'str'}, + 'test_settings_content': {'key': 'testSettingsContent', 'type': 'str'}, + 'test_settings_id': {'key': 'testSettingsId', 'type': 'int'}, + 'test_settings_name': {'key': 'testSettingsName', 'type': 'str'} + } + + def __init__(self, area_path=None, description=None, is_public=None, machine_roles=None, test_settings_content=None, test_settings_id=None, test_settings_name=None): + super(TestSettings, self).__init__() + self.area_path = area_path + self.description = description + self.is_public = is_public + self.machine_roles = machine_roles + self.test_settings_content = test_settings_content + self.test_settings_id = test_settings_id + self.test_settings_name = test_settings_name + + +class TestSuiteCreateUpdateCommonParams(Model): + """TestSuiteCreateUpdateCommonParams. + + :param default_configurations: Test suite default configurations. + :type default_configurations: list of :class:`TestConfigurationReference ` + :param default_testers: Test suite default testers. + :type default_testers: list of :class:`IdentityRef ` + :param inherit_default_configurations: Default configuration was inherited or not. + :type inherit_default_configurations: bool + :param name: Name of test suite. + :type name: str + :param parent_suite: Test suite parent shallow reference. + :type parent_suite: :class:`TestSuiteReference ` + :param query_string: Test suite query string, for dynamic suites. + :type query_string: str + """ + + _attribute_map = { + 'default_configurations': {'key': 'defaultConfigurations', 'type': '[TestConfigurationReference]'}, + 'default_testers': {'key': 'defaultTesters', 'type': '[IdentityRef]'}, + 'inherit_default_configurations': {'key': 'inheritDefaultConfigurations', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'parent_suite': {'key': 'parentSuite', 'type': 'TestSuiteReference'}, + 'query_string': {'key': 'queryString', 'type': 'str'} + } + + def __init__(self, default_configurations=None, default_testers=None, inherit_default_configurations=None, name=None, parent_suite=None, query_string=None): + super(TestSuiteCreateUpdateCommonParams, self).__init__() + self.default_configurations = default_configurations + self.default_testers = default_testers + self.inherit_default_configurations = inherit_default_configurations + self.name = name + self.parent_suite = parent_suite + self.query_string = query_string + + +class TestSuiteReference(Model): + """TestSuiteReference. + + :param id: ID of the test suite. + :type id: int + :param name: Name of the test suite. + :type name: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, id=None, name=None): + super(TestSuiteReference, self).__init__() + self.id = id + self.name = name + + +class TestSuiteReferenceWithProject(TestSuiteReference): + """TestSuiteReferenceWithProject. + + :param id: ID of the test suite. + :type id: int + :param name: Name of the test suite. + :type name: str + :param project: Refernce of destination Project + :type project: :class:`TeamProjectReference ` + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'project': {'key': 'project', 'type': 'TeamProjectReference'} + } + + def __init__(self, id=None, name=None, project=None): + super(TestSuiteReferenceWithProject, self).__init__(id=id, name=name) + self.project = project + + +class TestSuiteUpdateParams(TestSuiteCreateUpdateCommonParams): + """TestSuiteUpdateParams. + + :param default_configurations: Test suite default configurations. + :type default_configurations: list of :class:`TestConfigurationReference ` + :param default_testers: Test suite default testers. + :type default_testers: list of :class:`IdentityRef ` + :param inherit_default_configurations: Default configuration was inherited or not. + :type inherit_default_configurations: bool + :param name: Name of test suite. + :type name: str + :param parent_suite: Test suite parent shallow reference. + :type parent_suite: :class:`TestSuiteReference ` + :param query_string: Test suite query string, for dynamic suites. + :type query_string: str + :param revision: Test suite revision. + :type revision: int + """ + + _attribute_map = { + 'default_configurations': {'key': 'defaultConfigurations', 'type': '[TestConfigurationReference]'}, + 'default_testers': {'key': 'defaultTesters', 'type': '[IdentityRef]'}, + 'inherit_default_configurations': {'key': 'inheritDefaultConfigurations', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'parent_suite': {'key': 'parentSuite', 'type': 'TestSuiteReference'}, + 'query_string': {'key': 'queryString', 'type': 'str'}, + 'revision': {'key': 'revision', 'type': 'int'} + } + + def __init__(self, default_configurations=None, default_testers=None, inherit_default_configurations=None, name=None, parent_suite=None, query_string=None, revision=None): + super(TestSuiteUpdateParams, self).__init__(default_configurations=default_configurations, default_testers=default_testers, inherit_default_configurations=inherit_default_configurations, name=name, parent_suite=parent_suite, query_string=query_string) + self.revision = revision + + +class TestVariableCreateUpdateParameters(Model): + """TestVariableCreateUpdateParameters. + + :param description: Description of the test variable + :type description: str + :param name: Name of the test variable + :type name: str + :param values: List of allowed values + :type values: list of str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'} + } + + def __init__(self, description=None, name=None, values=None): + super(TestVariableCreateUpdateParameters, self).__init__() + self.description = description + self.name = name + self.values = values + + +class WorkItem(Model): + """WorkItem. + + :param id: Id of the Work Item + :type id: int + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'} + } + + def __init__(self, id=None): + super(WorkItem, self).__init__() + self.id = id + + +class WorkItemDetails(Model): + """WorkItemDetails. + + :param id: Work Item Id + :type id: int + :param name: Work Item Name + :type name: str + :param work_item_fields: Work Item Fields + :type work_item_fields: list of object + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'work_item_fields': {'key': 'workItemFields', 'type': '[object]'} + } + + def __init__(self, id=None, name=None, work_item_fields=None): + super(WorkItemDetails, self).__init__() + self.id = id + self.name = name + self.work_item_fields = work_item_fields + + +class DestinationTestPlanCloneParams(TestPlanCreateParams): + """DestinationTestPlanCloneParams. + + :param area_path: Area of the test plan. + :type area_path: str + :param automated_test_environment: + :type automated_test_environment: :class:`TestEnvironment ` + :param automated_test_settings: + :type automated_test_settings: :class:`TestSettings ` + :param build_definition: The Build Definition that generates a build associated with this test plan. + :type build_definition: :class:`BuildDefinitionReference ` + :param build_id: Build to be tested. + :type build_id: int + :param description: Description of the test plan. + :type description: str + :param end_date: End date for the test plan. + :type end_date: datetime + :param iteration: Iteration path of the test plan. + :type iteration: str + :param manual_test_environment: + :type manual_test_environment: :class:`TestEnvironment ` + :param manual_test_settings: + :type manual_test_settings: :class:`TestSettings ` + :param name: Name of the test plan. + :type name: str + :param owner: Owner of the test plan. + :type owner: :class:`IdentityRef ` + :param release_environment_definition: Release Environment to be used to deploy the build and run automated tests from this test plan. + :type release_environment_definition: :class:`ReleaseEnvironmentDefinitionReference ` + :param start_date: Start date for the test plan. + :type start_date: datetime + :param state: State of the test plan. + :type state: str + :param test_outcome_settings: Value to configure how same tests across test suites under a test plan need to behave + :type test_outcome_settings: :class:`TestOutcomeSettings ` + :param project: Destination Project Name + :type project: str + """ + + _attribute_map = { + 'area_path': {'key': 'areaPath', 'type': 'str'}, + 'automated_test_environment': {'key': 'automatedTestEnvironment', 'type': 'TestEnvironment'}, + 'automated_test_settings': {'key': 'automatedTestSettings', 'type': 'TestSettings'}, + 'build_definition': {'key': 'buildDefinition', 'type': 'BuildDefinitionReference'}, + 'build_id': {'key': 'buildId', 'type': 'int'}, + 'description': {'key': 'description', 'type': 'str'}, + 'end_date': {'key': 'endDate', 'type': 'iso-8601'}, + 'iteration': {'key': 'iteration', 'type': 'str'}, + 'manual_test_environment': {'key': 'manualTestEnvironment', 'type': 'TestEnvironment'}, + 'manual_test_settings': {'key': 'manualTestSettings', 'type': 'TestSettings'}, + 'name': {'key': 'name', 'type': 'str'}, + 'owner': {'key': 'owner', 'type': 'IdentityRef'}, + 'release_environment_definition': {'key': 'releaseEnvironmentDefinition', 'type': 'ReleaseEnvironmentDefinitionReference'}, + 'start_date': {'key': 'startDate', 'type': 'iso-8601'}, + 'state': {'key': 'state', 'type': 'str'}, + 'test_outcome_settings': {'key': 'testOutcomeSettings', 'type': 'TestOutcomeSettings'}, + 'project': {'key': 'project', 'type': 'str'} + } + + def __init__(self, area_path=None, automated_test_environment=None, automated_test_settings=None, build_definition=None, build_id=None, description=None, end_date=None, iteration=None, manual_test_environment=None, manual_test_settings=None, name=None, owner=None, release_environment_definition=None, start_date=None, state=None, test_outcome_settings=None, project=None): + super(DestinationTestPlanCloneParams, self).__init__(area_path=area_path, automated_test_environment=automated_test_environment, automated_test_settings=automated_test_settings, build_definition=build_definition, build_id=build_id, description=description, end_date=end_date, iteration=iteration, manual_test_environment=manual_test_environment, manual_test_settings=manual_test_settings, name=name, owner=owner, release_environment_definition=release_environment_definition, start_date=start_date, state=state, test_outcome_settings=test_outcome_settings) + self.project = project + + +class SourceTestplanResponse(TestPlanReference): + """SourceTestplanResponse. + + :param id: ID of the test plan. + :type id: int + :param name: Name of the test plan. + :type name: str + :param project: project reference + :type project: :class:`TeamProjectReference ` + :param suite_ids: Id of suites to be cloned inside source Test Plan + :type suite_ids: list of int + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'project': {'key': 'project', 'type': 'TeamProjectReference'}, + 'suite_ids': {'key': 'suiteIds', 'type': '[int]'} + } + + def __init__(self, id=None, name=None, project=None, suite_ids=None): + super(SourceTestplanResponse, self).__init__(id=id, name=name) + self.project = project + self.suite_ids = suite_ids + + +class SuiteEntry(SuiteEntryUpdateParams): + """SuiteEntry. + + :param id: Id of the suite entry in the test suite: either a test case id or child suite id. + :type id: int + :param sequence_number: Sequence number for the suite entry object in the test suite. + :type sequence_number: int + :param suite_entry_type: Defines whther the entry is of type test case or suite. + :type suite_entry_type: object + :param suite_id: Id for the test suite. + :type suite_id: int + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'sequence_number': {'key': 'sequenceNumber', 'type': 'int'}, + 'suite_entry_type': {'key': 'suiteEntryType', 'type': 'object'}, + 'suite_id': {'key': 'suiteId', 'type': 'int'} + } + + def __init__(self, id=None, sequence_number=None, suite_entry_type=None, suite_id=None): + super(SuiteEntry, self).__init__(id=id, sequence_number=sequence_number, suite_entry_type=suite_entry_type) + self.suite_id = suite_id + + +class TestConfiguration(TestConfigurationCreateUpdateParameters): + """TestConfiguration. + + :param description: Description of the configuration + :type description: str + :param is_default: Is the configuration a default for the test plans + :type is_default: bool + :param name: Name of the configuration + :type name: str + :param state: State of the configuration + :type state: object + :param values: Dictionary of Test Variable, Selected Value + :type values: list of :class:`NameValuePair ` + :param id: Id of the configuration + :type id: int + :param project: Id of the test configuration variable + :type project: :class:`TeamProjectReference ` + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'is_default': {'key': 'isDefault', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'object'}, + 'values': {'key': 'values', 'type': '[NameValuePair]'}, + 'id': {'key': 'id', 'type': 'int'}, + 'project': {'key': 'project', 'type': 'TeamProjectReference'} + } + + def __init__(self, description=None, is_default=None, name=None, state=None, values=None, id=None, project=None): + super(TestConfiguration, self).__init__(description=description, is_default=is_default, name=name, state=state, values=values) + self.id = id + self.project = project + + +class TestPlan(TestPlanUpdateParams): + """TestPlan. + + :param area_path: Area of the test plan. + :type area_path: str + :param automated_test_environment: + :type automated_test_environment: :class:`TestEnvironment ` + :param automated_test_settings: + :type automated_test_settings: :class:`TestSettings ` + :param build_definition: The Build Definition that generates a build associated with this test plan. + :type build_definition: :class:`BuildDefinitionReference ` + :param build_id: Build to be tested. + :type build_id: int + :param description: Description of the test plan. + :type description: str + :param end_date: End date for the test plan. + :type end_date: datetime + :param iteration: Iteration path of the test plan. + :type iteration: str + :param manual_test_environment: + :type manual_test_environment: :class:`TestEnvironment ` + :param manual_test_settings: + :type manual_test_settings: :class:`TestSettings ` + :param name: Name of the test plan. + :type name: str + :param owner: Owner of the test plan. + :type owner: :class:`IdentityRef ` + :param release_environment_definition: Release Environment to be used to deploy the build and run automated tests from this test plan. + :type release_environment_definition: :class:`ReleaseEnvironmentDefinitionReference ` + :param start_date: Start date for the test plan. + :type start_date: datetime + :param state: State of the test plan. + :type state: str + :param test_outcome_settings: Value to configure how same tests across test suites under a test plan need to behave + :type test_outcome_settings: :class:`TestOutcomeSettings ` + :param revision: Revision of the test plan. + :type revision: int + :param _links: Relevant links + :type _links: :class:`ReferenceLinks ` + :param id: ID of the test plan. + :type id: int + :param previous_build_id: Previous build Id assocaited with the test plan + :type previous_build_id: int + :param project: Project which contains the test plan. + :type project: :class:`TeamProjectReference ` + :param root_suite: Root test suite of the test plan. + :type root_suite: :class:`TestSuiteReference ` + :param updated_by: Identity Reference for the last update of the test plan + :type updated_by: :class:`IdentityRef ` + :param updated_date: Updated date of the test plan + :type updated_date: datetime + """ + + _attribute_map = { + 'area_path': {'key': 'areaPath', 'type': 'str'}, + 'automated_test_environment': {'key': 'automatedTestEnvironment', 'type': 'TestEnvironment'}, + 'automated_test_settings': {'key': 'automatedTestSettings', 'type': 'TestSettings'}, + 'build_definition': {'key': 'buildDefinition', 'type': 'BuildDefinitionReference'}, + 'build_id': {'key': 'buildId', 'type': 'int'}, + 'description': {'key': 'description', 'type': 'str'}, + 'end_date': {'key': 'endDate', 'type': 'iso-8601'}, + 'iteration': {'key': 'iteration', 'type': 'str'}, + 'manual_test_environment': {'key': 'manualTestEnvironment', 'type': 'TestEnvironment'}, + 'manual_test_settings': {'key': 'manualTestSettings', 'type': 'TestSettings'}, + 'name': {'key': 'name', 'type': 'str'}, + 'owner': {'key': 'owner', 'type': 'IdentityRef'}, + 'release_environment_definition': {'key': 'releaseEnvironmentDefinition', 'type': 'ReleaseEnvironmentDefinitionReference'}, + 'start_date': {'key': 'startDate', 'type': 'iso-8601'}, + 'state': {'key': 'state', 'type': 'str'}, + 'test_outcome_settings': {'key': 'testOutcomeSettings', 'type': 'TestOutcomeSettings'}, + 'revision': {'key': 'revision', 'type': 'int'}, + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'id': {'key': 'id', 'type': 'int'}, + 'previous_build_id': {'key': 'previousBuildId', 'type': 'int'}, + 'project': {'key': 'project', 'type': 'TeamProjectReference'}, + 'root_suite': {'key': 'rootSuite', 'type': 'TestSuiteReference'}, + 'updated_by': {'key': 'updatedBy', 'type': 'IdentityRef'}, + 'updated_date': {'key': 'updatedDate', 'type': 'iso-8601'} + } + + def __init__(self, area_path=None, automated_test_environment=None, automated_test_settings=None, build_definition=None, build_id=None, description=None, end_date=None, iteration=None, manual_test_environment=None, manual_test_settings=None, name=None, owner=None, release_environment_definition=None, start_date=None, state=None, test_outcome_settings=None, revision=None, _links=None, id=None, previous_build_id=None, project=None, root_suite=None, updated_by=None, updated_date=None): + super(TestPlan, self).__init__(area_path=area_path, automated_test_environment=automated_test_environment, automated_test_settings=automated_test_settings, build_definition=build_definition, build_id=build_id, description=description, end_date=end_date, iteration=iteration, manual_test_environment=manual_test_environment, manual_test_settings=manual_test_settings, name=name, owner=owner, release_environment_definition=release_environment_definition, start_date=start_date, state=state, test_outcome_settings=test_outcome_settings, revision=revision) + self._links = _links + self.id = id + self.previous_build_id = previous_build_id + self.project = project + self.root_suite = root_suite + self.updated_by = updated_by + self.updated_date = updated_date + + +class TestPlanDetailedReference(TestPlanReference): + """TestPlanDetailedReference. + + :param id: ID of the test plan. + :type id: int + :param name: Name of the test plan. + :type name: str + :param area_path: Area of the test plan. + :type area_path: str + :param end_date: End date for the test plan. + :type end_date: datetime + :param iteration: Iteration path of the test plan. + :type iteration: str + :param root_suite_id: Root Suite Id + :type root_suite_id: int + :param start_date: Start date for the test plan. + :type start_date: datetime + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'area_path': {'key': 'areaPath', 'type': 'str'}, + 'end_date': {'key': 'endDate', 'type': 'iso-8601'}, + 'iteration': {'key': 'iteration', 'type': 'str'}, + 'root_suite_id': {'key': 'rootSuiteId', 'type': 'int'}, + 'start_date': {'key': 'startDate', 'type': 'iso-8601'} + } + + def __init__(self, id=None, name=None, area_path=None, end_date=None, iteration=None, root_suite_id=None, start_date=None): + super(TestPlanDetailedReference, self).__init__(id=id, name=name) + self.area_path = area_path + self.end_date = end_date + self.iteration = iteration + self.root_suite_id = root_suite_id + self.start_date = start_date + + +class TestSuiteCreateParams(TestSuiteCreateUpdateCommonParams): + """TestSuiteCreateParams. + + :param default_configurations: Test suite default configurations. + :type default_configurations: list of :class:`TestConfigurationReference ` + :param default_testers: Test suite default testers. + :type default_testers: list of :class:`IdentityRef ` + :param inherit_default_configurations: Default configuration was inherited or not. + :type inherit_default_configurations: bool + :param name: Name of test suite. + :type name: str + :param parent_suite: Test suite parent shallow reference. + :type parent_suite: :class:`TestSuiteReference ` + :param query_string: Test suite query string, for dynamic suites. + :type query_string: str + :param requirement_id: Test suite requirement id. + :type requirement_id: int + :param suite_type: Test suite type. + :type suite_type: object + """ + + _attribute_map = { + 'default_configurations': {'key': 'defaultConfigurations', 'type': '[TestConfigurationReference]'}, + 'default_testers': {'key': 'defaultTesters', 'type': '[IdentityRef]'}, + 'inherit_default_configurations': {'key': 'inheritDefaultConfigurations', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'parent_suite': {'key': 'parentSuite', 'type': 'TestSuiteReference'}, + 'query_string': {'key': 'queryString', 'type': 'str'}, + 'requirement_id': {'key': 'requirementId', 'type': 'int'}, + 'suite_type': {'key': 'suiteType', 'type': 'object'} + } + + def __init__(self, default_configurations=None, default_testers=None, inherit_default_configurations=None, name=None, parent_suite=None, query_string=None, requirement_id=None, suite_type=None): + super(TestSuiteCreateParams, self).__init__(default_configurations=default_configurations, default_testers=default_testers, inherit_default_configurations=inherit_default_configurations, name=name, parent_suite=parent_suite, query_string=query_string) + self.requirement_id = requirement_id + self.suite_type = suite_type + + +class TestVariable(TestVariableCreateUpdateParameters): + """TestVariable. + + :param description: Description of the test variable + :type description: str + :param name: Name of the test variable + :type name: str + :param values: List of allowed values + :type values: list of str + :param id: Id of the test variable + :type id: int + :param project: Id of the test variable + :type project: :class:`TeamProjectReference ` + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + 'id': {'key': 'id', 'type': 'int'}, + 'project': {'key': 'project', 'type': 'TeamProjectReference'} + } + + def __init__(self, description=None, name=None, values=None, id=None, project=None): + super(TestVariable, self).__init__(description=description, name=name, values=values) + self.id = id + self.project = project + + +class TestSuite(TestSuiteCreateParams): + """TestSuite. + + :param default_configurations: Test suite default configurations. + :type default_configurations: list of :class:`TestConfigurationReference ` + :param default_testers: Test suite default testers. + :type default_testers: list of :class:`IdentityRef ` + :param inherit_default_configurations: Default configuration was inherited or not. + :type inherit_default_configurations: bool + :param name: Name of test suite. + :type name: str + :param parent_suite: Test suite parent shallow reference. + :type parent_suite: :class:`TestSuiteReference ` + :param query_string: Test suite query string, for dynamic suites. + :type query_string: str + :param requirement_id: Test suite requirement id. + :type requirement_id: int + :param suite_type: Test suite type. + :type suite_type: object + :param _links: Links: self, testPoints, testCases, parent + :type _links: :class:`ReferenceLinks ` + :param children: Child test suites of current test suite. + :type children: list of :class:`TestSuite ` + :param has_children: Boolean value dictating if Child test suites are present + :type has_children: bool + :param id: Id of test suite. + :type id: int + :param last_error: Last error for test suite. + :type last_error: str + :param last_populated_date: Last populated date. + :type last_populated_date: datetime + :param last_updated_by: IdentityRef of user who has updated test suite recently. + :type last_updated_by: :class:`IdentityRef ` + :param last_updated_date: Last update date. + :type last_updated_date: datetime + :param plan: Test plan to which the test suite belongs. + :type plan: :class:`TestPlanReference ` + :param project: Test suite project shallow reference. + :type project: :class:`TeamProjectReference ` + :param revision: Test suite revision. + :type revision: int + """ + + _attribute_map = { + 'default_configurations': {'key': 'defaultConfigurations', 'type': '[TestConfigurationReference]'}, + 'default_testers': {'key': 'defaultTesters', 'type': '[IdentityRef]'}, + 'inherit_default_configurations': {'key': 'inheritDefaultConfigurations', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'parent_suite': {'key': 'parentSuite', 'type': 'TestSuiteReference'}, + 'query_string': {'key': 'queryString', 'type': 'str'}, + 'requirement_id': {'key': 'requirementId', 'type': 'int'}, + 'suite_type': {'key': 'suiteType', 'type': 'object'}, + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'children': {'key': 'children', 'type': '[TestSuite]'}, + 'has_children': {'key': 'hasChildren', 'type': 'bool'}, + 'id': {'key': 'id', 'type': 'int'}, + 'last_error': {'key': 'lastError', 'type': 'str'}, + 'last_populated_date': {'key': 'lastPopulatedDate', 'type': 'iso-8601'}, + 'last_updated_by': {'key': 'lastUpdatedBy', 'type': 'IdentityRef'}, + 'last_updated_date': {'key': 'lastUpdatedDate', 'type': 'iso-8601'}, + 'plan': {'key': 'plan', 'type': 'TestPlanReference'}, + 'project': {'key': 'project', 'type': 'TeamProjectReference'}, + 'revision': {'key': 'revision', 'type': 'int'} + } + + def __init__(self, default_configurations=None, default_testers=None, inherit_default_configurations=None, name=None, parent_suite=None, query_string=None, requirement_id=None, suite_type=None, _links=None, children=None, has_children=None, id=None, last_error=None, last_populated_date=None, last_updated_by=None, last_updated_date=None, plan=None, project=None, revision=None): + super(TestSuite, self).__init__(default_configurations=default_configurations, default_testers=default_testers, inherit_default_configurations=inherit_default_configurations, name=name, parent_suite=parent_suite, query_string=query_string, requirement_id=requirement_id, suite_type=suite_type) + self._links = _links + self.children = children + self.has_children = has_children + self.id = id + self.last_error = last_error + self.last_populated_date = last_populated_date + self.last_updated_by = last_updated_by + self.last_updated_date = last_updated_date + self.plan = plan + self.project = project + self.revision = revision + + +__all__ = [ + 'BuildDefinitionReference', + 'CloneOperationCommonResponse', + 'CloneOptions', + 'CloneStatistics', + 'CloneTestPlanOperationInformation', + 'CloneTestPlanParams', + 'CloneTestSuiteOperationInformation', + 'CloneTestSuiteParams', + 'Configuration', + 'DestinationTestSuiteInfo', + 'GraphSubjectBase', + 'IdentityRef', + 'LastResultDetails', + 'NameValuePair', + 'PointAssignment', + 'ReferenceLinks', + 'ReleaseEnvironmentDefinitionReference', + 'Results', + 'SourceTestPlanInfo', + 'SourceTestSuiteInfo', + 'SuiteEntryUpdateParams', + 'SuiteTestCaseCreateUpdateParameters', + 'TeamProjectReference', + 'TestCase', + 'TestCaseReference', + 'TestConfigurationCreateUpdateParameters', + 'TestConfigurationReference', + 'TestEnvironment', + 'TestOutcomeSettings', + 'TestPlanCreateParams', + 'TestPlanReference', + 'TestPlansHubRefreshData', + 'TestPlanUpdateParams', + 'TestPoint', + 'TestPointResults', + 'TestPointUpdateParams', + 'TestSettings', + 'TestSuiteCreateUpdateCommonParams', + 'TestSuiteReference', + 'TestSuiteReferenceWithProject', + 'TestSuiteUpdateParams', + 'TestVariableCreateUpdateParameters', + 'WorkItem', + 'WorkItemDetails', + 'DestinationTestPlanCloneParams', + 'SourceTestplanResponse', + 'SuiteEntry', + 'TestConfiguration', + 'TestPlan', + 'TestPlanDetailedReference', + 'TestSuiteCreateParams', + 'TestVariable', + 'TestSuite', +] 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 new file mode 100644 index 00000000..3194f46b --- /dev/null +++ b/azure-devops/azure/devops/v5_1/test_plan/test_plan_client.py @@ -0,0 +1,809 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +# Generated file, DO NOT EDIT +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------------------------- + +from msrest import Serializer, Deserializer +from ...client import Client +from . import models + + +class TestPlanClient(Client): + """TestPlan + :param str base_url: Service URL + :param Authentication creds: Authenticated credentials. + """ + + def __init__(self, base_url=None, creds=None): + super(TestPlanClient, self).__init__(base_url, creds) + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + resource_area_identifier = None + + def create_test_configuration(self, test_configuration_create_update_parameters, project): + """CreateTestConfiguration. + [Preview API] Create a test configuration. + :param :class:` ` test_configuration_create_update_parameters: TestConfigurationCreateUpdateParameters + :param str project: Project ID or project name + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(test_configuration_create_update_parameters, 'TestConfigurationCreateUpdateParameters') + response = self._send(http_method='POST', + location_id='8369318e-38fa-4e84-9043-4b2a75d2c256', + version='5.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('TestConfiguration', response) + + def delete_test_confguration(self, project, test_configuartion_id): + """DeleteTestConfguration. + [Preview API] Delete a test configuration by its ID. + :param str project: Project ID or project name + :param int test_configuartion_id: ID of the test configuration to delete. + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if test_configuartion_id is not None: + query_parameters['testConfiguartionId'] = self._serialize.query('test_configuartion_id', test_configuartion_id, 'int') + self._send(http_method='DELETE', + location_id='8369318e-38fa-4e84-9043-4b2a75d2c256', + version='5.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + + def get_test_configuration_by_id(self, project, test_configuration_id): + """GetTestConfigurationById. + [Preview API] Get a test configuration + :param str project: Project ID or project name + :param int test_configuration_id: ID of the test configuration to get. + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if test_configuration_id is not None: + route_values['testConfigurationId'] = self._serialize.url('test_configuration_id', test_configuration_id, 'int') + response = self._send(http_method='GET', + location_id='8369318e-38fa-4e84-9043-4b2a75d2c256', + version='5.1-preview.1', + route_values=route_values) + return self._deserialize('TestConfiguration', response) + + def get_test_configurations(self, project, continuation_token=None): + """GetTestConfigurations. + [Preview API] Get a list of test configurations. + :param str project: Project ID or project name + :param str continuation_token: If the list of configurations returned is not complete, a continuation token to query next batch of configurations is included in the response header as "x-ms-continuationtoken". Omit this parameter to get the first batch of test configurations. + :rtype: [TestConfiguration] + """ + 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') + response = self._send(http_method='GET', + location_id='8369318e-38fa-4e84-9043-4b2a75d2c256', + version='5.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('[TestConfiguration]', self._unwrap_collection(response)) + + def update_test_configuration(self, test_configuration_create_update_parameters, project, test_configuartion_id): + """UpdateTestConfiguration. + [Preview API] Update a test configuration by its ID. + :param :class:` ` test_configuration_create_update_parameters: TestConfigurationCreateUpdateParameters + :param str project: Project ID or project name + :param int test_configuartion_id: ID of the test configuration to update. + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if test_configuartion_id is not None: + query_parameters['testConfiguartionId'] = self._serialize.query('test_configuartion_id', test_configuartion_id, 'int') + content = self._serialize.body(test_configuration_create_update_parameters, 'TestConfigurationCreateUpdateParameters') + response = self._send(http_method='PATCH', + location_id='8369318e-38fa-4e84-9043-4b2a75d2c256', + version='5.1-preview.1', + route_values=route_values, + query_parameters=query_parameters, + content=content) + return self._deserialize('TestConfiguration', response) + + def create_test_plan(self, test_plan_create_params, project): + """CreateTestPlan. + [Preview API] Create a test plan. + :param :class:` ` test_plan_create_params: A testPlanCreateParams object.TestPlanCreateParams + :param str project: Project ID or project name + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(test_plan_create_params, 'TestPlanCreateParams') + response = self._send(http_method='POST', + location_id='0e292477-a0c2-47f3-a9b6-34f153d627f4', + version='5.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('TestPlan', response) + + def delete_test_plan(self, project, plan_id): + """DeleteTestPlan. + [Preview API] Delete a test plan. + :param str project: Project ID or project name + :param int plan_id: ID of the test plan to be deleted. + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if plan_id is not None: + route_values['planId'] = self._serialize.url('plan_id', plan_id, 'int') + self._send(http_method='DELETE', + location_id='0e292477-a0c2-47f3-a9b6-34f153d627f4', + version='5.1-preview.1', + route_values=route_values) + + def get_test_plan_by_id(self, project, plan_id): + """GetTestPlanById. + [Preview API] Get a test plan by Id. + :param str project: Project ID or project name + :param int plan_id: ID of the test plan to get. + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if plan_id is not None: + route_values['planId'] = self._serialize.url('plan_id', plan_id, 'int') + response = self._send(http_method='GET', + location_id='0e292477-a0c2-47f3-a9b6-34f153d627f4', + version='5.1-preview.1', + route_values=route_values) + return self._deserialize('TestPlan', response) + + def get_test_plans(self, project, owner=None, continuation_token=None, include_plan_details=None, filter_active_plans=None): + """GetTestPlans. + [Preview API] Get a list of test plans + :param str project: Project ID or project name + :param str owner: Filter for test plan by owner ID or name + :param str continuation_token: If the list of plans returned is not complete, a continuation token to query next batch of plans is included in the response header as "x-ms-continuationtoken". Omit this parameter to get the first batch of test plans. + :param bool include_plan_details: Get all properties of the test plan + :param bool filter_active_plans: Get just the active plans + :rtype: [TestPlan] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if owner is not None: + query_parameters['owner'] = self._serialize.query('owner', owner, 'str') + if continuation_token is not None: + query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'str') + if include_plan_details is not None: + query_parameters['includePlanDetails'] = self._serialize.query('include_plan_details', include_plan_details, 'bool') + if filter_active_plans is not None: + query_parameters['filterActivePlans'] = self._serialize.query('filter_active_plans', filter_active_plans, 'bool') + response = self._send(http_method='GET', + location_id='0e292477-a0c2-47f3-a9b6-34f153d627f4', + version='5.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('[TestPlan]', self._unwrap_collection(response)) + + def update_test_plan(self, test_plan_update_params, project, plan_id): + """UpdateTestPlan. + [Preview API] Update a test plan. + :param :class:` ` test_plan_update_params: A testPlanUpdateParams object.TestPlanUpdateParams + :param str project: Project ID or project name + :param int plan_id: ID of the test plan to be updated. + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if plan_id is not None: + route_values['planId'] = self._serialize.url('plan_id', plan_id, 'int') + content = self._serialize.body(test_plan_update_params, 'TestPlanUpdateParams') + response = self._send(http_method='PATCH', + location_id='0e292477-a0c2-47f3-a9b6-34f153d627f4', + version='5.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('TestPlan', response) + + def get_suite_entries(self, project, suite_id, suite_entry_type=None): + """GetSuiteEntries. + [Preview API] Get a list of test suite entries in the test suite. + :param str project: Project ID or project name + :param int suite_id: Id of the parent suite. + :param str suite_entry_type: + :rtype: [SuiteEntry] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if suite_id is not None: + route_values['suiteId'] = self._serialize.url('suite_id', suite_id, 'int') + query_parameters = {} + if suite_entry_type is not None: + query_parameters['suiteEntryType'] = self._serialize.query('suite_entry_type', suite_entry_type, 'str') + response = self._send(http_method='GET', + location_id='d6733edf-72f1-4252-925b-c560dfe9b75a', + version='5.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('[SuiteEntry]', self._unwrap_collection(response)) + + def reorder_suite_entries(self, suite_entries, project, suite_id): + """ReorderSuiteEntries. + [Preview API] Reorder test suite entries in the test suite. + :param [SuiteEntryUpdateParams] suite_entries: List of SuiteEntry to reorder. + :param str project: Project ID or project name + :param int suite_id: Id of the parent test suite. + :rtype: [SuiteEntry] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if suite_id is not None: + route_values['suiteId'] = self._serialize.url('suite_id', suite_id, 'int') + content = self._serialize.body(suite_entries, '[SuiteEntryUpdateParams]') + response = self._send(http_method='PATCH', + location_id='d6733edf-72f1-4252-925b-c560dfe9b75a', + version='5.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('[SuiteEntry]', self._unwrap_collection(response)) + + def create_test_suite(self, test_suite_create_params, project, plan_id): + """CreateTestSuite. + [Preview API] Create test suite. + :param :class:` ` test_suite_create_params: Parameters for suite creation + :param str project: Project ID or project name + :param int plan_id: ID of the test plan that contains the suites. + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if plan_id is not None: + route_values['planId'] = self._serialize.url('plan_id', plan_id, 'int') + content = self._serialize.body(test_suite_create_params, 'TestSuiteCreateParams') + response = self._send(http_method='POST', + location_id='1046d5d3-ab61-4ca7-a65a-36118a978256', + version='5.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('TestSuite', response) + + def delete_test_suite(self, project, plan_id, suite_id): + """DeleteTestSuite. + [Preview API] Delete test suite. + :param str project: Project ID or project name + :param int plan_id: ID of the test plan that contains the suite. + :param int suite_id: ID of the test suite to delete. + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if plan_id is not None: + route_values['planId'] = self._serialize.url('plan_id', plan_id, 'int') + if suite_id is not None: + route_values['suiteId'] = self._serialize.url('suite_id', suite_id, 'int') + self._send(http_method='DELETE', + location_id='1046d5d3-ab61-4ca7-a65a-36118a978256', + version='5.1-preview.1', + route_values=route_values) + + def get_test_suite_by_id(self, project, plan_id, suite_id, expand=None): + """GetTestSuiteById. + [Preview API] Get test suite by suite id. + :param str project: Project ID or project name + :param int plan_id: ID of the test plan that contains the suites. + :param int suite_id: ID of the suite to get. + :param str expand: Include the children suites and testers details + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if plan_id is not None: + route_values['planId'] = self._serialize.url('plan_id', plan_id, 'int') + if suite_id is not None: + route_values['suiteId'] = self._serialize.url('suite_id', suite_id, 'int') + query_parameters = {} + if expand is not None: + query_parameters['expand'] = self._serialize.query('expand', expand, 'str') + response = self._send(http_method='GET', + location_id='1046d5d3-ab61-4ca7-a65a-36118a978256', + version='5.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('TestSuite', response) + + def get_test_suites_for_plan(self, project, plan_id, expand=None, continuation_token=None, as_tree_view=None): + """GetTestSuitesForPlan. + [Preview API] Get test suites for plan. + :param str project: Project ID or project name + :param int plan_id: ID of the test plan for which suites are requested. + :param str expand: Include the children suites and testers details. + :param str continuation_token: If the list of suites returned is not complete, a continuation token to query next batch of suites is included in the response header as "x-ms-continuationtoken". Omit this parameter to get the first batch of test suites. + :param bool as_tree_view: If the suites returned should be in a tree structure. + :rtype: [TestSuite] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if plan_id is not None: + route_values['planId'] = self._serialize.url('plan_id', plan_id, 'int') + query_parameters = {} + if expand is not None: + query_parameters['expand'] = self._serialize.query('expand', expand, 'str') + if continuation_token is not None: + query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'str') + if as_tree_view is not None: + query_parameters['asTreeView'] = self._serialize.query('as_tree_view', as_tree_view, 'bool') + response = self._send(http_method='GET', + location_id='1046d5d3-ab61-4ca7-a65a-36118a978256', + version='5.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('[TestSuite]', self._unwrap_collection(response)) + + def update_test_suite(self, test_suite_update_params, project, plan_id, suite_id): + """UpdateTestSuite. + [Preview API] Update test suite. + :param :class:` ` test_suite_update_params: Parameters for suite updation + :param str project: Project ID or project name + :param int plan_id: ID of the test plan that contains the suites. + :param int suite_id: ID of the parent suite. + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if plan_id is not None: + route_values['planId'] = self._serialize.url('plan_id', plan_id, 'int') + if suite_id is not None: + route_values['suiteId'] = self._serialize.url('suite_id', suite_id, 'int') + content = self._serialize.body(test_suite_update_params, 'TestSuiteUpdateParams') + response = self._send(http_method='PATCH', + location_id='1046d5d3-ab61-4ca7-a65a-36118a978256', + version='5.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('TestSuite', response) + + def get_suites_by_test_case_id(self, test_case_id): + """GetSuitesByTestCaseId. + [Preview API] Find the list of all test suites in which a given test case is present. This is helpful if you need to find out which test suites are using a test case, when you need to make changes to a test case. + :param int test_case_id: ID of the test case for which suites need to be fetched. + :rtype: [TestSuite] + """ + query_parameters = {} + if test_case_id is not None: + query_parameters['testCaseId'] = self._serialize.query('test_case_id', test_case_id, 'int') + response = self._send(http_method='GET', + location_id='a4080e84-f17b-4fad-84f1-7960b6525bf2', + version='5.1-preview.1', + query_parameters=query_parameters) + return self._deserialize('[TestSuite]', self._unwrap_collection(response)) + + def add_test_cases_to_suite(self, suite_test_case_create_update_parameters, project, plan_id, suite_id): + """AddTestCasesToSuite. + [Preview API] Add test cases to a suite with specified configurations + :param [SuiteTestCaseCreateUpdateParameters] suite_test_case_create_update_parameters: + :param str project: Project ID or project name + :param int plan_id: + :param int suite_id: + :rtype: [TestCase] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if plan_id is not None: + route_values['planId'] = self._serialize.url('plan_id', plan_id, 'int') + if suite_id is not None: + route_values['suiteId'] = self._serialize.url('suite_id', suite_id, 'int') + content = self._serialize.body(suite_test_case_create_update_parameters, '[SuiteTestCaseCreateUpdateParameters]') + response = self._send(http_method='POST', + location_id='a9bd61ac-45cf-4d13-9441-43dcd01edf8d', + version='5.1-preview.2', + route_values=route_values, + content=content) + return self._deserialize('[TestCase]', self._unwrap_collection(response)) + + def get_test_case(self, project, plan_id, suite_id, test_case_ids, wit_fields=None): + """GetTestCase. + [Preview API] + :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: + :rtype: [TestCase] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if plan_id is not None: + route_values['planId'] = self._serialize.url('plan_id', plan_id, 'int') + if suite_id is not None: + route_values['suiteId'] = self._serialize.url('suite_id', suite_id, 'int') + if test_case_ids is not None: + route_values['testCaseIds'] = self._serialize.url('test_case_ids', test_case_ids, 'str') + query_parameters = {} + if wit_fields is not None: + query_parameters['witFields'] = self._serialize.query('wit_fields', wit_fields, 'str') + response = self._send(http_method='GET', + location_id='a9bd61ac-45cf-4d13-9441-43dcd01edf8d', + version='5.1-preview.2', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('[TestCase]', self._unwrap_collection(response)) + + def get_test_case_list(self, project, plan_id, suite_id, test_ids=None, configuration_ids=None, wit_fields=None, continuation_token=None): + """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: + :rtype: [TestCase] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if plan_id is not None: + route_values['planId'] = self._serialize.url('plan_id', plan_id, 'int') + if suite_id is not None: + route_values['suiteId'] = self._serialize.url('suite_id', suite_id, 'int') + query_parameters = {} + if test_ids is not None: + query_parameters['testIds'] = self._serialize.query('test_ids', test_ids, 'str') + if configuration_ids is not None: + query_parameters['configurationIds'] = self._serialize.query('configuration_ids', configuration_ids, 'str') + if wit_fields is not None: + query_parameters['witFields'] = self._serialize.query('wit_fields', wit_fields, 'str') + if continuation_token is not None: + query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'str') + response = self._send(http_method='GET', + location_id='a9bd61ac-45cf-4d13-9441-43dcd01edf8d', + version='5.1-preview.2', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('[TestCase]', self._unwrap_collection(response)) + + def remove_test_cases_from_suite(self, project, plan_id, suite_id, test_case_ids): + """RemoveTestCasesFromSuite. + [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: + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if plan_id is not None: + route_values['planId'] = self._serialize.url('plan_id', plan_id, 'int') + if suite_id is not None: + route_values['suiteId'] = self._serialize.url('suite_id', suite_id, 'int') + if test_case_ids is not None: + route_values['testCaseIds'] = self._serialize.url('test_case_ids', test_case_ids, 'str') + self._send(http_method='DELETE', + location_id='a9bd61ac-45cf-4d13-9441-43dcd01edf8d', + version='5.1-preview.2', + route_values=route_values) + + 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 str project: Project ID or project name + :param int plan_id: + :param int suite_id: + :rtype: [TestCase] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if plan_id is not None: + route_values['planId'] = self._serialize.url('plan_id', plan_id, 'int') + if suite_id is not None: + route_values['suiteId'] = self._serialize.url('suite_id', suite_id, 'int') + content = self._serialize.body(suite_test_case_create_update_parameters, '[SuiteTestCaseCreateUpdateParameters]') + response = self._send(http_method='PATCH', + location_id='a9bd61ac-45cf-4d13-9441-43dcd01edf8d', + version='5.1-preview.2', + route_values=route_values, + content=content) + return self._deserialize('[TestCase]', self._unwrap_collection(response)) + + def delete_test_case(self, project, test_case_id): + """DeleteTestCase. + [Preview API] Delete a test case. + :param str project: Project ID or project name + :param int test_case_id: Id of test case to be deleted. + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if test_case_id is not None: + route_values['testCaseId'] = self._serialize.url('test_case_id', test_case_id, 'int') + self._send(http_method='DELETE', + location_id='29006fb5-816b-4ff7-a329-599943569229', + version='5.1-preview.1', + route_values=route_values) + + def clone_test_plan(self, clone_request_body, project, deep_clone=None): + """CloneTestPlan. + [Preview API] Clone test plan + :param :class:` ` clone_request_body: Plan Clone Request Body detail TestPlanCloneRequest + :param str project: Project ID or project name + :param bool deep_clone: Clones all the associated test cases as well + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if deep_clone is not None: + query_parameters['deepClone'] = self._serialize.query('deep_clone', deep_clone, 'bool') + content = self._serialize.body(clone_request_body, 'CloneTestPlanParams') + response = self._send(http_method='POST', + location_id='e65df662-d8a3-46c7-ae1c-14e2d4df57e1', + version='5.1-preview.2', + route_values=route_values, + query_parameters=query_parameters, + content=content) + return self._deserialize('CloneTestPlanOperationInformation', response) + + def get_clone_information(self, project, clone_operation_id): + """GetCloneInformation. + [Preview API] Get clone information. + :param str project: Project ID or project name + :param int clone_operation_id: Operation ID returned when we queue a clone operation + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if clone_operation_id is not None: + route_values['cloneOperationId'] = self._serialize.url('clone_operation_id', clone_operation_id, 'int') + response = self._send(http_method='GET', + location_id='e65df662-d8a3-46c7-ae1c-14e2d4df57e1', + version='5.1-preview.2', + route_values=route_values) + return self._deserialize('CloneTestPlanOperationInformation', response) + + 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: + :rtype: [TestPoint] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if plan_id is not None: + route_values['planId'] = self._serialize.url('plan_id', plan_id, 'int') + if suite_id is not None: + route_values['suiteId'] = self._serialize.url('suite_id', suite_id, 'int') + if point_ids is not None: + route_values['pointIds'] = self._serialize.url('point_ids', point_ids, 'str') + response = self._send(http_method='GET', + location_id='52df686e-bae4-4334-b0ee-b6cf4e6f6b73', + version='5.1-preview.2', + route_values=route_values) + return self._deserialize('[TestPoint]', self._unwrap_collection(response)) + + def get_points_list(self, project, plan_id, suite_id, test_point_ids=None, test_case_id=None, continuation_token=None): + """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: + :rtype: [TestPoint] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if plan_id is not None: + route_values['planId'] = self._serialize.url('plan_id', plan_id, 'int') + if suite_id is not None: + route_values['suiteId'] = self._serialize.url('suite_id', suite_id, 'int') + query_parameters = {} + if test_point_ids is not None: + query_parameters['testPointIds'] = self._serialize.query('test_point_ids', test_point_ids, 'str') + if test_case_id is not None: + query_parameters['testCaseId'] = self._serialize.query('test_case_id', test_case_id, 'str') + if continuation_token is not None: + query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'str') + response = self._send(http_method='GET', + location_id='52df686e-bae4-4334-b0ee-b6cf4e6f6b73', + version='5.1-preview.2', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('[TestPoint]', self._unwrap_collection(response)) + + def update_test_points(self, test_point_update_params, project, plan_id, suite_id): + """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 str project: Project ID or project name + :param int plan_id: + :param int suite_id: + :rtype: [TestPoint] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if plan_id is not None: + route_values['planId'] = self._serialize.url('plan_id', plan_id, 'int') + if suite_id is not None: + route_values['suiteId'] = self._serialize.url('suite_id', suite_id, 'int') + content = self._serialize.body(test_point_update_params, '[TestPointUpdateParams]') + response = self._send(http_method='PATCH', + location_id='52df686e-bae4-4334-b0ee-b6cf4e6f6b73', + version='5.1-preview.2', + route_values=route_values, + content=content) + return self._deserialize('[TestPoint]', self._unwrap_collection(response)) + + def clone_test_suite(self, clone_request_body, project, deep_clone=None): + """CloneTestSuite. + [Preview API] Clone test suite + :param :class:` ` clone_request_body: Suite Clone Request Body detail TestSuiteCloneRequest + :param str project: Project ID or project name + :param bool deep_clone: Clones all the associated test cases as well + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if deep_clone is not None: + query_parameters['deepClone'] = self._serialize.query('deep_clone', deep_clone, 'bool') + content = self._serialize.body(clone_request_body, 'CloneTestSuiteParams') + response = self._send(http_method='POST', + location_id='181d4c97-0e98-4ee2-ad6a-4cada675e555', + version='5.1-preview.2', + route_values=route_values, + query_parameters=query_parameters, + content=content) + return self._deserialize('CloneTestSuiteOperationInformation', response) + + def get_suite_clone_information(self, project, clone_operation_id): + """GetSuiteCloneInformation. + [Preview API] Get clone information. + :param str project: Project ID or project name + :param int clone_operation_id: Operation ID returned when we queue a clone operation + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if clone_operation_id is not None: + route_values['cloneOperationId'] = self._serialize.url('clone_operation_id', clone_operation_id, 'int') + response = self._send(http_method='GET', + location_id='181d4c97-0e98-4ee2-ad6a-4cada675e555', + version='5.1-preview.2', + route_values=route_values) + return self._deserialize('CloneTestSuiteOperationInformation', response) + + def create_test_variable(self, test_variable_create_update_parameters, project): + """CreateTestVariable. + [Preview API] Create a test variable. + :param :class:` ` test_variable_create_update_parameters: TestVariableCreateUpdateParameters + :param str project: Project ID or project name + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(test_variable_create_update_parameters, 'TestVariableCreateUpdateParameters') + response = self._send(http_method='POST', + location_id='2c61fac6-ac4e-45a5-8c38-1c2b8fd8ea6c', + version='5.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('TestVariable', response) + + def delete_test_variable(self, project, test_variable_id): + """DeleteTestVariable. + [Preview API] Delete a test variable by its ID. + :param str project: Project ID or project name + :param int test_variable_id: ID of the test variable to delete. + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if test_variable_id is not None: + route_values['testVariableId'] = self._serialize.url('test_variable_id', test_variable_id, 'int') + self._send(http_method='DELETE', + location_id='2c61fac6-ac4e-45a5-8c38-1c2b8fd8ea6c', + version='5.1-preview.1', + route_values=route_values) + + def get_test_variable_by_id(self, project, test_variable_id): + """GetTestVariableById. + [Preview API] Get a test variable by its ID. + :param str project: Project ID or project name + :param int test_variable_id: ID of the test variable to get. + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if test_variable_id is not None: + route_values['testVariableId'] = self._serialize.url('test_variable_id', test_variable_id, 'int') + response = self._send(http_method='GET', + location_id='2c61fac6-ac4e-45a5-8c38-1c2b8fd8ea6c', + version='5.1-preview.1', + route_values=route_values) + return self._deserialize('TestVariable', response) + + def get_test_variables(self, project, continuation_token=None): + """GetTestVariables. + [Preview API] Get a list of test variables. + :param str project: Project ID or project name + :param str continuation_token: If the list of variables returned is not complete, a continuation token to query next batch of variables is included in the response header as "x-ms-continuationtoken". Omit this parameter to get the first batch of test variables. + :rtype: [TestVariable] + """ + 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') + response = self._send(http_method='GET', + location_id='2c61fac6-ac4e-45a5-8c38-1c2b8fd8ea6c', + version='5.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('[TestVariable]', self._unwrap_collection(response)) + + def update_test_variable(self, test_variable_create_update_parameters, project, test_variable_id): + """UpdateTestVariable. + [Preview API] Update a test variable by its ID. + :param :class:` ` test_variable_create_update_parameters: TestVariableCreateUpdateParameters + :param str project: Project ID or project name + :param int test_variable_id: ID of the test variable to update. + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if test_variable_id is not None: + route_values['testVariableId'] = self._serialize.url('test_variable_id', test_variable_id, 'int') + content = self._serialize.body(test_variable_create_update_parameters, 'TestVariableCreateUpdateParameters') + response = self._send(http_method='PATCH', + location_id='2c61fac6-ac4e-45a5-8c38-1c2b8fd8ea6c', + version='5.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('TestVariable', response) + diff --git a/azure-devops/azure/devops/v5_1/tfvc/models.py b/azure-devops/azure/devops/v5_1/tfvc/models.py index 8db382eb..ff971aa8 100644 --- a/azure-devops/azure/devops/v5_1/tfvc/models.py +++ b/azure-devops/azure/devops/v5_1/tfvc/models.py @@ -168,6 +168,8 @@ class GitRepository(Model): :type url: str :param valid_remote_urls: :type valid_remote_urls: list of str + :param web_url: + :type web_url: str """ _attribute_map = { @@ -182,10 +184,11 @@ class GitRepository(Model): 'size': {'key': 'size', 'type': 'long'}, 'ssh_url': {'key': 'sshUrl', 'type': 'str'}, 'url': {'key': 'url', 'type': 'str'}, - 'valid_remote_urls': {'key': 'validRemoteUrls', 'type': '[str]'} + 'valid_remote_urls': {'key': 'validRemoteUrls', 'type': '[str]'}, + 'web_url': {'key': 'webUrl', 'type': 'str'} } - def __init__(self, _links=None, default_branch=None, id=None, is_fork=None, name=None, parent_repository=None, project=None, remote_url=None, size=None, ssh_url=None, url=None, valid_remote_urls=None): + def __init__(self, _links=None, default_branch=None, id=None, is_fork=None, name=None, parent_repository=None, project=None, remote_url=None, size=None, ssh_url=None, url=None, valid_remote_urls=None, web_url=None): super(GitRepository, self).__init__() self._links = _links self.default_branch = default_branch @@ -199,6 +202,7 @@ def __init__(self, _links=None, default_branch=None, id=None, is_fork=None, name self.ssh_url = ssh_url self.url = url self.valid_remote_urls = valid_remote_urls + self.web_url = web_url class GitRepositoryRef(Model): diff --git a/azure-devops/azure/devops/v5_1/wiki/models.py b/azure-devops/azure/devops/v5_1/wiki/models.py index 6c9a4f0c..e65298b8 100644 --- a/azure-devops/azure/devops/v5_1/wiki/models.py +++ b/azure-devops/azure/devops/v5_1/wiki/models.py @@ -36,6 +36,8 @@ class GitRepository(Model): :type url: str :param valid_remote_urls: :type valid_remote_urls: list of str + :param web_url: + :type web_url: str """ _attribute_map = { @@ -50,10 +52,11 @@ class GitRepository(Model): 'size': {'key': 'size', 'type': 'long'}, 'ssh_url': {'key': 'sshUrl', 'type': 'str'}, 'url': {'key': 'url', 'type': 'str'}, - 'valid_remote_urls': {'key': 'validRemoteUrls', 'type': '[str]'} + 'valid_remote_urls': {'key': 'validRemoteUrls', 'type': '[str]'}, + 'web_url': {'key': 'webUrl', 'type': 'str'} } - def __init__(self, _links=None, default_branch=None, id=None, is_fork=None, name=None, parent_repository=None, project=None, remote_url=None, size=None, ssh_url=None, url=None, valid_remote_urls=None): + def __init__(self, _links=None, default_branch=None, id=None, is_fork=None, name=None, parent_repository=None, project=None, remote_url=None, size=None, ssh_url=None, url=None, valid_remote_urls=None, web_url=None): super(GitRepository, self).__init__() self._links = _links self.default_branch = default_branch @@ -67,6 +70,7 @@ def __init__(self, _links=None, default_branch=None, id=None, is_fork=None, name self.ssh_url = ssh_url self.url = url self.valid_remote_urls = valid_remote_urls + self.web_url = web_url class GitRepositoryRef(Model): diff --git a/azure-devops/azure/devops/v5_1/work/__init__.py b/azure-devops/azure/devops/v5_1/work/__init__.py index a1476b9e..625216fb 100644 --- a/azure-devops/azure/devops/v5_1/work/__init__.py +++ b/azure-devops/azure/devops/v5_1/work/__init__.py @@ -18,6 +18,7 @@ 'BacklogLevelConfiguration', 'BacklogLevelWorkItems', 'Board', + 'BoardBadge', 'BoardCardRuleSettings', 'BoardCardSettings', 'BoardChart', diff --git a/azure-devops/azure/devops/v5_1/work/models.py b/azure-devops/azure/devops/v5_1/work/models.py index dbf89e49..b004c122 100644 --- a/azure-devops/azure/devops/v5_1/work/models.py +++ b/azure-devops/azure/devops/v5_1/work/models.py @@ -213,6 +213,26 @@ def __init__(self, work_items=None): self.work_items = work_items +class BoardBadge(Model): + """BoardBadge. + + :param board_id: The ID of the board represented by this badge. + :type board_id: str + :param image_url: A link to the SVG resource. + :type image_url: str + """ + + _attribute_map = { + 'board_id': {'key': 'boardId', 'type': 'str'}, + 'image_url': {'key': 'imageUrl', 'type': 'str'} + } + + def __init__(self, board_id=None, image_url=None): + super(BoardBadge, self).__init__() + self.board_id = board_id + self.image_url = image_url + + class BoardCardRuleSettings(Model): """BoardCardRuleSettings. @@ -1910,6 +1930,7 @@ def __init__(self, url=None, _links=None, comment_version_ref=None, fields=None, 'BacklogLevel', 'BacklogLevelConfiguration', 'BacklogLevelWorkItems', + 'BoardBadge', 'BoardCardRuleSettings', 'BoardCardSettings', 'BoardChartReference', 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 7673c974..7bca4a9a 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 @@ -33,9 +33,6 @@ 'IdentityReference', 'JsonPatchOperation', 'Link', - 'Operation', - 'OperationReference', - 'OperationResultReference', 'ProjectWorkItemStateColors', 'ProvisioningResult', 'QueryBatchGetRequest', 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 fdc498df..f716a6d3 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 @@ -419,7 +419,7 @@ class JsonPatchOperation(Model): :param from_: The path to copy from for the Move/Copy operation. :type from_: str :param op: The patch operation - :type op: :class:`Operation ` + :type op: object :param path: The path for the operation. In the case of an array, a zero based index can be used to specify the position in the array (e.g. /biscuits/0/name). The "-" character can be used instead of an index to insert at the end of the array (e.g. /biscuits/-). :type path: str :param value: The value for the operation. This is either a primitive or a JToken. @@ -428,7 +428,7 @@ class JsonPatchOperation(Model): _attribute_map = { 'from_': {'key': 'from', 'type': 'str'}, - 'op': {'key': 'op', 'type': 'Operation'}, + 'op': {'key': 'op', 'type': 'object'}, 'path': {'key': 'path', 'type': 'str'}, 'value': {'key': 'value', 'type': 'object'} } @@ -465,50 +465,6 @@ def __init__(self, attributes=None, rel=None, url=None): self.url = url -class OperationReference(Model): - """OperationReference. - - :param id: Unique identifier for the operation. - :type id: str - :param plugin_id: Unique identifier for the plugin. - :type plugin_id: str - :param status: The current status of the operation. - :type status: object - :param url: URL to get the full operation object. - :type url: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'plugin_id': {'key': 'pluginId', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'object'}, - 'url': {'key': 'url', 'type': 'str'} - } - - def __init__(self, id=None, plugin_id=None, status=None, url=None): - super(OperationReference, self).__init__() - self.id = id - self.plugin_id = plugin_id - self.status = status - self.url = url - - -class OperationResultReference(Model): - """OperationResultReference. - - :param result_url: URL to the operation result. - :type result_url: str - """ - - _attribute_map = { - 'result_url': {'key': 'resultUrl', 'type': 'str'} - } - - def __init__(self, result_url=None): - super(OperationResultReference, self).__init__() - self.result_url = result_url - - class ProjectWorkItemStateColors(Model): """ProjectWorkItemStateColors. @@ -1506,46 +1462,6 @@ def __init__(self, activity_date=None, activity_type=None, changed_date=None, id self.assigned_to = assigned_to -class Operation(OperationReference): - """Operation. - - :param id: Unique identifier for the operation. - :type id: str - :param plugin_id: Unique identifier for the plugin. - :type plugin_id: str - :param status: The current status of the operation. - :type status: object - :param url: URL to get the full operation object. - :type url: str - :param _links: Links to other related objects. - :type _links: :class:`ReferenceLinks ` - :param detailed_message: Detailed messaged about the status of an operation. - :type detailed_message: str - :param result_message: Result message for an operation. - :type result_message: str - :param result_url: URL to the operation result. - :type result_url: :class:`OperationResultReference ` - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'plugin_id': {'key': 'pluginId', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'object'}, - 'url': {'key': 'url', 'type': 'str'}, - '_links': {'key': '_links', 'type': 'ReferenceLinks'}, - 'detailed_message': {'key': 'detailedMessage', 'type': 'str'}, - 'result_message': {'key': 'resultMessage', 'type': 'str'}, - 'result_url': {'key': 'resultUrl', 'type': 'OperationResultReference'} - } - - def __init__(self, id=None, plugin_id=None, status=None, url=None, _links=None, detailed_message=None, result_message=None, result_url=None): - super(Operation, self).__init__(id=id, plugin_id=plugin_id, status=status, url=url) - self._links = _links - self.detailed_message = detailed_message - self.result_message = result_message - self.result_url = result_url - - class ReportingWorkItemLinksBatch(StreamedBatch): """ReportingWorkItemLinksBatch. @@ -2622,8 +2538,6 @@ def __init__(self, url=None, _links=None, description=None, id=None, name=None, 'IdentityReference', 'JsonPatchOperation', 'Link', - 'OperationReference', - 'OperationResultReference', 'ProjectWorkItemStateColors', 'ProvisioningResult', 'QueryBatchGetRequest', @@ -2663,7 +2577,6 @@ def __init__(self, url=None, _links=None, description=None, id=None, name=None, 'WorkItemTypeTemplateUpdateModel', 'AccountRecentActivityWorkItemModel', 'AccountRecentActivityWorkItemModel2', - 'Operation', 'ReportingWorkItemLinksBatch', 'ReportingWorkItemRevisionsBatch', 'WorkItemCommentVersionRef', 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 f250d81d..5188b345 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 @@ -373,7 +373,7 @@ def get_comment(self, project, work_item_id, comment_id, include_deleted=None, e query_parameters=query_parameters) return self._deserialize('Comment', response) - def get_comments(self, project, work_item_id, top=None, continuation_token=None, include_deleted=None, expand=None): + def get_comments(self, project, work_item_id, top=None, continuation_token=None, include_deleted=None, expand=None, order=None): """GetComments. [Preview API] Returns a list of work item comments, pageable. :param str project: Project ID or project name @@ -382,6 +382,7 @@ def get_comments(self, project, work_item_id, top=None, continuation_token=None, :param str continuation_token: Used to query for the next page of comments. :param bool include_deleted: Specify if the deleted comments should be retrieved. :param str expand: Specifies the additional data retrieval options for work item comments. + :param str order: Order in which the comments should be returned. :rtype: :class:` ` """ route_values = {} @@ -398,6 +399,8 @@ def get_comments(self, project, work_item_id, top=None, continuation_token=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') + if order is not None: + query_parameters['order'] = self._serialize.query('order', order, 'str') response = self._send(http_method='GET', location_id='608aac0a-32e1-4493-a863-b9cf4566d257', version='5.1-preview.3', @@ -674,12 +677,13 @@ def get_fields(self, project=None, expand=None): query_parameters=query_parameters) return self._deserialize('[WorkItemField]', self._unwrap_collection(response)) - def create_query(self, posted_query, project, query): + def create_query(self, posted_query, project, query, validate_wiql_only=None): """CreateQuery. [Preview API] Creates a query, or moves a query. :param :class:` ` posted_query: The query to create. :param str project: Project ID or project name :param str query: The parent id or path under which the query is to be created. + :param bool validate_wiql_only: If you only want to validate your WIQL query without actually creating one, set it to true. Default is false. :rtype: :class:` ` """ route_values = {} @@ -687,11 +691,15 @@ def create_query(self, posted_query, project, query): route_values['project'] = self._serialize.url('project', project, 'str') if query is not None: route_values['query'] = self._serialize.url('query', query, 'str') + query_parameters = {} + if validate_wiql_only is not None: + query_parameters['validateWiqlOnly'] = self._serialize.query('validate_wiql_only', validate_wiql_only, 'bool') content = self._serialize.body(posted_query, 'QueryHierarchyItem') response = self._send(http_method='POST', location_id='a67d190c-c41f-424b-814d-0e906f659301', version='5.1-preview.2', route_values=route_values, + query_parameters=query_parameters, content=content) return self._deserialize('QueryHierarchyItem', response) diff --git a/azure-devops/azure/devops/version.py b/azure-devops/azure/devops/version.py index 1606c863..8f312d0d 100644 --- a/azure-devops/azure/devops/version.py +++ b/azure-devops/azure/devops/version.py @@ -3,4 +3,4 @@ # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- -VERSION = "5.0.0b4" +VERSION = "5.0.0b5" diff --git a/azure-devops/setup.py b/azure-devops/setup.py index f3e80fa5..75afdadf 100644 --- a/azure-devops/setup.py +++ b/azure-devops/setup.py @@ -6,7 +6,7 @@ from setuptools import setup, find_packages NAME = "azure-devops" -VERSION = "5.0.0b4" +VERSION = "5.0.0b5" # To install the library, run the following #